LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (April 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 13 Apr 2006 11:52:14 -0700
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: Proc Logistic- Contrast statements
In-Reply-To:  <200604131756.k3DFMmv3017015@mailgw.cc.uga.edu>
Content-Type: text/plain; charset=iso-8859-1

--- Laurie Bensen <tiggs03@HOTMAIL.COM> wrote:

> I’m running a model in Proc Logistic with a class variable that has > three > levels. I used the contrast statement to compare each pair of levels > (i.e., 1 vs 2, 2 vs 3, 1 vs. 3). However, when I did this there was > a > warning in the log that said “Some rows of the L matrix for the > CONTRAST > statement 'habitat' are linearly dependent. These rows will be > ignored.” > What does this mean? Can I trust the results in the output? > I’ve tried doing this using different coding schemes (specifying > param=glm > and param=effect in the class statement) and get the same warning > both > times. Any advice? Thanks! >

Laurie,

It sounds as if you are not looking at each pair of levels of habitat. To look at each pair of levels of habitat, you would use code such as

contrast "Habitat 1 vs habitat 2" habitat 1 -1 0; contrast "Habitat 1 vs habitat 3" habitat 1 0 -1; contrast "Habitat 2 vs habitat 3" habitat 0 1 -1;

Rather, it sounds as if you are constructing code like

contrast "Compare all habitat pairs" habitat 1 -1 0, habitat 1 0 -1, habitat 0 1 -1;

Note that only a single test statistic is coded here. That test statistic is actually a test for the main effect of CLASSVAR. As such, it will have 2 degrees of freedom. A 2 df test requires 2 linearly independent rows in the contrast coefficient matrix L. But you specify three rows for L. Note that any one row of L can be obtained by adding together the other 2 rows. This is exactly what the note “Some rows of the L matrix for the CONTRAST statement 'habitat' are linearly dependent. These rows will be ignored.” is telling you. You can add the first two rows of L and get the third row. Thus, you do cannot construct a 3 df test - which is what your code would seem to request since you have three rows in your L matrix.

Note that SAS does the right thing and ignores one of the rows of L and then reports the 2 df test for habitat. It also gives you the warning to let you know that the contrast that you constructed may not be what you intended. Since you apparently want three separate pairwise tests and not a test for the main effect of habitat, you need three separate contrast statements as I first coded.

Dale

--------------------------------------- Dale McLerran Fred Hutchinson Cancer Research Center mailto: dmclerra@NO_SPAMfhcrc.org Ph: (206) 667-2926 Fax: (206) 667-5977 ---------------------------------------

__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com


Back to: Top of message | Previous page | Main SAS-L page