Hello,
I am fitting a GAMPL (logistic) model with binary outcome and two categorical and one continuous predictors. The model reveals a nonlinear effect for the continuous variable, see below. I was wondering what options I have for presenting estimates for this term? I am reporting adjusted odds ratios for the other terms. In the below graph, are the y-axis values log odds? If so, can I output these values with their CI values some how and calculate their odds via exponentiating?
Thanks,
H
Please post your PROC GAMPL code.
I updated the code below from the version I posted a couple of hours ago. Has the same statistical output but now outputs predictions and confidence intervals (Bayesianwise, right). I suppose these latter values can be used to get odds now, but would it be correct to do, say p / 1-p for the predictions and intervals? Thank you for the help.
ODS GRAPHICS ON;
PROC GAMPL DATA=pharm_vanc_2 plots SEED=12345;;
WHERE trough_10 GE 0 and
trough_10 < 3 and
PMA GE 1 and
PMA LE 3;
CLASS PMA (REF='3') /*oldest*/
initial_dose_kg (REF='1') / PARAM=REF;
MODEL trough_10 (EVENT='1')= param(PMA)
param(Initial_dose_kg)
spline(zSCr)
/dist=binary
LINK=logit
SCALE=mle;
ID trough_10
PMA
Initial_dose_kg
ZSCr;
OUTPUT OUT=scoredata predicted
STD
UPPER
LOWER;
RUN;
ODS GRAPHICS OFF;
I'm sorry, but I don't understand what question you are asking.
I suggest you look at the documentation example if you haven't already.
Are you trying to evaluate the model at particular values of the explanatory variables and get estimates of the probability of Event='1' along with confidence intervals? If so, append the scoring observations to the end of the data set and use the missing value trick to obtain the predicted values and CIs in the output data set.
To answer some of your earlier questions:
> are the y-axis values log odds?
No. I believe that the graph shows how the zSCr variable should be transformed to best predict the data. (See the doc examples.) The DF=2.2 says that the transformation is approximately quadratic and not quite cubic. If you wanted to use a parametric model, you could try to fit a cubic transformation of that variable. The wide confidence bands indicate that you shouldn't be very confident that the effect is quadratic/cubic.
> If so, can I output these values with their CI values somehow and calculate their odds via exponentiating?
They are not log odds.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.