Date: Tue, 16 Jan 2007 09:50:32 -0800
Reply-To: Dale McLerran <stringplayer_2@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Dale McLerran <stringplayer_2@YAHOO.COM>
Subject: Re: problem of parametric trend test
In-Reply-To: <200701160601.l0FN4NCe001236@mailgw.cc.uga.edu>
Content-Type: text/plain; charset=iso-8859-1
--- Ankur Arora <ankur.arora@NAGARRO.COM> wrote:
> Hi All,
>
>
> I want to perform parametric trend test in sas.
>
> Can anybody advise how to perform the parametric trend test in sas.
>
> Thanks in advance.
>
> Thanks
> Ankur
>
Trend tests are generally performed by specifying an appropriate
linear combination vector in a CONTRAST statement. So, that begs
the question "What is an appropriate linear combination vector?"
For a linear trend test, an appropriate linear combination has
a coefficient sum which equals zero. Moreover, the spacing between
levels should be constant. So, if you have a categorical variable
with three levels, then an appropriate linear combination vector
could have coefficients -1, 0, and 1. Notice that the coefficients
sum to zero and are spaced at an interval of 1. If you have a
categorical variable with four levels, then an appropriate linear
combination vector would be -3, -1, 1, 3. Again, the sum of the
coefficients is zero. The spacing between coefficients is 2.
(You could specify coefficients -1.5, -0.5, 0.5, 1.5 which also
sum to zero and which have spacing 1.) I'll let you figure out
what the appropriate contrast coefficients would be if you have
a categorical variable with 5 or more levels.
So, you have determined the appropriate contrast coefficients.
What do you do with them? Most of the regression procedures that
you are likely to be working with (GLM, GENMOD, MIXED, LOGISTIC,
etc.) have a CONTRAST statement where you can construct your
linear trend test. The form of the CONTRAST statement is
CONTRAST <"Label identifying contrast in output">
<effect> <contrast coefficients>;
So, suppose that you have named a variable (effect) A on your
CLASS statement and on the right hand side of your MODEL statement.
Also, let's suppose that variable A has four levels. Then a linear
trend test is obtained as
CONTRAST "Linear trend test for A"
A -3 -1 1 3;
HTH,
Dale
---------------------------------------
Dale McLerran
Fred Hutchinson Cancer Research Center
mailto: dmclerra@NO_SPAMfhcrc.org
Ph: (206) 667-2926
Fax: (206) 667-5977
---------------------------------------
____________________________________________________________________________________
Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/