Odds ratios for interaction between continuous variables

questions concerning analysis/theory using program MARK

Odds ratios for interaction between continuous variables

Postby jCeradini » Tue Jun 16, 2015 1:09 pm

Hi folks,

Primary question: How to estimate odds ratios +/- error for an interaction between two continuous variables?
Purpose: To interpret the effect size of the interaction.

In the interest of full disclosure, I posted this question on Cross Validated last week but have not gotten any replies: http://stats.stackexchange.com/question ... nuous-vari

Results from Huggins robust design:
Code: Select all
                 estimate     se        lcl        ucl
S:(Intercept)  -0.7805226 0.7506744 -2.2518445  0.6907993
S:grass        -4.6189001 2.0282830 -8.5943350 -0.6434653
S:shrub         0.0120384 0.0295291 -0.0458387  0.0699155
S:season2014    0.7729132 0.5820680 -0.3679401  1.9137665
S:grass:shrub   0.1835990 0.0894282  0.0083198  0.3588782

Based on a Cross Validated post (http://stats.stackexchange.com/question ... regression), I calculated the OR for grass when shrub is held constant as:
1) exp(.18)=1.19, exp(-4.62) = 0.0098
2) Grass OR when shrub = 1: 1.19^1 * 0.0098 = 0.01
- Grass OR when shrub = 15: 1.19^15 * 0.0098 = 0.15
- Grass OR when shrub = 30: 1.19^30 * 0.0098 = 2.18

Seems to make sense, but when I apply the same steps to the LCL of the betas, the OR is always essentially zero, which is not what I would expect:
1) exp(0.008) = 1.01, exp(-8.59) = 0.0002
2) When shrub = 1: 1.01^1 * 0.0002 = 0.0002
- When shrub = 30: 1.01^30 * 0.0002 = 0.0003

The OR's are huge when I calculate them for the UCL, e.g.:
When shrub = 30, OR = 25848.

I'm using these probability predictions (+/- 95% CI) from this model to help determine my expectation for the OR's, but maybe that's part of my problem. Based on this plot, I would expect the OR for grass to be at least marginally significantly positive (LCL of OR >=1) at the highest values of shrub cover, but that's far from what the OR's are showing above:
Image

Thanks!
Joe
jCeradini
 
Posts: 72
Joined: Mon Oct 13, 2014 3:53 pm

Re: Odds ratios for interaction between continuous variables

Postby jlaake » Tue Jun 16, 2015 1:25 pm

I'm not entirely sure what you are trying to do. Are you trying to compute something like

S_grass/(1-S_grass)
------------------------
S_shrub/(1-S_shrub)

at different values of shrub and grass? My guess is that you are having problems with conf intervals because you are not considering that the beta's have covariances. You can't work with the conf limits separately but then again I couldn't entirely work out what you were doing.

--jeff
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Odds ratios for interaction between continuous variables

Postby jCeradini » Tue Jun 16, 2015 1:37 pm

Thanks for the reply, Jeff.

I now realize I need a better statement of what I want (the post was getting too long so I tried to keep it simple!).

I want an OR for the effect of a one unit change in grass given some constant value of shrub (and vice-versa). "When shrub cover is held constant at 15%, the odds of survival decrease by XX% (95% CI = ...) for every one unit increase in grass cover".

Do I need to incorporate the beta's covariances in order to do that? If so, any advice on how to do that, or just point me in the right direction?

Thanks.
jCeradini
 
Posts: 72
Joined: Mon Oct 13, 2014 3:53 pm

Re: Odds ratios for interaction between continuous variables

Postby jlaake » Tue Jun 16, 2015 2:15 pm

That helps. So what you want is at a fixed value of s(shrubs)

O= [S(g+1)/(1-S(g+1))]/[S(g)/(1-S(g))]

where g is grass. Write it out the log of the odds ratio in terms of your model and it should become apparent what you want.

log(S(g)/(1-S(g)))= B_0+B_1g+B_2s+B_3gs

