Not sure where this belongs so asking this in crossvalidated also. I am running the following regression: from patsy import dmatrices import statsmodels.api as sm
y, X = dmatrices('M ~ I(4.8*(Q**0.8)) ', data=DF, return_type='dataframe')
res = sm.OLS(y, X).fit()
Now I need to test the joint hypothesis that intercept=0 and beta=1. I tried doing this:
hyp='Intercept = 0, 4.8*(Q**0.8) = 1'
t=res.f_test(hyp)
but got the following error:
PatsyError: unrecognized token in constraint
Intercept = 0, 4.8*(Q**0.8) = 1
I also tried
hyp='Intercept = 0, I(4.8*(Q**0.8)) = 1'
but got
PatsyError: unrecognized token in constraint
Intercept = 0, I(4.8*(Q**0.8)) = 1
what is the correct way to go about this?