[R] significance of random effect in mgcv gam
Simon Wood
s.wood at bath.ac.uk
Wed Dec 4 10:02:46 CET 2013
> Question. Am I correct that p = .126 above can be taken as the
> p-value associated with the random effect?
- Yes. See
http://biomet.oxfordjournals.org/content/100/4/1005.abstract
for details of the approximate test used.
On 03/12/13 20:09, William Shadish wrote:
> Dear R-helpers,
>
> I would like to test whether a random effect is significant when
> implemented with bs="re" in mgcv gam. For example, if I run:
>
> M3b <- gam(DVY ~ s(SessIDX, fTX, bs = "re") + factor(TX),
> data = PCP,
> family = quasipoisson(link="log"), method="REML")
> summary(M3b,all.p=TRUE)
> gam.vcomp(M3b)
>
> I obtain the the following output:
>
> > summary(M3b,all.p=TRUE)
>
> Family: quasipoisson
> Link function: log
>
> Formula:
> DVY ~ s(SessIDX, fTX, bs = "re") + factor(TX)
>
> Parametric coefficients:
> Estimate Std. Error t value Pr(>|t|)
> (Intercept) 1.3282 0.2244 5.920 2.74e-07 ***
> factor(TX)1 -1.0546 0.7210 -1.463 0.15
> ---
> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
>
> Approximate significance of smooth terms:
> edf Ref.df F p-value
> s(SessIDX,fTX) 1.052 2 1.138 0.126
>
> R-sq.(adj) = 0.388 Deviance explained = 39.5%
> REML score = 37.67 Scale est. = 1.4172 n = 54
> > gam.vcomp(M3b)
>
> Standard deviations and 0.95 confidence intervals:
>
> std.dev lower upper
> s(SessIDX,fTX) 0.07842742 0.01095655 0.5613865
> scale 1.19029872 0.97816911 1.4484316
>
> Rank: 2/2
>
> Question. Am I correct that p = .126 above can be taken as the p-value
> associated with the random effect?
>
> Thanks.
>
> Will Shadish
>
--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603 http://people.bath.ac.uk/sw283
More information about the R-help
mailing list