[R] p-value for non-linear variable in overdispersed glm()

tsnall@mappi.helsinki.fi tsnall at mappi.helsinki.fi
Fri Sep 30 17:29:59 CEST 2005


Dear all, 
I am fitting an nonlinear glm() using optim() by first minimising 
glm(resp~ var1 + var2, family=binomial, data=data)$deviance
where var1= exp(-a1*dist1), and var2= exp(-a2*dist2), where a1 and a2 are 
parameters and dist1 and dist2 are independent variables.

Next, I calculate the value of var1 (and var2) by plugging in the value of 
al1 (and al2) that minimises deviance,
and fit glm(resp~ var1+var2 , family=binomial, data=data)
Var1 in this model thus includes two parameters - the standard glm() 
coefficient and a1. This is (of course) not recognized by drop1().

Usually I extract a rough p-value for var1 in this model by 
1-pchisq(scaled deviance,df=2)
This gives the p-value reported by drop1():
1-pchisq(scaled deviance,df=1)

However, the model that I currently work on is overdispersed, and I have 
used family=quasibinomial. According to ?anova.glm the F-value should be 
used in likelihood-ratio tests of models fitted by quasibinomial. 
Again I want to extract a rough p-value and try the corresponding (I 
thought) for the overdispersed model:
1-pf(5.1,df1=2, df2=250)
[1] 0.006746671
which is lower than
1-pf(5.1,df1=1, df2=250)
[1] 0.02478842
which I didn't expect.

Could someone please give a clue on how to get the rough p-value for var1 
in my overdispersed model?


Thanks!

Cheers,
Tord




More information about the R-help mailing list