### option estprob in Proc logistic

by **berthiller_julien** » Sat, 25 Jul 2009 22:01:36 GMT

Hi everyone,
I'm trying to get fitted predicted probability curves using the option
"graphics estprob" in the proc logistic. It is an experimental option
(example 42.7 in the proc logistic of the official SAS documentation
online).
Did anyone ever used it, becausde it does not work at all and it
appeared in red in the editor.
Thanks for your help
Julien

### Re: option estprob in Proc logistic

by **rhigh** » Sat, 25 Jul 2009 23:15:54 GMT

Julien,
It appears that in version 9.2 the statement from 9.1.3 (experimental) has
been replaced with the following code:
ods graphics on;
proc logistic data=Data1 plots(only)=(roc(id=obs) effect);
model disease/n=age / scale=none
clparm=wald
clodds=pl
rsquare;
units age=10;
run;
ods graphics off;
e.g., compare example 51.7 for version 9.2 at:
http://www.**--****.com/
Robin High
UNMC
XXXX@XXXXX.COM
Sent by: "SAS(r) Discussion" < XXXX@XXXXX.COM >
07/24/2009 08:51 AM
Please respond to
XXXX@XXXXX.COM
To
XXXX@XXXXX.COM
cc
Subject
option estprob in Proc logistic
Hi everyone,
I'm trying to get fitted predicted probability curves using the option
"graphics estprob" in the proc logistic. It is an experimental option
(example 42.7 in the proc logistic of the official SAS documentation
online).
Did anyone ever used it, becausde it does not work at all and it
appeared in red in the editor.
Thanks for your help
Julien

### Similar Threads:

1.PROC LOGISTIC options

Hi everyone,
I'm running PROC LOGISTIC and I'm a bit confused by a couple of pieces of code.
Here's my original code: PROC LOGISTIC models probability of a death penalty (event 1).
Names the output coefficient file "scoring_coeff"to be used later. Outroc statement creates a dataset for roc graph,
r squared is requested via rsq, clparm=both provides confidence intervals.
proc logistic data = penalty
outest=scoring_coeff;
model death (event='1')=blackd whitvic serious/ rsq influence
clparm=both
outroc=work._logroc;
run;
I recently saw people use this code in their PROC LOGISTIC:
ctable pprob=.4
I tried including it in my syntax just to see what it does and if I really need it ,so the new code
looks like this:
proc logistic data = penalty
outest=scoring_coeff;
model death (event='1')=blackd whitvic serious/ rsq influence ctable pprob=.4
clparm=both
outroc=work._logroc;
run;
Apparently ctable produces some sort of classificiation table, but to me it looks pretty much the same to the dataset
created by the "outroc" statement. I just wanted to consult the list this is the case before I get rid of it so I'd appreciate if
someone could confirm.
My second question is about "pprob". Just from playing around with different settings, it doesn't look like
this code has any effects on the models coefficients, odds ratios etc. Is that true?
I'm assuming it is only used for classification of cases based on the p value cut off point assigned (i.e. pprob = .4 means that every case that crosses
..4 threshold is classified as "event = 1") and not for coefficient estimation. Can anyone clarify and explain?
Thanks a lot!!

2.proc logistic: exact option

3.logistic regression using proc logistic and proc gemmode.

I am trying to reproduce estimates from proc logistic using proc
genmode (dist = bin) under SAS 8.2 (Unix). Same model, same class
statement but the estimates are different. The same test under SAS 9.2
(PC) gives identical estimates. Could anybody explain this to me?
thanks
David

4.tip PROC Options option=... value define

5.Logistic and Offset option

I am getting confused regarding weighted samples in PROC LOGISTIC and the
use of the OFFSET variable in the model statement to adjust the intercept.
I have a weighted sample where I have weighted up the non-events to reflect
a 50%/50% sample even though the true proportion is, let's say, 8/2
(event/non-event). I specified the OFFSET variable to be log(2000/8000)
and this seems to works well in the sample code below. I cannot find any
thorough documentation on the offset variable and which way it should ve
specified. I only figured this out by trial-and-error, but I like to
have some proof that what I am doing is correct. I have also omitted the
offset option and manually-adjusted the intercept in the code below. Can
anyone tell me if what I am doing is correct, or where I can find more
concrete references to this type of adjustment due to weighting?
Thanks,
Shannon Fair
data logistic;
do i=1 to 10000;
if ranuni(0) <= .2 then y=0;
else y=1;
x=100*ranuni(0)-y*50;
if y=1 then weight=1;
else weight=4;
offset=log(2000/8000); /*proportion of population non-
events to sample non-events*/
output;
end;
run;
proc freq data=logistic;
tables y;
weight weight;
run;
proc logistic data=logistic outest=outest descending;
model y=x;
weight weight;
run;
proc score data=logistic score=outest type=parms out=scored;
var x;
run;
data scored;
set scored;
score=1/(1+exp(-1*y2));
/*manually adjust the intercept to reflect true population*/
score_adjust=1/(1+exp(-1*(y2-log(2000/8000))));
run;
proc univariate data=scored;
var score;
weight weight;
run;
/* overall mean score is around .50 which is the sample event rate */
proc univariate data=scored;
var score_adjust;
run;
/* overall mean score is around .80 which is the population event rate */
/*now let's try to use proc logistic to do this automatically*/
proc logistic data=logistic outest=outest descending;
model y=x / offset=offset ;
weight weight;
run;
proc score data=logistic score=outest type=parms out=scored;
var x;
run;
data scored;
set scored;
score=1/(1+exp(-1*y2));
run;
proc univariate data=scored;
var score;
run;
/* overall mean score is around .80 which is the population event rate */

6. Difference between proc probit and proc logistic (with link=probit)

7. PROC LOGISTIC and Proc Score

8. proc discrim vs. proc logistic or else