Hi All, I'm using glm() in R to perform Poisson regression, I'm wondering if its possible to get equivalent Type 1 / Type 3 Analysis (similar to one in PROC GENMOD). Thanks, Kim [[alternative HTML version deleted]]
Bill.Venables at csiro.au
2010-Jan-28 03:57 UTC
[R] SAS Type 1 / Type 3 Analysis Equivalent.
Why do you think we speak SAS here? anova(fm, test = "Chisq") will get you a sequential analysis of variance table. library(MASS) dropterm(fm, test = "Chisq") will show you the effect of removing the *non-marginal* terms one at a time. What more does anyone need? Bill Venables CSIRO/CMIS Cleveland Laboratories -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Kim Jung Hwa Sent: Thursday, 28 January 2010 1:44 PM To: r-help at r-project.org Subject: [R] SAS Type 1 / Type 3 Analysis Equivalent. Hi All, I'm using glm() in R to perform Poisson regression, I'm wondering if its possible to get equivalent Type 1 / Type 3 Analysis (similar to one in PROC GENMOD). Thanks, Kim [[alternative HTML version deleted]] ______________________________________________ R-help at 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.
Dear Kim, The standard R function anova() produces sequential ("type I") tests; the Anova() function in the car package can produce "type-III" tests (it performs "type-II" tests by default), but you must be careful with contrast coding if there are terms in the model related by marginality. I hope this helps, John -------------------------------- John Fox Senator William McMaster Professor of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada web: socserv.mcmaster.ca/jfox> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]On> Behalf Of Kim Jung Hwa > Sent: January-27-10 10:44 PM > To: r-help at r-project.org > Subject: [R] SAS Type 1 / Type 3 Analysis Equivalent. > > Hi All, > > I'm using glm() in R to perform Poisson regression, I'm wondering if its > possible to get equivalent Type 1 / Type 3 Analysis (similar to one inPROC> GENMOD). > > Thanks, > Kim > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.