I am very new to SAS and trying to predict probabilities using logistic regression in SAS. I got the code below from SAS Support web site:
data vaso;
length Response $12;
input Volume Rate Response @@;
LogVolume=log(Volume);
LogRate=log(Rate);
datalines;
3.70 0.825 constrict 3.50 1.09 constrict
1.25 2.50 constrict 0.75 1.50 constrict
0.80 3.20 constrict 0.70 3.50 constrict
0.60 0.75 no_constrict 1.10 1.70 no_constrict
0.90 0.75 no_constrict 0.90 0.45 no_constrict
0.80 0.57 no_constrict 0.55 2.75 no_constrict
0.60 3.00 no_constrict 1.40 2.33 constrict
0.75 3.75 constrict 2.30 1.64 constrict
3.20 1.60 constrict 0.85 1.415 constrict
1.70 1.06 no_constrict 1.80 1.80 constrict
0.40 2.00 no_constrict 0.95 1.36 no_constrict
1.35 1.35 no_constrict 1.50 1.36 no_constrict
1.60 1.78 constrict 0.60 1.50 no_constrict
1.80 1.50 constrict 0.95 1.90 no_constrict
1.90 0.95 constrict 1.60 0.40 no_constrict
2.70 0.75 constrict 2.35 0.03 no_constrict
1.10 1.83 no_constrict 1.10 2.20 constrict
1.20 2.00 constrict 0.80 3.33 constrict
0.95 1.90 no_constrict 0.75 1.90 no_constrict
1.30 1.625 constrict
;
ods graphics on;
proc logistic data=vaso PLOTS = (ROC EFFECT);
model Response(event='constrict')=LogRate LogVolume
/ctable pprob=0.5 selection=forward rsquare link=logit expb ;
run;
ods graphics off;
I am wondering how I could predict the probability when I have logVolume= 1.5
and logRate=1.3
. Also, can you please explain what length Response $12
above means?
length
statement is defining how long the character variableResponse
may be (how many characters long a response may be), and defining it at 12 bytes (12 characters). For the rest of your question I'm not sure that's a programming question. You certainly can't run a regression from one data point. If you're asking how to interpret the results of the logistic regression, I'd ask that on Cross Validated as it's not really a programming question.calculate the probability
? Are you meaning you want to obtain the values for the various regression parameters and predict a new value based on those? That's certainly possible, but honestly if you don't know whatlength
means you probably need to learn basic SAS before you do that.