Re: [R] GAM and AIC: How can I do??? please

From: Simon Wood <sw283_at_maths.bath.ac.uk>
Date: Tue 25 Oct 2005 - 19:01:10 EST

Please send R and mgcv version numbers, as I can't replicate this problem. best, Simon

>
> Hello, I'm a Korean researcher who have been started to learn the "R"
> package.
>
> I want to make gam model and AIC value of the model to compare several
> models.
>
> I did the GAM model, but there were error for AIC.
>
> SO, how can I do? pleas help me!!!
>
>
>
> I did like below;
>
>
> > a.fit <- gam(pi~ s(t1r), family = gaussian(link="log"))
> > summary(a.fit)
>
>
> Family: gaussian
> Link function: log
>
> Formula:
> pi ~ s(t1r)
>
> Parametric coefficients:
> Estimate std. err. t ratio Pr(>|t|)
> constant 0.093105 0.005238 17.77 < 2.22e-16
>
> Approximate significance of smooth terms:
> edf chi.sq p-value
> s(t1r) 1.833 24.153 0.00014213
>
> R-sq.(adj) = 0.435 Deviance explained = 47.1%
> GCV score = 0.0010938 Scale est. = 0.00099053 n = 30
>
> > AIC(a.fit)
> Error in logLik(object) : no applicable method for "logLik"
>
>
> Eun A Kim, MD, MPH, Ph.D
> Senior Researcher
> Occupational safety and Health Research Institute
> Korea Occupational Safety and Health Agency
> TEL : +82-32-510-0910, FAX: +82-32-518-0862
> Address: 34-4 Gusan-dong, Bupyung-Gu, Incheon city, 430-711, Republic
> of Korea
> Home Fax +82-(303)3111-0573
> [receive_check.cgi?sender=euna0@dreamwiz.com&msgid=%3C20051024015532.0
> 000C00B01D902E9@pmail1.dreamwiz.com%3E&receiver=r-help@stat.math.ethz.
> ch&key=bd02e77f5ec97f754394e2adff337f11]
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Oct 25 19:12:14 2005

This archive was generated by hypermail 2.1.8 : Tue 25 Oct 2005 - 21:17:34 EST