From: raj on 22 Nov 2009 23:57 Hi, I am running a logistic regression with a binary response variable and many binary, continuous predictor variables and a treatment effect in my model. I have 2 treatment groups and i wish to get the "AVERAGE" PREDICTED PROBABILITY FOR EACH TREATMENT GROUP. How can i get it using a sas code.? Any help on this would be highly appreciated? Rj
From: Dirk Nachbar on 23 Nov 2009 08:23 On Nov 23, 4:57 am, raj <rkamalaka...(a)gmail.com> wrote: > Hi, > > I am running a logistic regression with a binary response variable > and many binary, continuous predictor variables and a treatment effect > in my model. I have 2 treatment groups and i wish to get the "AVERAGE" > PREDICTED PROBABILITY FOR EACH TREATMENT GROUP. How can i get it using > a sas code.? Any help on this would be highly appreciated? > > Rj you do proc logistic; model y=x1 x2 treatment; output out=p p=prob; run; proc means; class treatment; var prob; run; Dirk Nachbar
From: Dale McLerran on 24 Nov 2009 00:45 --- On Mon, 11/23/09, Dirk Nachbar <dirknbr(a)GOOGLEMAIL.COM> wrote: > From: Dirk Nachbar <dirknbr(a)GOOGLEMAIL.COM> > Subject: Re: Logistic regression > To: SAS-L(a)LISTSERV.UGA.EDU > Date: Monday, November 23, 2009, 5:23 AM > On Nov 23, 4:57 am, raj <rkamalaka...(a)gmail.com> > wrote: > > Hi, > > > > I am running a logistic regression > with a binary response variable > > and many binary, continuous predictor variables and a > treatment effect > > in my model. I have 2 treatment groups and i wish to > get the "AVERAGE" > > PREDICTED PROBABILITY FOR EACH TREATMENT GROUP. How > can i get it using > > a sas code.? Any help on this would be highly > appreciated? > > > > Rj > > you do > > proc logistic; > model y=x1 x2 treatment; > output out=p p=prob; > run; > > proc means; > class treatment; > var prob; > run; > > Dirk Nachbar > This approach would produce estimates of mean values conditional on the observed predictor variable distribution. That is probably not what is desired. Suppose that the different treatment conditions experienced different distributions of the adjustment variables. Then the predicted probabilities for each treatment condition are based on characteristics of the adjustment variables in addition to the treatment condition itself. Instead, I would suggest using the GLIMMIX procedure and generating least squares means back transformed to the original (inverse link function) scale. The code would be something like proc glimmix data=mydata; class treatment x1 x2; model y(ref=first) = treatment x1 x2 x3 x4 / dist=bin; lsmeans treatment / om ilink; run; Note that the model statement specifies that the first level of the response will be the employed as the reference level meaning that for the binary response, the other level would be the event of interest. The LSMEANS statement indicates that we want mean values for the treatment variable on the inverse link scale and computed at the observed marginal (OM) distribution of the other predictor variables. Dale --------------------------------------- Dale McLerran Fred Hutchinson Cancer Research Center mailto: dmclerra(a)NO_SPAMfhcrc.org Ph: (206) 667-2926 Fax: (206) 667-5977 ---------------------------------------
|
Pages: 1 Prev: 2 PART MODEL Next: A UK news outlet picks up on the SAS vs. WPS suit |