[R] RW: smoothing spline in package gam

2009-05-05 Thread

 

Dear jianghua and all R professor:

 

I use the suggestion that jianghua gives. But the problem is still there.

 

Use "summary(m1)" or "summary.gam(m1)" is the same result and it doesn't show 
the significance results of parametric terms.

 

Should I choose another smoother to get significance results of parametric 
terms ?

 

I know another "gam way" in the package "mgcv" and they can show me the 
significance results of parametric terms in package mgcv.

 

But the smoother is different between in package "gam" and "mgcv"

 

Is it possible to find significance results of parametric terms in package 
"gam" ?

 

or maybe I have to try another smoother in package "mgcv" !!

 

Is it possible that in package "mgcv" do some assunptions which can make the 
result is the same in package "gam" ?

 

Ashely, Yang

 

 

in package gam  

¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ

 

> library(gam)
Loading required package: splines
> 
>  
> m1=gam(y~ost+wst+park10+sch50+comm+build+suite+y95+y96+y97+y98+y99+s(builarea)+s(age)+s(fl)+s(totfl)+s(cbd)+s(redl))
>   
> summary.gam(m1)

Call: gam(formula = y ~ ost + wst + park10 + sch50 + comm + build + 
suite + y95 + y96 + y97 + y98 + y99 + s(builarea) + s(age) + 
s(fl) + s(totfl) + s(cbd) + s(redl))
Deviance Residuals:
Min  1Q  Median  3Q Max 
-753.51 -118.98  -15.27   99.16 1253.28 

(Dispersion Parameter for gaussian family taken to be 41952.11)

Null Deviance: 564111793 on 4714 degrees of freedom
Residual Deviance: 196251969 on 4678 degrees of freedom
AIC: 63607.24 

Number of Local Scoring Iterations: 2 

DF for Terms and F-values for Nonparametric Effects

Df Npar Df Npar F Pr(F)
(Intercept)  1 
ost  1 
wst  1 
park10   1 
sch501 
comm 1 
build1 
suite1 
y95  1 
y96  1 
y97  1 
y98  1 
y99  1 
s(builarea)  1   3 13.852 5.440e-09 ***
s(age)   1   3 13.410 1.033e-08 ***
s(fl)1   3 41.732 < 2.2e-16 ***
s(totfl) 1   3 19.146 2.454e-12 ***
s(cbd)   1   3 15.464 5.222e-10 ***
s(redl)  1   3  4.839  0.002300 ** 
---
Signif. codes:  0 ¡¥***¡¦ 0.001 ¡¥**¡¦ 0.01 ¡¥*¡¦ 0.05 ¡¥.¡¦ 0.1 ¡¥ ¡¦ 1 
> 

 

> summary(m1)

Call: gam(formula = y ~ ost + wst + park10 + sch50 + comm + build + 
suite + y95 + y96 + y97 + y98 + y99 + s(builarea) + s(age) + 
s(fl) + s(totfl) + s(cbd) + s(redl))
Deviance Residuals:
Min  1Q  Median  3Q Max 
-753.51 -118.98  -15.27   99.16 1253.28 

(Dispersion Parameter for gaussian family taken to be 41952.11)

Null Deviance: 564111793 on 4714 degrees of freedom
Residual Deviance: 196251969 on 4678 degrees of freedom
AIC: 63607.24 

Number of Local Scoring Iterations: 2 

DF for Terms and F-values for Nonparametric Effects

Df Npar Df Npar F Pr(F)
(Intercept)  1 
ost  1 
wst  1 
park10   1 
sch501 
comm 1 
build1 
suite1 
y95  1 
y96  1 
y97  1 
y98  1 
y99  1 
s(builarea)  1   3 13.852 5.440e-09 ***
s(age)   1   3 13.410 1.033e-08 ***
s(fl)1   3 41.732 < 2.2e-16 ***
s(totfl) 1   3 19.146 2.454e-12 ***
s(cbd)   1   3 15.464 5.222e-10 ***
s(redl)  1   3  4.839  0.002300 ** 
---
Signif. codes:  0 ¡¥***¡¦ 0.001 ¡¥**¡¦ 0.01 ¡¥*¡¦ 0.05 ¡¥.¡¦ 0.1 ¡¥ ¡¦ 1 
> 


 

 

in package mgcv

¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ¡õ


> library(mgcv)
This is mgcv 1.3-29 

Attaching package: 'mgcv'


The following object(s) are masked from package:gam :

 anova.gam,
 gam,
 gam.control,
 gam.fit,
 plot.gam,
 predict.gam,
 print.gam,
 print.summary.gam,
 s,
 summary.gam 

>  
> m1=gam(y~ost+wst+park10+sch50+comm+build+suite+y95+y96+y97+y98+y99+s(builarea)+s(age)+s(fl)+s(totfl)+s(cbd)+s(redl))
>   
> summary(m1)

Family: gaussian 
Link function: identity 

Formula:
y ~ ost + wst + park10 + sch50 + comm + build + suite + y95 + 
y96 + y97 + y98 + y99 + s(builarea) + s(age) + s(fl) + s(totfl) + 
s(cbd) + s(redl)

Parametric coefficients:
Estimate S

[R] smoothing spline in package gam

2009-05-05 Thread

dear all,

 

i have a little question, but it make me torment long time

 

hope you can help me and give some advices , thanks

 

 

i use smoothing spline in package gam

 

the model

 

> m1=gam(y~ost+wst+park10+sch50+comm+build+suite+y05+y06+y07+y99+y98+s(builarea)+s(age)+s(fl)+s(totfl)+s(cbd)+s(redl))


and summary(m1) can show the "s"(smoothing) variables' Signif. codes.

 

but i also want to know the Parametric coefficients and their Signif. codes. 
like ost, wst...etc.

 

is that possible to get the Parametric coefficients'  Signif. codes  (in 
package gam) ?

 

 

thanks~~

 

 

 

 

 

 

_


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.