
 

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                             
sch50        1                             
comm         1                             
build        1                             
suite        1                             
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                             
sch50        1                             
comm         1                             
build        1                             
suite        1                             
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 Std. Error t value Pr(>|t|)    
(Intercept)  865.501     18.487  46.816  < 2e-16 ***
ost          -73.602     11.473  -6.415 1.55e-10 ***
wst          -55.797     12.772  -4.369 1.28e-05 ***
park10        18.397      6.210   2.962 0.003067 ** 
sch50         49.629     12.296   4.036 5.52e-05 ***
comm         -33.151      9.127  -3.632 0.000284 ***
build         71.412     24.353   2.932 0.003380 ** 
suite        -72.243     18.651  -3.873 0.000109 ***
y95          -92.786     12.804  -7.247 4.97e-13 ***
y96         -110.059     11.747  -9.369  < 2e-16 ***
y97          -96.286     10.909  -8.827  < 2e-16 ***
y98         -122.834     11.166 -11.001  < 2e-16 ***
y99         -135.183     18.182  -7.435 1.24e-13 ***
---
Signif. codes:  0 бе***бж 0.001 бе**бж 0.01 бе*бж 0.05 бе.бж 0.1 бе бж 1 

Approximate significance of smooth terms:
              edf Est.rank       F  p-value    
s(builarea) 5.728        9 733.118  < 2e-16 ***
s(age)      6.571        9   8.152 4.19e-12 ***
s(fl)       8.758        9  20.564  < 2e-16 ***
s(totfl)    8.196        9   8.401 1.54e-12 ***
s(cbd)      8.915        9  51.787  < 2e-16 ***
s(redl)     7.910        9   4.504 6.45e-06 ***
---
Signif. codes:  0 бе***бж 0.001 бе**бж 0.01 бе*бж 0.05 бе.бж 0.1 бе бж 1 

R-sq.(adj) =  0.661   Deviance explained = 66.5%
GCV score =  41115   Scale est. = 40600     n = 4715
> 


 


 
> Date: Tue, 5 May 2009 08:57:34 -0700
> From: jianghua.liu@shef.ac.uk
> To: r-help@r-project.org
> Subject: Re: [R] smoothing spline in package gam
> 
> 
> Strangely, summary.gam(m1) should give you significance results of parametric
> terms such as ost, wst, park10, sch50, comm, build and suite. These results
> should be located above the summary results for smooth terms.
> Please using summary.gam(m1) to have a look if there is the information you
> need.
> Good luck!
> 
> 
> ╖и ╕╓├¤ wrote:
> > 
> > 
> > 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.
> > 
> > 
> 
> -- 
> View this message in context: http://www.nabble.com/smoothing-spline-in-package-gam-tp23382805p23390437.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> 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.

_________________________________________________________________


	[[alternative HTML version deleted]]


