Date: Fri, 17 Oct 2008 22:02:53 -0400
Reply-To: Peter Flom <peterflomconsulting@mindspring.com>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Peter Flom <peterflomconsulting@MINDSPRING.COM>
Subject: Re: Proc Reg Post-hoc test
Content-Type: text/plain; charset=UTF-8
Aroon <aroon.melwani@GMAIL.COM> wrote
>I am having a problem doing a post-hoc test in Proc Reg.
>
>I began my analysis using proc reg with backward stepwise elimination.
Don't do that. Stepwise is a bad method. See my paper with David Cassell:
Stopping stepwise: Why stepwise selection methods are bad, and what you should use
>The general model equation is:
>
>mercury = year length year*length
>
If this is your model, why are you using any model selection at all? Keep all three terms
>I wanted to test for significantly different regression parameters
>(slopes/intercepts) in 9 different years relative to a reference year.
>The significant slopes and intercepts were used to predict a
>concentration of mercury for a standard sized fish. I then wanted to
>test whether the concentrations predicted for each year was
>significant different from other years.
>
>If i was not using proc reg, but proc glm i usually use lsmeans. But,
>that does not work with proc reg, and i couldn't use proc glm because
>of the stepwise elimination.
>
>I investigated "test" and "mtest" but neither of these test the means.
>
>How do i do this in proc reg?
>
Why are you using REG and not GLM?
With GLM, you can just add a CLASS statement. With REG, you'd have to dummy code each year in a data step, and then include each year in the model.
But, at a more fundamental level, why do you want to do this, rather than test the effect of year? If you think year has nonlinear effects, then a spline model might be what you want
HTH
Peter
Peter L. Flom, PhD
Statistical Consultant
www DOT peterflom DOT com