turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- PROC LOGISTIC CONTRAST STATEMENTS

Topic Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-21-2018 07:25 PM

Hi everyone,

I am trying to use contrast statements in proc logistic to show estimates at different levels of X, and that the linear relationship between my dependent and independent variable isn’t constant.

I was able to find documentation here:

http://support.sas.com/kb/35/189.html

I just have a few questions:

- How does SAS calculate the estimates at different levels of X with control variables in the model? The example seems to use the formula B0+B1x+B2x2, but when I add control variables to my model the output and results based on the formula don’t match.

- What does the ‘intercept 1’ statement refer to? I assumed it meant setting B0=1 when obtaining the estimates (based on B0+B1x+B2x2), but that doesn’t produce the correct answer.

- Where exactly does the formula B1+B2(2x+1) tie in? I thought it corresponds to the unit change difference between two estimates, where a one unit difference would be B1+B2(2x+1), a two unit difference B1+B2(2x+2), etc. It also seems that way, because in the contrast 'logOdds@11-logOdds10' statement you plug in the final value for (2X+1), although I don’t understand why you then double that for a two-unit increase. The author explains that the difference between the two estimates is simply estimate two minus estimate one, so why then are the final values for (2x+1) incorporated in the code?

Help on any of the questions is greatly appreciated!

Emily

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to epstewart1110

03-21-2018 09:32 PM

1. Can you show your calculations? Control variables cancel each other out because that's not the unit you're increasing or checking for a change so when you subtract the two, they 'disappear'.

log(Odds_{x+1}/Odds_{x}) |
= | LogOdds_{x+1} - LogOdds_{x} |

2. I believe it means that its the intercept*1 which is just the intercept

3. Don't know

TBH I wouldn't bother with Estimate statements.

As it states this is much easier with the ODDSRATIO statement and I'd use that instead.

Beginning in SAS/STAT 9.22 in SAS 9.2 TS2M3, you can do this more easily with the ODDSRATIO statement. Use the AT option to specify the starting value of the range over which the odds ratio should be computed. Include the UNITS statement to specify the amount of change over which the odds ratio should be computed. Without the UNITS statement, the odds ratio estimates the change in odds for a 1 unit increase in the variable. The following statements estimate the change in odds for a change in X from X=3 to X=4. The UNITS statement could be omitted in this case since a 1 unit change is requested.

I'll move this to the Stats forum so someone with better answers can help

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Reeza

03-23-2018 05:23 PM - edited 03-23-2018 05:40 PM

Hi Reeza,

I figured out what was wrong with my calculations...I was dividing the log odds and then exponentiating, rather than exponentiating the log odds to get the odds, and then dividing by the odds to get the odds ratios.

Yea, I think your right...the odds ratio statements are easier. I'm not really sure the utility or advantage of using the estimate statements.

Thanks for your help!

Emily

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to epstewart1110

03-23-2018 05:42 PM

Estimate existed before the ODDSRATIO statement, I think they leave it in for backwards compatibility and it can do some complex estimates that you can't do in others.

I've moved this post to the Stats forum so hopefully that helps. It's under Analytics, SAS Statistical Procedures.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Reeza

03-23-2018 05:24 PM

Also, where can I find the stats forum? Is it under "Find a Community?"