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

From: Eun A Kim <euna0_at_dreamwiz.com>
Date: Mon 24 Oct 2005 - 11:55:32 EST

   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

   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 Received on Mon Oct 24 12:05:09 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:46 EST