s-news
[Top] [All Lists]

[S] ANOVA for GAM

To: s-news <s-news@wubios.wustl.edu>
Subject: [S] ANOVA for GAM
From: "Ottar N. Bjornstad" <bjornsta@nceas.ucsb.edu>
Date: Tue, 31 Mar 1998 11:55:01 +0100
Sender: owner-s-news@wubios.wustl.edu
Dear all,

I am confused about the following:
When I make the following model:
tmp1 <- gam(en ~ s(null, df = 2), family = quasi(link = identity, 
variance="mu"))
anova(tmp1, test="F")

I get the following output:

DF for Terms and F-values for Nonparametric Effects

                Df Npar Df   Npar F       Pr(F) 
    (Intercept)  1                             
s(null, df = 2)  1       1 8.617401 0.004920457

which is a test for the significance of the nonlinear component of the fit.

I thought that the result should be equivalent to:
tmp2 <- gam(en ~ null, family = quasi(link = identity, variance="mu"))
anova(tmp1, tmp2, test="F")

Analysis of Deviance Table
Response: en

            Terms Resid. Df Resid. Dev    Test        Df  Deviance F Value      
 Pr(F) 
1 s(null, df = 2)  50.99451   737.3563                                          
      
2            null  52.00000   860.0650 1 vs. 2 -1.005485 -122.7088  7.6353 
0.007856061

Which it clearly isn't.

What is it I have not understood?

Yours gratefully,
Ottar Bjornstad

--------------------------------------------
Ottar N. Bjornstad           http://www.uio.no/~ottarnb/
Until 1st of May: NCEAS, 735 State St., Suite 300, Santa Barbara, CA 93101-3351
Tel. + 1 (805) 892 2511, Fax.  + 1 (805) 892 2510

After that: Div. Zool., Dept. Biol., Univ. of Oslo, Box 1050 Blindern, N-0316 
Oslo, Norway, Tel. + 47 22858370, Fax. + 47 22854605, mailto:ottarnb@bio.uio.no
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>
  • [S] ANOVA for GAM, Ottar N. Bjornstad <=