log(S(g+1)/(1-S(g+1)))= B_0+B_1(g+1)+B_2s+B_3(g+1)s

log(O)= log(S(g+1)/(1-S(g+1))) - log(S(g)/(1-S(g)))

= B_1+B_3s

var(log(O))= var(B_1)+s^2var(B_3)-2s*cov(B_1,B_3)
conf limit = log(O)-1.96*\sqrt{var(log(O)},log(O)+1.96*\sqrt{var(log(O)}
conf limit for O = exp(conf limit of log(O))

Check my algebra and typing but I believe that is correct.
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Odds ratios for interaction between continuous variables

Postby jCeradini » Tue Jun 16, 2015 3:35 pm

Awesome - thanks Jeff!

Two follow-up questions, if you get a chance.
1) I followed your algebra through to,

log(O) = log(S(g+1)/(1-S(g+1))) - log(S(g)/(1-S(g)))

But I'm wondering how you end with,

= B_1 + B_3s ?

Please forgive my lack of algebra skills :|

2) In the var(log(O)) formula, "s" = the actual value of the shrub covariate?

Thanks!

Thanks!
jCeradini
 
Posts: 72
Joined: Mon Oct 13, 2014 3:53 pm

Re: Odds ratios for interaction between continuous variables

Postby jlaake » Tue Jun 16, 2015 4:25 pm

Read it carefully. First line defines s as shrubs. Yes it is whatever value you set.

With regards to the algebra, the next 2 equations gave the 2 values on the right hand side and once you subtract them you get the result by cancelling terms in common. It leaves B_1+B_3s

log(S(g+1)/(1-S(g+1)))-log(S(g)/(1-S(g)))= B_0+B_1(g+1)+B_2s+B_3(g+1)s - (B_0+B_1g+B_2s+B_3gs)
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Odds ratios for interaction between continuous variables

Postby jCeradini » Tue Jun 16, 2015 4:41 pm

Thanks for the clarification!

Joe
jCeradini
 
Posts: 72
Joined: Mon Oct 13, 2014 3:53 pm

Re: Odds ratios for interaction between continuous variables

Postby cooch » Wed Jun 17, 2015 2:13 pm

As a quick addendum to Jeff's nicely articulated reply:

1\ there is a brief section on log-odds ratios, and how they relate to beta estimates from a fitted linear model, effect sizes and the like, in Chapter 6 -- section 6.13

2\ for the specifics on the CI calculation, see pp. 71-73 of chapter 6. The 'equation' Jeff presents is based on the first-order Delta approximation to the variance of a difference -- in this case, the difference in log-odds for a unit change in grass cover. This is covered on pp. 71-72, and the derivation of the expression using the Delta method is covered near the end of the -sidebar- starting on p. 72.

In reading through this thread, I realize that the section in Chapter 6 covering log-odds ratios isn't particularly well-motivated -- but the example motivating the original question here provides a nice context. I'll probably steal the gist of the idea and incorporate it into Chapter 6.
cooch
 
Posts: 1652
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University

Re: Odds ratios for interaction between continuous variables

Postby jlaake » Wed Jun 17, 2015 2:31 pm

I'm sure Evan describes this in the book but Evan's reply made me realize something obvious I forgot to mention. My formulas and algebra assume that you are using the logit link. Although I've never done it, I can imagine that you can compute odds ratios with any probability link but they work out simply in terms of the betas with the logit link because of its definition where log[{p/(1-p)}] is a linear function of the parameters.

--jeff
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Odds ratios for interaction between continuous variables

Postby jCeradini » Wed Jun 17, 2015 3:01 pm

Thanks for the comments, Jeff and Evan.

Just to confirm - I am using a logit link in this model...shoulda mentioned that earlier.

Joe
jCeradini
 
Posts: 72
Joined: Mon Oct 13, 2014 3:53 pm

Next

Return to analysis help

Who is online

Users browsing this forum: No registered users and 1 guest

cron