[R] GAM and AIC: How can I do??? please
Eun A Kim
euna0 at dreamwiz.com
Mon Oct 24 03:55:32 CEST 2005
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 at dreamwiz.com&msgid=%3C20051024015532.0
000C00B01D902E9 at pmail1.dreamwiz.com%3E&receiver=r-help at stat.math.ethz.
ch&key=bd02e77f5ec97f754394e2adff337f11]
More information about the R-help
mailing list