| Date: | Tue, 19 Dec 2000 10:33:35 -0500 |
| Reply-To: | "Kilili, Anthony, BMG Direct - Indianapolis"
<Anthony.Kilili@BMGDIRECT.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Kilili, Anthony, BMG Direct - Indianapolis"
<Anthony.Kilili@BMGDIRECT.COM> |
| Subject: | Re: Predicted Probability and Graph |
| Content-Type: | text/plain; charset="iso-8859-1" |
|---|
James:
If you are going to score unknown cases, you may want to save the parameter
estimates in a dataset using the outest option as in:
Proc logistic data=yourdata outest=betas descending;
Model success= x1 x2 x3 x4;
Run;
Then run the data with unknown cases through proc score as in:
Proc Score data=newdata out=scre score=betas type=parms;
Var x1 x2 x3 x4;
Run;
The score= option identifies the location of the parameter estimates, type=
option says that we are using parameter estimates for the linear
combinations. The out= option creates a dataset (scre) with the scores
attached to each case. These scores are actually logits or log(odds of
success) (note the descending option in proc logistic, which means we are
predicting the probability that success=1). The name of the variable that
SAS creates consisting of the logits is likely to be success2 (in version8)
or estimate (in version6, need to check this to make sure). To calculate the
probability of success (P), we need to solve for P from the logit using a
data step as follows:
Data new;
Set scre;
P=1/1+exp(-success2));
Run;
I hope this will help point you in the right direction. It is of course
advisable to read your friendly manual for more info.
Anthony
-----Original Message-----
From: James [mailto:xuj73@HOTMAIL.COM]
Sent: Monday, December 18, 2000 4:56 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Predicted Probability and Graph
Is there anyone who knows how to get the predicted
probability in logit
models? For instance, after I run the proc logistic or
catmod, and if I am
very interested the probability of success corresponding to
specified
levels of X variables, how can I get this probability. In
addition, is
ther anyone who knows how to use these predicted
probabilities to get a
graph to compare, let's say men's probability of voting with
women's across
all levels of education with all other x variables held at
their means. In
addition, if I am interested in the probability of certain
specified levels
of X variables which is out of the range of the sample data,
is there any
statement to get that? Thanks a lot.
James Mu
Dept of Sociology
Indiana University
|