willow1980
2009-Apr-28 11:39 UTC
[R] Why there is no p-value from likelihood ratio test using anova in GAM model fitting?
Hello, everybody, There is the first time for me to post a question, because I really cannot find answer from books, websites or my colleagues. Thank you in advance for your help! I am running likelihood ratio test to find if the simpler model is not significant from more complicated model. However, when I run LRT to compare them, the test did not return F value and p-value for me. What's the reason? How can I get such important information? #################################################### Analysis of Deviance Table Model 1: sum_surv15 ~ s(FLBS) + s(byear) + s(FLBS, byear) Model 2: sum_surv15 ~ s(FLBS) + SES + s(byear) + s(FLBS, byear) Resid. Df Resid. Dev Df Deviance F Pr(>F) 1 1202.21094 601.27 2 1201.43848 601.29 0.77246 -0.02 #################################################### Thank you very much! Jianghua Liu, University of Sheffield -- View this message in context: http://www.nabble.com/Why-there-is-no-p-value-from-likelihood-ratio-test-using-anova-in-GAM-model-fitting--tp23275224p23275224.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]]
Dieter Menne
2009-Apr-28 13:08 UTC
[R] Why there is no p-value from likelihood ratio test using anova in GAM model fitting?
willow1980 <jianghua.liu <at> shef.ac.uk> writes:> However, when I run LRT to compare > them, the test did not return F value and p-value for me. What's the reason? > > #################################################### > Analysis of Deviance Table > > Model 1: sum_surv15 ~ s(FLBS) + s(byear) + s(FLBS, byear) > Model 2: sum_surv15 ~ s(FLBS) + SES + s(byear) + s(FLBS, byear) > Resid. Df Resid. Dev Df Deviance F Pr(>F) > 1 1202.21094 601.27 > 2 1201.43848 601.29 0.77246 -0.02 > ####################################################-- Provide at least the command line you used -- Wild guess: Try to add test="F" (which is indicated in the docs) Dieter
Simon Wood
2009-Apr-28 13:15 UTC
[R] Why there is no p-value from likelihood ratio test using anova in GAM model fitting?
The simpler model has the lower deviance (marginally), so there is nothing to test here. This can happen with maximum penalized likelihood estimators, even though the models are nested (especially if the smoothing parameters are selected automatically). Are you using gam:gam or mgcv:gam (and which version numbers)? best, Simon On Tuesday 28 April 2009 12:38, willow1980 wrote:> Hello, everybody, > There is the first time for me to post a question, because I really cannot > find answer from books, websites or my colleagues. Thank you in advance for > your help! > I am running likelihood ratio test to find if the simpler model is not > significant from more complicated model. However, when I run LRT to compare > them, the test did not return F value and p-value for me. What's the > reason? How can I get such important information? > > #################################################### > Analysis of Deviance Table > > Model 1: sum_surv15 ~ s(FLBS) + s(byear) + s(FLBS, byear) > Model 2: sum_surv15 ~ s(FLBS) + SES + s(byear) + s(FLBS, byear) > Resid. Df Resid. Dev Df Deviance F Pr(>F) > 1 1202.21094 601.27 > 2 1201.43848 601.29 0.77246 -0.02 > #################################################### > Thank you very much! > > Jianghua Liu, University of Sheffield--> Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK > +44 1225 386603 www.maths.bath.ac.uk/~sw283
Maybe Matching Threads
- A question about using “by” in GAM model fitting of interaction between smooth terms and factor
- How to control spaces between axis, tick and label in xyplot or xYplot?
- How to deal with multicollinearity in mixed models (with lmer)?
- "autonumber" for grouping variable
- How to control number of significant digits (figures) in y-axis?