BookmarkSubscribeRSS Feed
StatDave
SAS Super FREQ

See this note that addresses the issue:

http://support.sas.com/kb/37228

H
Pyrite | Level 9 H
Pyrite | Level 9

I just got back from a conference, so I have not had a chance to work on this until this afternoon. I centered the continuous variabe using proc sql and the proc nlmixed then ran.

Per Denham's suggestion, I first requested the model estimates in proc nlmixed (which were exactly the same as the proc logistic).

I have been working on writing the estimates. The continous variable mean was 11, so I place B4*-10 through 30 to get estimates for continuous variable 1-40, however between B4*0 and the B4*1 estimate there seem to be a bigger gap in intergers than between all of the other estimates. Not sure on a way to address that. I will keep working and updating this thread. Thank you all for your help so far.

My next attempts will be to do a ods trace and try to pull these values out to eventually plot. Also, does anyone know how to insert a range or perhaps macro for the integers multiplied to the B4 term.  Writing B4*-10, B4*-9,...,B4*30 for two groupings of estimates takes up quite a bit of line space.

Lastly, StatDave - thanks, Funda had referenced that SAS document in a prior post on this thread. Was there a particular line you were referencing that may help?  Also Bobderr, thanks for all of that scaling code, I ended up centering, which seemed to work - lucky for me, since I was getting a little lost in your code..

StatDave
SAS Super FREQ

The first part of Note 37228 ("Binary Response - Using PROC NLMIXED") shows how it is done using PROC NLMIXED. 

H
Pyrite | Level 9 H
Pyrite | Level 9

Thanks, yes that is the approach I took and I finally got the graph I wanted out of it. Thanks to everyone here. I also had tried the proc genmod approach awhile back. I kept getting very close to a solution, but you all helped me get there and confirm my methods. Once I have some free time I will update this thread giving an overview of what I did.

Thanks again - you all have been very helpful!

P.S., The discrepancy I referenced in my prior post on the values jumpping up quite a bit was just a mis-type in my coding that I was able to clean up.

zk117
Calcite | Level 5

Re: Usage Note 37228: Estimating differences in probabilities with confidence interval

I do not understand why SAS shows the way how to get the difference in probabilities with confidence intervals using NLMIXED  and at the same time you say for proc logistic with ilink: Adding the DIFF option in the LSMEANS statement would estimate the differences in log odds (equivalently, the log odds ratios), not the differences in the probabilities.

I.e. what is the problem to have this differences in probabilities with CIs calculated by proc logistic with ilink diff options?

Please clarify,

Zbig

SteveDenham
Jade | Level 19

The ILINK option applies the inverse of the canonical link to the difference, not to the individual values.  The documentation is pretty clear on this.  To get differences in the probabilities, and an associated CI, you have to go the NLMIXED route, as the probabilities are correlated, so that the standard error requires a covariance term that is not available using LSMEANS / DIFF.  I suppose you could apply a delta method in a DATA step, but in this case, even NLMIXED is an easier route.

Steve Denham

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 20 replies
  • 5523 views
  • 9 likes
  • 6 in conversation