[R] AIC for GAM models
ritapatricio
anaritapatricio at hotmail.com
Wed Aug 22 14:00:01 CEST 2012
Dear all,
I am analysing growth data - response variable - using GAM and GAMM models,
and 4 covariates: mean size, mean capture year, growth interval, having
tumors vs. not
The models work fine, and fit the data well, however when I try to compare
models using AIC I cannot get an AIC value.
This is the code for the gam model:
>model1=gam(growth_rate~s(sampling_year)+s(growth_interval)+s(mean_SCL)+FP_status,family=quasi(link=identity),method="REML")
> AIC(model1)
[1] NA
or:
> model2=gam(growth_rate~s(sampling_year)+s(mean_SCL),family=quasi(link=identity),method="REML")
> AIC(model1,model2)
df AIC
model1 13.722861 NA
model2 9.898634 NA
I have tried several models and AIC always comes as 'NA', can someone help?
many thanks.
rita patrício
--
View this message in context: http://r.789695.n4.nabble.com/AIC-for-GAM-models-tp4640972.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list