Re: [R] Testing year effect in lm() ***failed first time, sending again
Le mercredi 05 août 2009 à 09:52 -0700, Mark Difford a écrit : Emmanuel, somewhat incomplete help pages : what in h*ll are valid arguments to mcp() beyond Tukey ??? Curently, you'll have to dig in the source to learn that...). Not so: they are clearly stated in ?contrMat. Oops.. I oversaw that. With my apologies, Emmanuel Charpentier __ 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.
Re: [R] Testing year effect in lm() ***failed first time, sending again
Le jeudi 30 juillet 2009 à 16:41 -0600, Mark Na a écrit : Dear R-helpers, I have a linear model with a year effect (year is coded as a factor), i.e. the parameter estimates for each level of my year variable have significant P values (see some output below) and I am interested in testing: a) the overall effect of year; b) the significance of each year vis-a-vis every other year (the model output only tests each year against the baseline year). install.packges(multcomp) help.start() and use the vignettes ! They're good (and are a good complement to somewhat incomplete help pages : what in h*ll are valid arguments to mcp() beyond Tukey ??? Curently, you'll have to dig in the source to learn that...). HTH Emmanuel Charpentier __ 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.
Re: [R] Testing year effect in lm() ***failed first time, sending again
Emmanuel, somewhat incomplete help pages : what in h*ll are valid arguments to mcp() beyond Tukey ??? Curently, you'll have to dig in the source to learn that...). Not so: they are clearly stated in ?contrMat. Regards, Mark. Emmanuel Charpentier-3 wrote: Le jeudi 30 juillet 2009 à 16:41 -0600, Mark Na a écrit : Dear R-helpers, I have a linear model with a year effect (year is coded as a factor), i.e. the parameter estimates for each level of my year variable have significant P values (see some output below) and I am interested in testing: a) the overall effect of year; b) the significance of each year vis-a-vis every other year (the model output only tests each year against the baseline year). install.packges(multcomp) help.start() and use the vignettes ! They're good (and are a good complement to somewhat incomplete help pages : what in h*ll are valid arguments to mcp() beyond Tukey ??? Curently, you'll have to dig in the source to learn that...). HTH Emmanuel Charpentier __ 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/Testing-year-effect-in-lm%28%29-***failed-first-time%2C-sending-again-tp24748526p24832337.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.
[R] Testing year effect in lm() ***failed first time, sending again
Dear R-helpers, I have a linear model with a year effect (year is coded as a factor), i.e. the parameter estimates for each level of my year variable have significant P values (see some output below) and I am interested in testing: a) the overall effect of year; b) the significance of each year vis-a-vis every other year (the model output only tests each year against the baseline year). I'd appreciate any help with how to perform these post-hoc tests in R. Many thanks, Mark Na Call: lm(formula = data$SR.obs ~ log(data$AREA, 10) + data$YEAR, subset = (data$AREA = 14.5)) Residuals: Min 1Q Median 3Q Max -5.3412 -1.3140 0.1108 1.1972 4.3126 Coefficients: Estimate Std. Error t value Pr(|t|) (Intercept) -9.4606 0.6144 -15.399 2e-16 *** log(data$AREA, 10) 3.9261 0.1734 22.644 2e-16 *** data$YEAR20081.0750 0.2854 3.767 0.000211 *** data$YEAR20091.5884 0.3073 5.169 5.18e-07 *** --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 Residual standard error: 1.822 on 226 degrees of freedom Multiple R-squared: 0.6945, Adjusted R-squared: 0.6905 F-statistic: 171.3 on 3 and 226 DF, p-value: 2.2e-16 [1] AIC= 934.557 [[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.