LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 4 Nov 2004 18:46:43 -0600
Reply-To:   Robin High <robinh@UNLSERVE.UNL.EDU>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Robin High <robinh@UNLSERVE.UNL.EDU>
Subject:   Re: Proc Logistic Question
Comments:   To: K Fernandes <kafernan@UWATERLOO.CA>
In-Reply-To:   <000001c4c28d$def768f0$42f76181@CONCEPTUALNESS>
Content-Type:   TEXT/PLAIN; charset=US-ASCII

On Thu, 4 Nov 2004, K Fernandes wrote:

> Suppose I have a dataset called Summary1 which is this: > > Rand Sim_No Cen_Num x m y > 1 1 1 0 1 0 > 1 1 1 1 4 0 > 1 1 2 0 3 1 > 1 1 2 1 4 2 > 1 1 3 0 5 1 > 1 1 3 1 4 2 > 1 2 1 0 2 1 > 1 2 1 1 1 1 > 1 2 2 0 1 0 > 1 2 2 1 3 0 > 1 2 3 0 3 3 > 1 2 3 1 3 2 > > (My actual dataset has more than one value in the Rand column (i.e. 1 to > 5) and more than two values in the Sim_No column (i.e. 1-3). >

<snip>

> > For 1), I tried this: > proc logistic data = Summary1; > model y/m = x ; > ods output ParameterEstimates = BetaEsts; > by Rand Sim_No; > run; >

> However, the estimates I get for 1) does not correspond to estimates I > get in R, so I think there is a problem with my statements. Can anyone > spot it?

Kim

LOGISTIC applies 'effects' coding by default to the coefficients. Even though x is 0/1 you might want to try it with the CLASS statement with the 'glm' (or 'ref') option for param= as indicated below. Also, the sorted order of the data (i.e. levels of x within the ByVar levels) will determine the sign of the coefficient of x.

try....

PROC SORT DATA=Summary1; BY Rand Sim_No x;

proc logistic data = Summary1; CLASS x / param=glm order=data; model y/m = x Cen_Num; by Rand Sim_No; run;

or......

PROC SORT DATA=Summary1; BY Rand Sim_No descending x;

proc logistic data = Summary1; CLASS x / param = glm order=data; model y/m = x Cen_Num; by Rand Sim_No; run;

Robin High Univ. of Oregon


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