| To: | s-news@wubios.wustl.edu |
|---|---|
| Subject: | [S] parentheses in interaction terms - details |
| From: | "Isabelle Robichaud" <eir8049@umoncton.ca> |
| Date: | Sat, 23 Jan 1999 13:27:18 +0800 |
| In-reply-to: | <199901221059.SAA18939@cyllene.uwa.edu.au> |
| Reply-to: | eir8049@umoncton.ca |
| Sender: | owner-s-news@wubios.wustl.edu |
|
hello all, Yesterday I posted a message saying I obtained different results whether I put parentheses or not in glm interaction terms. Here are my outputs (terrdens is a continuous variable, year an ordered factor with five levels): > intercept <- glm(resid.deviance~1) > txy <- glm(resid.deviance~terrdens:year) > anova(txy, intercept, test="F") Analysis of Deviance Table Response: resid.deviance Terms Resid.Df Resid.Dev Df 1 terrdens:year 64 12.4338 2 1 69 13.8501 -5 Deviance F Value Pr(F) -1.41632 1.45804 0.215999 > txy2 <- glm(resid.deviance~(terrdens):(year)) > anova(txy2, intercept, test="F") Terms Resid.Df Resid.Dev Df 1 (terrdens):(year) 60 10.4744 2 1 69 13.8501 -9 Deviance F Value Pr(F) -3.37571 2.14855 0.0387868 > txy3 <- glm(resid.deviance~terrdens*year) > anova(txy3, intercept, test="F") Terms Resid.Df Resid.Dev Df 1 terrdens * year 60 10.4744 2 1 69 13.8501 -9 Deviance F Value Pr(F) -3.37571 2.14855 0.0387868 As you can see, (terrdens):(year) is not equal to terrdens:year, but rather to terrdens*year. When I use anova() with only one model at a time, the terms added sequentially (first to last) are: for terrdens:year...NULL, terrdens:year (as expected) for (terrdens):(year)...NULL, year, terrdens:year (?) for terrdens*year...NULL, terrdens, year, terrdens:year (as expected) It is the second model that puzzles me. Any suggestions? Thank you very much. Isabelle Robichaud Departement de biologie Universite de Moncton Moncton NB Canada E1A 3E9 e-mail: eir8049@umoncton.ca ----------------------------------------------------------------------- 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> |
|---|---|---|
| ||
| Previous by Date: | Re: [S] Canonical correlation analysis for prediction?, Alex Cannon |
|---|---|
| Next by Date: | [S] KDD-Cup-98 web site and the data set availability, iparsa |
| Previous by Thread: | Re: [S] parentheses in interaction terms, Charles E. (Ted) Wright |
| Next by Thread: | [S] Graphs in a word document, Karen_Johnson |
| Indexes: | [Date] [Thread] [Top] [All Lists] |