Discussion:
GLIMMIX - Obtain Adjusted Odds Ratio?
(too old to reply)
Ryan
2008-08-02 23:45:22 UTC
Permalink
Hi all,

I posted something similar a while back, and I'm very grateful for the
help I received. I will make my follow-up questions brief...

Here's the code:

proc glimmix data=mydata;
class disease_indic cityID personID;
model box1 = disease_indicator disease_indicator*x1 / s
dist=binary noint;
random intercept / subject=cityID
type=sp(pow)(latitude longitude)
group=region;
random intercept / subject=personID
run;

Participants responded whether they had contracted disease A and/or
disease B. As a result, I'm dealing with a multvariate response. The
city-level covariate varies across diseases (and cities). There are
two random intercepts to account for both forms of covariances.

Question 1: Would asking for the "Odds Ratio" in the model statement
give me the adjusted odds ratio for disease_indicator-----"e.g. the
odds of contracting disease A is two times the odds of contracting
disase B, after adjusting for the effect of x1 on *each* of the
disease rates."

Question 2: Would there ever be a circumstance in which the main
effect of x1 should be included in the model statement or perhaps even
replace the interaction term? My impression, after doing some research
and giving this some thought, would be "no."

Absolutely any thoughts and/or references would be greatly
appreciated!
Kevin Viel
2008-08-06 14:23:46 UTC
Permalink
Post by Ryan
Hi all,
I posted something similar a while back, and I'm very grateful for the
help I received. I will make my follow-up questions brief...
proc glimmix data=mydata;
class disease_indic cityID personID;
model box1 = disease_indicator disease_indicator*x1 / s
dist=binary noint;
random intercept / subject=cityID
type=sp(pow)(latitude longitude)
group=region;
random intercept / subject=personID
run;
Participants responded whether they had contracted disease A and/or
disease B. As a result, I'm dealing with a multvariate response. The
city-level covariate varies across diseases (and cities). There are
two random intercepts to account for both forms of covariances.
Question 1: Would asking for the "Odds Ratio" in the model statement
give me the adjusted odds ratio for disease_indicator-----"e.g. the
odds of contracting disease A is two times the odds of contracting
disase B, after adjusting for the effect of x1 on *each* of the
disease rates."
Whether or not GLIMMIX can handle multivariate outcomes, I am not sure.
However, this question does not seem to reflect the model, unless the
values of BOX1 reflect the four combinations of dichotomous outcomes for A
and B. I find it useful to write out the OR:

exp[ B1(disease_indicator_1 - disease_indicator_0) + B2
(disease_indicator_1*x1_1 - disease_indicator_0*x1_0)]

Typically, we report ORs for certain levels, say, x_1 = x_0 or
disease_indicator_1 = disease_indicator_0, which simplifies the equations,
especially if we use 0/1 values.
Post by Ryan
Question 2: Would there ever be a circumstance in which the main
effect of x1 should be included in the model statement or perhaps even
replace the interaction term? My impression, after doing some research
and giving this some thought, would be "no."
Actually, if I included interactions with a variable (x1*race) or higher
order terms (x1^2), I *always* include the lower ordered terms. The
underlying principle is hierarchical well-formulated models and the subject
of a dissertation defense in my first few years of school. I cannot
profess to be able to defend it, though.

What guides your impression? Along those lines, what causes you to omit
the intercept (NOINT)?

Both of these can be formally test using LRT, as the results set of models
are nested. That is, if GLIMMIX yields the loglikelihood...


HTH,

Kevin
Post by Ryan
Absolutely any thoughts and/or references would be greatly
appreciated!
O***@medizin.uni-halle.de
2008-08-07 06:39:46 UTC
Permalink
Post by Ryan
Hi all,
I posted something similar a while back, and I'm very grateful for the
help I received. I will make my follow-up questions brief...
   proc glimmix data=mydata;
     class disease_indic cityID personID;
     model box1 = disease_indicator disease_indicator*x1 / s
dist=binary noint;
     random intercept / subject=cityID
                        type=sp(pow)(latitude longitude)
                        group=region;
     random intercept / subject=personID
   run;
Participants responded whether they had contracted disease A and/or
disease B. As a result, I'm dealing with a multvariate response. The
city-level covariate varies across diseases (and cities). There are
two random intercepts to account for both forms of covariances.
Question 1: Would asking for the "Odds Ratio" in the model statement
give me the adjusted odds ratio for disease_indicator-----"e.g. the
odds of contracting disease A is two times the odds of contracting
disase B, after adjusting for the effect of x1 on *each* of the
disease rates."
Question 2: Would there ever be a circumstance in which the main
effect of x1 should be included in the model statement or perhaps even
replace the interaction term? My impression, after doing some research
and giving this some thought, would be "no."
Absolutely any thoughts and/or references would be greatly
appreciated!
Dear Ryan,
S.P. Wright (Multivariate Analysis Using the MIXED Procedure.
Proceedings of SUGI 23, 1998, Paper 229) showed how to code a mixed
model with a multivariate response, and you can use this trick also
for PRC GLIMMIX. Thiébaut R. et al. (Bivariate linear mixed models
using SAS proc MIXED. Computer Methods and Programs in Biomedicine 69,
2002, 249-256.) gave another example.

To your questions:
Q1: I haven't seen your data, but I think the ODDSRATIO statement (or,
equivalently, exponentiating the estimate for disease_indicator*x1)
will NOT compare the two diseases but will give you an estimate of the
effect of an unit change of x1 on the response. And (as you included
the interaction disease_indicator*x1 in the model, which is correct)
you will get two such estimates, one for each disease.
Q2: You would never need the main effect of x1 in this model, and also
the "NOINT" statement is mandatory here.

Hope that helps,
Oliver
Ryan
2008-08-09 14:55:16 UTC
Permalink
Post by Ryan
Hi all,
I posted something similar a while back, and I'm very grateful for the
help I received. I will make my follow-up questions brief...
   procglimmixdata=mydata;
     class disease_indic cityID personID;
     model box1 = disease_indicator disease_indicator*x1 / s
dist=binary noint;
     random intercept / subject=cityID
                        type=sp(pow)(latitude longitude)
                        group=region;
     random intercept / subject=personID
   run;
Participants responded whether they had contracted disease A and/or
disease B. As a result, I'm dealing with a multvariate response. The
city-level covariate varies across diseases (and cities). There are
two random intercepts to account for both forms of covariances.
Question 1: Would asking for the "Odds Ratio" in the model statement
give me the adjusted odds ratio for disease_indicator-----"e.g. the
odds of contracting disease A is two times the odds of contracting
disase B, after adjusting for the effect of x1 on *each* of the
disease rates."
Question 2: Would there ever be a circumstance in which the main
effect of x1 should be included in the model statement or perhaps even
replace the interaction term? My impression, after doing some research
and giving this some thought, would be "no."
Absolutely any thoughts and/or references would be greatly
appreciated!
DearRyan,
S.P. Wright (Multivariate Analysis Using the MIXED Procedure.
Proceedings of SUGI 23, 1998, Paper 229) showed how to code a mixed
model with a multivariate response, and you can use this trick also
for PRCGLIMMIX.  Thiébaut R. et al. (Bivariate linear mixed models
using SAS proc MIXED. Computer Methods and Programs in Biomedicine 69,
2002, 249-256.) gave another example.
Q1: I haven't seen your data, but I think the ODDSRATIO statement (or,
equivalently, exponentiating the estimate for disease_indicator*x1)
will NOT compare the two diseases but will give you an estimate of the
effect of an unit change of x1 on the response. And (as you included
the interaction disease_indicator*x1 in the model, which is correct)
you will get two such estimates, one for each disease.
Q2: You would never need the main effect of x1 in this model, and also
the "NOINT" statement is mandatory here.
Hope that helps,
Oliver- Hide quoted text -
- Show quoted text -
Dear Oliver,

Thank you for responding! I'm sorry for taking so long to reply. I
didn't realize anyone responded! My primary goal is to obtian the odds
of contracting disease 1 to the odds of contracting disease 2, after
controlling for x1.

I completely understand, and agree that disease_indicator*x1 will not
provide me with the odds ratio of interest. However, if I requested
the odds ratio for the estimates, I should obtain an odds ratio
for:"disease_indic." Would this odds ratio not tell me the odds of
contracing one disease to the odds of contracting another disease,
after controlling for the effects of the covariate for each disease.
If not, then how would you obtain this odds ratio. The whole point of
this analysis is to simply compare the odds of contracting one disease
to the odds of contracting another one, AFTER evening the playing
field with repsect to x1. I'd really love to hear your thoughts, if
you have the time to respond.

Ryan
Ryan
2008-08-09 15:44:11 UTC
Permalink
Post by Ryan
Post by Ryan
Hi all,
I posted something similar a while back, and I'm very grateful for the
help I received. I will make my follow-up questions brief...
   procglimmixdata=mydata;
     class disease_indic cityID personID;
     model box1 = disease_indicator disease_indicator*x1 / s
dist=binary noint;
     random intercept / subject=cityID
                        type=sp(pow)(latitude longitude)
                        group=region;
     random intercept / subject=personID
   run;
Participants responded whether they had contracted disease A and/or
disease B. As a result, I'm dealing with a multvariate response. The
city-level covariate varies across diseases (and cities). There are
two random intercepts to account for both forms of covariances.
Question 1: Would asking for the "Odds Ratio" in the model statement
give me the adjusted odds ratio for disease_indicator-----"e.g. the
odds of contracting disease A is two times the odds of contracting
disase B, after adjusting for the effect of x1 on *each* of the
disease rates."
Question 2: Would there ever be a circumstance in which the main
effect of x1 should be included in the model statement or perhaps even
replace the interaction term? My impression, after doing some research
and giving this some thought, would be "no."
Absolutely any thoughts and/or references would be greatly
appreciated!
DearRyan,
S.P. Wright (Multivariate Analysis Using the MIXED Procedure.
Proceedings of SUGI 23, 1998, Paper 229) showed how to code a mixed
model with a multivariate response, and you can use this trick also
for PRCGLIMMIX.  Thiébaut R. et al. (Bivariate linear mixed models
using SAS proc MIXED. Computer Methods and Programs in Biomedicine 69,
2002, 249-256.) gave another example.
Q1: I haven't seen your data, but I think the ODDSRATIO statement (or,
equivalently, exponentiating the estimate for disease_indicator*x1)
will NOT compare the two diseases but will give you an estimate of the
effect of an unit change of x1 on the response. And (as you included
the interaction disease_indicator*x1 in the model, which is correct)
you will get two such estimates, one for each disease.
Q2: You would never need the main effect of x1 in this model, and also
the "NOINT" statement is mandatory here.
Hope that helps,
Oliver- Hide quoted text -
- Show quoted text -
Dear Oliver,
Thank you for responding! I'm sorry for taking so long to reply. I
didn't realize anyone responded! My primary goal is to obtian the odds
of contracting disease 1 to the odds of contracting disease 2, after
controlling for x1.
I completely understand, and agree that disease_indicator*x1 will not
provide me with the odds ratio of interest. However, if I requested
the odds ratio for the estimates, I should obtain an odds ratio
for:"disease_indic." Would this odds ratio not tell me the odds of
contracing one disease to the odds of contracting another disease,
after controlling for the effects of the covariate for each disease.
If not, then how would you obtain this odds ratio. The whole point of
this analysis is to simply compare the odds of contracting one disease
to the odds of contracting another one, AFTER evening the playing
field with repsect to x1. I'd really love to hear your thoughts, if
you have the time to respond.
Ryan
Sorry for the double post, but to be clear...
With regard to parameter estimates I expect to obtain four
estimates:
disease_indicator=1
disease_indicator=2
x1*dis=1
x1*dis=2

I expect to answer my question by

Exp(disease_indicator=1-disease_indicator=2)

I should get the same estimate if I envoke the odds ratio estimates.

Thanks again!
O***@medizin.uni-halle.de
2008-08-11 07:12:20 UTC
Permalink
Post by Ryan
Post by Ryan
Post by Ryan
Hi all,
I posted something similar a while back, and I'm very grateful for the
help I received. I will make my follow-up questions brief...
   procglimmixdata=mydata;
     class disease_indic cityID personID;
     model box1 = disease_indicator disease_indicator*x1 / s
dist=binary noint;
     random intercept / subject=cityID
                        type=sp(pow)(latitude longitude)
                        group=region;
     random intercept / subject=personID
   run;
Participants responded whether they had contracted disease A and/or
disease B. As a result, I'm dealing with a multvariate response. The
city-level covariate varies across diseases (and cities). There are
two random intercepts to account for both forms of covariances.
Question 1: Would asking for the "Odds Ratio" in the model statement
give me the adjusted odds ratio for disease_indicator-----"e.g. the
odds of contracting disease A is two times the odds of contracting
disase B, after adjusting for the effect of x1 on *each* of the
disease rates."
Question 2: Would there ever be a circumstance in which the main
effect of x1 should be included in the model statement or perhaps even
replace the interaction term? My impression, after doing some research
and giving this some thought, would be "no."
Absolutely any thoughts and/or references would be greatly
appreciated!
DearRyan,
S.P. Wright (Multivariate Analysis Using the MIXED Procedure.
Proceedings of SUGI 23, 1998, Paper 229) showed how to code a mixed
model with a multivariate response, and you can use this trick also
for PRCGLIMMIX.  Thiébaut R. et al. (Bivariate linear mixed models
using SAS proc MIXED. Computer Methods and Programs in Biomedicine 69,
2002, 249-256.) gave another example.
Q1: I haven't seen your data, but I think the ODDSRATIO statement (or,
equivalently, exponentiating the estimate for disease_indicator*x1)
will NOT compare the two diseases but will give you an estimate of the
effect of an unit change of x1 on the response. And (as you included
the interaction disease_indicator*x1 in the model, which is correct)
you will get two such estimates, one for each disease.
Q2: You would never need the main effect of x1 in this model, and also
the "NOINT" statement is mandatory here.
Hope that helps,
Oliver- Hide quoted text -
- Show quoted text -
Dear Oliver,
Thank you for responding! I'm sorry for taking so long to reply. I
didn't realize anyone responded! My primary goal is to obtian the odds
of contracting disease 1 to the odds of contracting disease 2, after
controlling for x1.
I completely understand, and agree that disease_indicator*x1 will not
provide me with the odds ratio of interest. However, if I requested
the odds ratio for the estimates, I should obtain an odds ratio
for:"disease_indic." Would this odds ratio not tell me the odds of
contracing one disease to the odds of contracting another disease,
after controlling for the effects of the covariate for each disease.
If not, then how would you obtain this odds ratio. The whole point of
this analysis is to simply compare the odds of contracting one disease
to the odds of contracting another one, AFTER evening the playing
field with repsect to x1. I'd really love to hear your thoughts, if
you have the time to respond.
Ryan
Sorry for the double post, but to be clear...
With regard to parameter estimates I expect to obtain four
disease_indicator=1
disease_indicator=2
x1*dis=1
x1*dis=2
I expect to answer my question by
Exp(disease_indicator=1-disease_indicator=2)
I should get the same estimate if I envoke the odds ratio estimates.
Thanks again!- Zitierten Text ausblenden -
- Zitierten Text anzeigen -
Hello Ryan,
I think I got your point.
However, I would approach your problem in a slightly different (and a
more elementary) way. You won't need the ODDSRATIO statement for this.

Define p1 as the probability of response for disease 1, and p2 the
corresponding response probability for disease 2. What you want to
have is the odds of the two probabilities, that is, ORp1p2 = p1*(1-p2)/
p2*(1-p1). Right?

If yes, then p1 and p2 can easily calculated by the standard
expit(=inverse logit)-transformation

p1=exp(disease_indicator=1 + x1*dis)/ (1 + exp(disease_indicator=1 +
x1*dis)) and
p2=exp(disease_indicator=2 + x2*dis)/ (1 + exp(disease_indicator=2 +
x2*dis)).

where disease_indicator=1, x1*dis, disease_indicator=2, x2*dis are
the estimated parameters from the model. Plugging these estimates in
to the formula for ORp1p2 will give you what you want.

Unfortunately, you won't get no confidence intervals for your ORp1p2
that way. In a similar problem, I once used the multivariate delta
method for getting confidence intervals for a nonlinear combination of
GLIMMIX parameters. After a while of reading statistical textbooks I
succeeded, but that was really hard stuff ;-))

Hope that helps,
Oliver
Ryan
2008-08-11 15:19:11 UTC
Permalink
Post by Ryan
Post by Ryan
Post by Ryan
Hi all,
I posted something similar a while back, and I'm very grateful for the
help I received. I will make my follow-up questions brief...
   procglimmixdata=mydata;
     class disease_indic cityID personID;
     model box1 = disease_indicator disease_indicator*x1 / s
dist=binary noint;
     random intercept / subject=cityID
                        type=sp(pow)(latitude longitude)
                        group=region;
     random intercept / subject=personID
   run;
Participants responded whether they had contracted disease A and/or
disease B. As a result, I'm dealing with a multvariate response. The
city-level covariate varies across diseases (and cities). There are
two random intercepts to account for both forms of covariances.
Question 1: Would asking for the "Odds Ratio" in the model statement
give me the adjusted odds ratio for disease_indicator-----"e.g. the
odds of contracting disease A is two times the odds of contracting
disase B, after adjusting for the effect of x1 on *each* of the
disease rates."
Question 2: Would there ever be a circumstance in which the main
effect of x1 should be included in the model statement or perhaps even
replace the interaction term? My impression, after doing some research
and giving this some thought, would be "no."
Absolutely any thoughts and/or references would be greatly
appreciated!
DearRyan,
S.P. Wright (Multivariate Analysis Using the MIXED Procedure.
Proceedings of SUGI 23, 1998, Paper 229) showed how to code a mixed
model with a multivariate response, and you can use this trick also
for PRCGLIMMIX.  Thiébaut R. et al. (Bivariate linear mixed models
using SAS proc MIXED. Computer Methods and Programs in Biomedicine 69,
2002, 249-256.) gave another example.
Q1: I haven't seen your data, but I think the ODDSRATIO statement (or,
equivalently, exponentiating the estimate for disease_indicator*x1)
will NOT compare the two diseases but will give you an estimate of the
effect of an unit change of x1 on the response. And (as you included
the interaction disease_indicator*x1 in the model, which is correct)
you will get two such estimates, one for each disease.
Q2: You would never need the main effect of x1 in this model, and also
the "NOINT" statement is mandatory here.
Hope that helps,
Oliver- Hide quoted text -
- Show quoted text -
Dear Oliver,
Thank you for responding! I'm sorry for taking so long to reply. I
didn't realize anyone responded! My primary goal is to obtian the odds
of contracting disease 1 to the odds of contracting disease 2, after
controlling for x1.
I completely understand, and agree that disease_indicator*x1 will not
provide me with the odds ratio of interest. However, if I requested
the odds ratio for the estimates, I should obtain an odds ratio
for:"disease_indic." Would this odds ratio not tell me the odds of
contracing one disease to the odds of contracting another disease,
after controlling for the effects of the covariate for each disease.
If not, then how would you obtain this odds ratio. The whole point of
this analysis is to simply compare the odds of contracting one disease
to the odds of contracting another one, AFTER evening the playing
field with repsect to x1. I'd really love to hear your thoughts, if
you have the time to respond.
Ryan
Sorry for the double post, but to be clear...
With regard to parameter estimates I expect to obtain four
disease_indicator=1
disease_indicator=2
x1*dis=1
x1*dis=2
I expect to answer my question by
Exp(disease_indicator=1-disease_indicator=2)
I should get the same estimate if I envoke the odds ratio estimates.
Thanks again!- Zitierten Text ausblenden -
- Zitierten Text anzeigen -
HelloRyan,
I think I got your point.
However, I would approach your problem in a slightly different (and a
more elementary) way. You won't need the ODDSRATIO statement for this.
Define p1 as the probability of response for disease 1, and p2 the
corresponding response probability for disease 2. What you want to
have is the odds of the two probabilities, that is, ORp1p2 = p1*(1-p2)/
p2*(1-p1). Right?
If yes, then p1 and p2 can easily calculated by the standard
expit(=inverse logit)-transformation
p1=exp(disease_indicator=1 + x1*dis)/ (1 + exp(disease_indicator=1 +
x1*dis)) and
p2=exp(disease_indicator=2 + x2*dis)/ (1 + exp(disease_indicator=2 +
x2*dis)).
where disease_indicator=1,  x1*dis, disease_indicator=2, x2*dis are
the estimated parameters from the model. Plugging these estimates in
to the formula for ORp1p2 will give you what you want.
Unfortunately, you won't get no confidence intervals for your ORp1p2
that way. In a similar problem, I once used the multivariate delta
method for getting confidence intervals for a nonlinear combination ofGLIMMIXparameters. After a while of reading statistical textbooks I
succeeded, but that was really hard stuff ;-))
Hope that helps,
Oliver- Hide quoted text -
- Show quoted text -
Dear Oliver,

Thank you so much! I've had this burning question and just could not
get it answered. I will look into the multivariate delta method for
the CIs, understanding that it will be a very uphill battle to figure
out!

Forever Indebted,

Ryan
Ryan
2008-08-14 12:51:15 UTC
Permalink
Post by O***@medizin.uni-halle.de
Post by Ryan
Post by Ryan
Post by Ryan
Hi all,
I posted something similar a while back, and I'm very grateful for the
help I received. I will make my follow-up questions brief...
   procglimmixdata=mydata;
     class disease_indic cityID personID;
     model box1 = disease_indicator disease_indicator*x1 / s
dist=binary noint;
     random intercept / subject=cityID
                        type=sp(pow)(latitude longitude)
                        group=region;
     random intercept / subject=personID
   run;
Participants responded whether they had contracted disease A and/or
disease B. As a result, I'm dealing with a multvariate response. The
city-level covariate varies across diseases (and cities). There are
two random intercepts to account for both forms of covariances.
Question 1: Would asking for the "Odds Ratio" in the model statement
give me the adjusted odds ratio for disease_indicator-----"e.g. the
odds of contracting disease A is two times the odds of contracting
disase B, after adjusting for the effect of x1 on *each* of the
disease rates."
Question 2: Would there ever be a circumstance in which the main
effect of x1 should be included in the model statement or perhaps even
replace the interaction term? My impression, after doing some research
and giving this some thought, would be "no."
Absolutely any thoughts and/or references would be greatly
appreciated!
DearRyan,
S.P. Wright (Multivariate Analysis Using the MIXED Procedure.
Proceedings of SUGI 23, 1998, Paper 229) showed how to code a mixed
model with a multivariate response, and you can use this trick also
for PRCGLIMMIX.  Thiébaut R. et al. (Bivariate linear mixed models
using SAS proc MIXED. Computer Methods and Programs in Biomedicine 69,
2002, 249-256.) gave another example.
Q1: I haven't seen your data, but I think the ODDSRATIO statement (or,
equivalently, exponentiating the estimate for disease_indicator*x1)
will NOT compare the two diseases but will give you an estimate of the
effect of an unit change of x1 on the response. And (as you included
the interaction disease_indicator*x1 in the model, which is correct)
you will get two such estimates, one for each disease.
Q2: You would never need the main effect of x1 in this model, and also
the "NOINT" statement is mandatory here.
Hope that helps,
Oliver- Hide quoted text -
- Show quoted text -
Dear Oliver,
Thank you for responding! I'm sorry for taking so long to reply. I
didn't realize anyone responded! My primary goal is to obtian the odds
of contracting disease 1 to the odds of contracting disease 2, after
controlling for x1.
I completely understand, and agree that disease_indicator*x1 will not
provide me with the odds ratio of interest. However, if I requested
the odds ratio for the estimates, I should obtain an odds ratio
for:"disease_indic." Would this odds ratio not tell me the odds of
contracing one disease to the odds of contracting another disease,
after controlling for the effects of the covariate for each disease.
If not, then how would you obtain this odds ratio. The whole point of
this analysis is to simply compare the odds of contracting one disease
to the odds of contracting another one, AFTER evening the playing
field with repsect to x1. I'd really love to hear your thoughts, if
you have the time to respond.
Ryan
Sorry for the double post, but to be clear...
With regard to parameter estimates I expect to obtain four
disease_indicator=1
disease_indicator=2
x1*dis=1
x1*dis=2
I expect to answer my question by
Exp(disease_indicator=1-disease_indicator=2)
I should get the same estimate if I envoke the odds ratio estimates.
Thanks again!- Zitierten Text ausblenden -
- Zitierten Text anzeigen -
Hello Ryan,
I think I got your point.
However, I would approach your problem in a slightly different (and a
more elementary) way. You won't need the ODDSRATIO statement for this.
Define p1 as the probability of response for disease 1, and p2 the
corresponding response probability for disease 2. What you want to
have is the odds of the two probabilities, that is, ORp1p2 = p1*(1-p2)/
p2*(1-p1). Right?
If yes, then p1 and p2 can easily calculated by the standard
expit(=inverse logit)-transformation
p1=exp(disease_indicator=1 + x1*dis)/ (1 + exp(disease_indicator=1 +
x1*dis)) and
p2=exp(disease_indicator=2 + x2*dis)/ (1 + exp(disease_indicator=2 +
x2*dis)).
where disease_indicator=1,  x1*dis, disease_indicator=2, x2*dis are
the estimated parameters from the model. Plugging these estimates in
to the formula for ORp1p2 will give you what you want.
Unfortunately, you won't get no confidence intervals for your ORp1p2
that way. In a similar problem, I once used the multivariate delta
method for getting confidence intervals for a nonlinear combination of
GLIMMIX parameters. After a while of reading statistical textbooks I
succeeded, but that was really hard stuff ;-))
Hope that helps,
Oliver- Hide quoted text -
- Show quoted text -
Hi Oliver,

I've been searching and searching for an example of the multivariate
delta method to compute the CIs for ORp1p2, and I'm REALLY stuck. I
don't want to take up any more of your time. You've been such a
wonderful help. I was just wondering if you might have some basic tips
and/or references that might help me move this along? Again, I'm sorry
for disturbing you, and completely understand if you're too busy to
respond.

Sincerely

Ryan
O***@medizin.uni-halle.de
2008-08-14 14:47:22 UTC
Permalink
Post by Ryan
Post by O***@medizin.uni-halle.de
Post by Ryan
Post by Ryan
Post by Ryan
Hi all,
I posted something similar a while back, and I'm very grateful for the
help I received. I will make my follow-up questions brief...
   procglimmixdata=mydata;
     class disease_indic cityID personID;
     model box1 = disease_indicator disease_indicator*x1 / s
dist=binary noint;
     random intercept / subject=cityID
                        type=sp(pow)(latitude longitude)
                        group=region;
     random intercept / subject=personID
   run;
Participants responded whether they had contracted disease A and/or
disease B. As a result, I'm dealing with a multvariate response. The
city-level covariate varies across diseases (and cities). There are
two random intercepts to account for both forms of covariances.
Question 1: Would asking for the "Odds Ratio" in the model statement
give me the adjusted odds ratio for disease_indicator-----"e.g. the
odds of contracting disease A is two times the odds of contracting
disase B, after adjusting for the effect of x1 on *each* of the
disease rates."
Question 2: Would there ever be a circumstance in which the main
effect of x1 should be included in the model statement or perhaps even
replace the interaction term? My impression, after doing some research
and giving this some thought, would be "no."
Absolutely any thoughts and/or references would be greatly
appreciated!
DearRyan,
S.P. Wright (Multivariate Analysis Using the MIXED Procedure.
Proceedings of SUGI 23, 1998, Paper 229) showed how to code a mixed
model with a multivariate response, and you can use this trick also
for PRCGLIMMIX.  Thiébaut R. et al. (Bivariate linear mixed models
using SAS proc MIXED. Computer Methods and Programs in Biomedicine 69,
2002, 249-256.) gave another example.
Q1: I haven't seen your data, but I think the ODDSRATIO statement (or,
equivalently, exponentiating the estimate for disease_indicator*x1)
will NOT compare the two diseases but will give you an estimate of the
effect of an unit change of x1 on the response. And (as you included
the interaction disease_indicator*x1 in the model, which is correct)
you will get two such estimates, one for each disease.
Q2: You would never need the main effect of x1 in this model, and also
the "NOINT" statement is mandatory here.
Hope that helps,
Oliver- Hide quoted text -
- Show quoted text -
Dear Oliver,
Thank you for responding! I'm sorry for taking so long to reply. I
didn't realize anyone responded! My primary goal is to obtian the odds
of contracting disease 1 to the odds of contracting disease 2, after
controlling for x1.
I completely understand, and agree that disease_indicator*x1 will not
provide me with the odds ratio of interest. However, if I requested
the odds ratio for the estimates, I should obtain an odds ratio
for:"disease_indic." Would this odds ratio not tell me the odds of
contracing one disease to the odds of contracting another disease,
after controlling for the effects of the covariate for each disease.
If not, then how would you obtain this odds ratio. The whole point of
this analysis is to simply compare the odds of contracting one disease
to the odds of contracting another one, AFTER evening the playing
field with repsect to x1. I'd really love to hear your thoughts, if
you have the time to respond.
Ryan
Sorry for the double post, but to be clear...
With regard to parameter estimates I expect to obtain four
disease_indicator=1
disease_indicator=2
x1*dis=1
x1*dis=2
I expect to answer my question by
Exp(disease_indicator=1-disease_indicator=2)
I should get the same estimate if I envoke the odds ratio estimates.
Thanks again!- Zitierten Text ausblenden -
- Zitierten Text anzeigen -
Hello Ryan,
I think I got your point.
However, I would approach your problem in a slightly different (and a
more elementary) way. You won't need the ODDSRATIO statement for this.
Define p1 as the probability of response for disease 1, and p2 the
corresponding response probability for disease 2. What you want to
have is the odds of the two probabilities, that is, ORp1p2 = p1*(1-p2)/
p2*(1-p1). Right?
If yes, then p1 and p2 can easily calculated by the standard
expit(=inverse logit)-transformation
p1=exp(disease_indicator=1 + x1*dis)/ (1 + exp(disease_indicator=1 +
x1*dis)) and
p2=exp(disease_indicator=2 + x2*dis)/ (1 + exp(disease_indicator=2 +
x2*dis)).
where disease_indicator=1,  x1*dis, disease_indicator=2, x2*dis are
the estimated parameters from the model. Plugging these estimates in
to the formula for ORp1p2 will give you what you want.
Unfortunately, you won't get no confidence intervals for your ORp1p2
that way. In a similar problem, I once used the multivariate delta
method for getting confidence intervals for a nonlinear combination of
GLIMMIX parameters. After a while of reading statistical textbooks I
succeeded, but that was really hard stuff ;-))
Hope that helps,
Oliver- Hide quoted text -
- Show quoted text -
Hi Oliver,
I've been searching and searching for an example of the multivariate
delta method to compute the CIs for ORp1p2, and I'm REALLY stuck. I
don't want to take up any more of your time. You've been such a
wonderful help. I was just wondering if you might have some basic tips
and/or references that might help me move this along? Again, I'm sorry
for disturbing you, and completely understand if you're too busy to
respond.
Sincerely
Ryan- Zitierten Text ausblenden -
- Zitierten Text anzeigen -
Hello Ryan,
no problem, I also profited a lot from the list in the past. It feels
good to give something back ...

For me, the most accessible text for understanding the delta method
was the textbook of Agresti (Categorical Data Analysis, 2nd edition).
It has 2 short chapters on the delta method, where the first chapter
is for the delta method for a single parameter and it uses the log
odds ratio in a fourfold-table as an example.
It helped me also a lot to write down an example: I fitted a simple
logistic model with PROC LOGISTIC and then tried to reproduce the CIs
for the Odds Ratios (which are exp(b))from PROC LOGISTIC with the
delta method.

Moreover, please note that you can also use the bootstrap for getting
confidence intervals for ORp1p2. But that's another story and maybe
not easier as the delta method ...

Hope that helps,
Oliver
Ryan
2008-08-14 18:12:29 UTC
Permalink
Post by Ryan
Post by Ryan
Post by Ryan
Post by Ryan
Hi all,
I posted something similar a while back, and I'm very grateful for the
help I received. I will make my follow-up questions brief...
   procglimmixdata=mydata;
     class disease_indic cityID personID;
     model box1 = disease_indicator disease_indicator*x1 / s
dist=binary noint;
     random intercept / subject=cityID
                        type=sp(pow)(latitude longitude)
                        group=region;
     random intercept / subject=personID
   run;
Participants responded whether they had contracted disease A and/or
disease B. As a result, I'm dealing with a multvariate response. The
city-level covariate varies across diseases (and cities). There are
two random intercepts to account for both forms of covariances.
Question 1: Would asking for the "Odds Ratio" in the model statement
give me the adjusted odds ratio for disease_indicator-----"e.g. the
odds of contracting disease A is two times the odds of contracting
disase B, after adjusting for the effect of x1 on *each* of the
disease rates."
Question 2: Would there ever be a circumstance in which the main
effect of x1 should be included in the model statement or perhaps even
replace the interaction term? My impression, after doing some research
and giving this some thought, would be "no."
Absolutely any thoughts and/or references would be greatly
appreciated!
DearRyan,
S.P. Wright (Multivariate Analysis Using the MIXED Procedure.
Proceedings of SUGI 23, 1998, Paper 229) showed how to code a mixed
model with a multivariate response, and you can use this trick also
for PRCGLIMMIX.  Thiébaut R. et al. (Bivariate linear mixed models
using SAS proc MIXED. Computer Methods and Programs in Biomedicine 69,
2002, 249-256.) gave another example.
Q1: I haven't seen your data, but I think the ODDSRATIO statement (or,
equivalently, exponentiating the estimate for disease_indicator*x1)
will NOT compare the two diseases but will give you an estimate of the
effect of an unit change of x1 on the response. And (as you included
the interaction disease_indicator*x1 in the model, which is correct)
you will get two such estimates, one for each disease.
Q2: You would never need the main effect of x1 in this model, and also
the "NOINT" statement is mandatory here.
Hope that helps,
Oliver- Hide quoted text -
- Show quoted text -
Dear Oliver,
Thank you for responding! I'm sorry for taking so long to reply. I
didn't realize anyone responded! My primary goal is to obtian the odds
of contracting disease 1 to the odds of contracting disease 2, after
controlling for x1.
I completely understand, and agree that disease_indicator*x1 will not
provide me with the odds ratio of interest. However, if I requested
the odds ratio for the estimates, I should obtain an odds ratio
for:"disease_indic." Would this odds ratio not tell me the odds of
contracing one disease to the odds of contracting another disease,
after controlling for the effects of the covariate for each disease.
If not, then how would you obtain this odds ratio. The whole point of
this analysis is to simply compare the odds of contracting one disease
to the odds of contracting another one, AFTER evening the playing
field with repsect to x1. I'd really love to hear your thoughts, if
you have the time to respond.
Ryan
Sorry for the double post, but to be clear...
With regard to parameter estimates I expect to obtain four
disease_indicator=1
disease_indicator=2
x1*dis=1
x1*dis=2
I expect to answer my question by
Exp(disease_indicator=1-disease_indicator=2)
I should get the same estimate if I envoke the odds ratio estimates.
Thanks again!- Zitierten Text ausblenden -
- Zitierten Text anzeigen -
HelloRyan,
I think I got your point.
However, I would approach your problem in a slightly different (and a
more elementary) way. You won't need the ODDSRATIO statement for this.
Define p1 as the probability of response for disease 1, and p2 the
corresponding response probability for disease 2. What you want to
have is the odds of the two probabilities, that is, ORp1p2 = p1*(1-p2)/
p2*(1-p1). Right?
If yes, then p1 and p2 can easily calculated by the standard
expit(=inverse logit)-transformation
p1=exp(disease_indicator=1 + x1*dis)/ (1 + exp(disease_indicator=1 +
x1*dis)) and
p2=exp(disease_indicator=2 + x2*dis)/ (1 + exp(disease_indicator=2 +
x2*dis)).
where disease_indicator=1,  x1*dis, disease_indicator=2, x2*dis are
the estimated parameters from the model. Plugging these estimates in
to the formula for ORp1p2 will give you what you want.
Unfortunately, you won't get no confidence intervals for your ORp1p2
that way. In a similar problem, I once used the multivariate delta
method for getting confidence intervals for a nonlinear combination of
GLIMMIXparameters. After a while of reading statistical textbooks I
succeeded, but that was really hard stuff ;-))
Hope that helps,
Oliver- Hide quoted text -
- Show quoted text -
Hi Oliver,
I've been searching and searching for an example of the multivariate
delta method to compute the CIs for ORp1p2, and I'm REALLY stuck. I
don't want to take up any more of your time. You've been such a
wonderful help. I was just wondering if you might have some basic tips
and/or references that might help me move this along? Again, I'm sorry
for disturbing you, and completely understand if you're too busy to
respond.
Sincerely
Ryan- Zitierten Text ausblenden -
- Zitierten Text anzeigen -
HelloRyan,
no problem, I also profited a lot from the list in the past. It feels
good to give something back ...
For me, the most accessible text for understanding the delta method
was the textbook of Agresti (Categorical Data Analysis, 2nd edition).
It has 2 short chapters on the delta method, where the first chapter
is for the delta method for a single parameter and it uses the log
odds ratio in a fourfold-table as an example.
It helped me also a lot to write down an example: I fitted a simple
logistic model with PROC LOGISTIC and then tried to reproduce the CIs
for the Odds Ratios (which are exp(b))from PROC LOGISTIC with the
delta method.
Moreover, please note that you can also use the bootstrap for getting
confidence intervals for ORp1p2. But that's another story and maybe
not easier as the delta method ...
Hope that helps,
Oliver- Hide quoted text -
- Show quoted text -
Hi Oliver,

Thanks again for responding. I just ordered the book by Agresti. I'll
follow your instructions and try to compute the OR Confidence Interval
for a simple logistic regression using the delta method, and then try
to extend that technique to my situation. We shall see...

Thanks!

Ryan
O***@medizin.uni-halle.de
2008-08-15 06:45:34 UTC
Permalink
Post by Ryan
Post by Ryan
Post by Ryan
Post by Ryan
Post by Ryan
Hi all,
I posted something similar a while back, and I'm very grateful for the
help I received. I will make my follow-up questions brief...
   procglimmixdata=mydata;
     class disease_indic cityID personID;
     model box1 = disease_indicator disease_indicator*x1 / s
dist=binary noint;
     random intercept / subject=cityID
                        type=sp(pow)(latitude longitude)
                        group=region;
     random intercept / subject=personID
   run;
Participants responded whether they had contracted disease A and/or
disease B. As a result, I'm dealing with a multvariate response. The
city-level covariate varies across diseases (and cities). There are
two random intercepts to account for both forms of covariances.
Question 1: Would asking for the "Odds Ratio" in the model statement
give me the adjusted odds ratio for disease_indicator-----"e.g. the
odds of contracting disease A is two times the odds of contracting
disase B, after adjusting for the effect of x1 on *each* of the
disease rates."
Question 2: Would there ever be a circumstance in which the main
effect of x1 should be included in the model statement or perhaps even
replace the interaction term? My impression, after doing some research
and giving this some thought, would be "no."
Absolutely any thoughts and/or references would be greatly
appreciated!
DearRyan,
S.P. Wright (Multivariate Analysis Using the MIXED Procedure.
Proceedings of SUGI 23, 1998, Paper 229) showed how to code a mixed
model with a multivariate response, and you can use this trick also
for PRCGLIMMIX.  Thiébaut R. et al. (Bivariate linear mixed models
using SAS proc MIXED. Computer Methods and Programs in Biomedicine 69,
2002, 249-256.) gave another example.
Q1: I haven't seen your data, but I think the ODDSRATIO statement (or,
equivalently, exponentiating the estimate for disease_indicator*x1)
will NOT compare the two diseases but will give you an estimate of the
effect of an unit change of x1 on the response. And (as you included
the interaction disease_indicator*x1 in the model, which is correct)
you will get two such estimates, one for each disease.
Q2: You would never need the main effect of x1 in this model, and also
the "NOINT" statement is mandatory here.
Hope that helps,
Oliver- Hide quoted text -
- Show quoted text -
Dear Oliver,
Thank you for responding! I'm sorry for taking so long to reply. I
didn't realize anyone responded! My primary goal is to obtian the odds
of contracting disease 1 to the odds of contracting disease 2, after
controlling for x1.
I completely understand, and agree that disease_indicator*x1 will not
provide me with the odds ratio of interest. However, if I requested
the odds ratio for the estimates, I should obtain an odds ratio
for:"disease_indic." Would this odds ratio not tell me the odds of
contracing one disease to the odds of contracting another disease,
after controlling for the effects of the covariate for each disease.
If not, then how would you obtain this odds ratio. The whole point of
this analysis is to simply compare the odds of contracting one disease
to the odds of contracting another one, AFTER evening the playing
field with repsect to x1. I'd really love to hear your thoughts, if
you have the time to respond.
Ryan
Sorry for the double post, but to be clear...
With regard to parameter estimates I expect to obtain four
disease_indicator=1
disease_indicator=2
x1*dis=1
x1*dis=2
I expect to answer my question by
Exp(disease_indicator=1-disease_indicator=2)
I should get the same estimate if I envoke the odds ratio estimates.
Thanks again!- Zitierten Text ausblenden -
- Zitierten Text anzeigen -
HelloRyan,
I think I got your point.
However, I would approach your problem in a slightly different (and a
more elementary) way. You won't need the ODDSRATIO statement for this.
Define p1 as the probability of response for disease 1, and p2 the
corresponding response probability for disease 2. What you want to
have is the odds of the two probabilities, that is, ORp1p2 = p1*(1-p2)/
p2*(1-p1). Right?
If yes, then p1 and p2 can easily calculated by the standard
expit(=inverse logit)-transformation
p1=exp(disease_indicator=1 + x1*dis)/ (1 + exp(disease_indicator=1 +
x1*dis)) and
p2=exp(disease_indicator=2 + x2*dis)/ (1 + exp(disease_indicator=2 +
x2*dis)).
where disease_indicator=1,  x1*dis, disease_indicator=2, x2*dis are
the estimated parameters from the model. Plugging these estimates in
to the formula for ORp1p2 will give you what you want.
Unfortunately, you won't get no confidence intervals for your ORp1p2
that way. In a similar problem, I once used the multivariate delta
method for getting confidence intervals for a nonlinear combination of
GLIMMIXparameters. After a while of reading statistical textbooks I
succeeded, but that was really hard stuff ;-))
Hope that helps,
Oliver- Hide quoted text -
- Show quoted text -
Hi Oliver,
I've been searching and searching for an example of the multivariate
delta method to compute the CIs for ORp1p2, and I'm REALLY stuck. I
don't want to take up any more of your time. You've been such a
wonderful help. I was just wondering if you might have some basic tips
and/or references that might help me move this along? Again, I'm sorry
for disturbing you, and completely understand if you're too busy to
respond.
Sincerely
Ryan- Zitierten Text ausblenden -
- Zitierten Text anzeigen -
HelloRyan,
no problem, I also profited a lot from the list in the past. It feels
good to give something back ...
For me, the most accessible text for understanding the delta method
was the textbook of Agresti (Categorical Data Analysis, 2nd edition).
It has 2 short chapters on the delta method, where the first chapter
is for the delta method for a single parameter and it uses the log
odds ratio in a fourfold-table as an example.
It helped me also a lot to write down an example: I fitted a simple
logistic model with PROC LOGISTIC and then tried to reproduce the CIs
for the Odds Ratios (which are exp(b))from PROC LOGISTIC with the
delta method.
Moreover, please note that you can also use the bootstrap for getting
confidence intervals for ORp1p2. But that's another story and maybe
not easier as the delta method ...
Hope that helps,
Oliver- Hide quoted text -
- Show quoted text -
Hi Oliver,
Thanks again for responding. I just ordered the book by Agresti. I'll
follow your instructions and try to compute the OR Confidence Interval
for a simple logistic regression using the delta method, and then try
to extend that technique to my situation. We shall see...
Thanks!
Ryan- Zitierten Text ausblenden -
- Zitierten Text anzeigen -
Hello Ryan,
one more point. I think that ORp1p2 depends on the value of x1 at
least if x1 is a continuous covariate.
To be concrete, in computing p1 by

p1=exp(disease_indicator=1 + x1*dis)/ (1 + exp(disease_indicator=1 +
x1*dis))

you explitcitly compute p1 for the value of x1=1 (because x1*dis =
x1*dis*1). This does not necessarily make sense (I don't know what
your x1 covariate actually represents) and you might want to check
different values by multiplying x1*dis with another value in the
computation of ORp1p2.

Oliver
Ryan
2008-08-15 14:01:20 UTC
Permalink
Post by Ryan
Post by Ryan
Post by Ryan
Post by Ryan
Post by Ryan
Hi all,
I posted something similar a while back, and I'm very grateful for the
help I received. I will make my follow-up questions brief...
   procglimmixdata=mydata;
     class disease_indic cityID personID;
     model box1 = disease_indicator disease_indicator*x1 / s
dist=binary noint;
     random intercept / subject=cityID
                        type=sp(pow)(latitude longitude)
                        group=region;
     random intercept / subject=personID
   run;
Participants responded whether they had contracted disease A and/or
disease B. As a result, I'm dealing with a multvariate response. The
city-level covariate varies across diseases (and cities). There are
two random intercepts to account for both forms of covariances.
Question 1: Would asking for the "Odds Ratio" in the model statement
give me the adjusted odds ratio for disease_indicator-----"e.g. the
odds of contracting disease A is two times the odds of contracting
disase B, after adjusting for the effect of x1 on *each* of the
disease rates."
Question 2: Would there ever be a circumstance in which the main
effect of x1 should be included in the model statement or perhaps even
replace the interaction term? My impression, after doing some research
and giving this some thought, would be "no."
Absolutely any thoughts and/or references would be greatly
appreciated!
DearRyan,
S.P. Wright (Multivariate Analysis Using the MIXED Procedure.
Proceedings of SUGI 23, 1998, Paper 229) showed how to code a mixed
model with a multivariate response, and you can use this trick also
for PRCGLIMMIX.  Thiébaut R. et al. (Bivariate linear mixed models
using SAS proc MIXED. Computer Methods and Programs in Biomedicine 69,
2002, 249-256.) gave another example.
Q1: I haven't seen your data, but I think the ODDSRATIO statement (or,
equivalently, exponentiating the estimate for disease_indicator*x1)
will NOT compare the two diseases but will give you an estimate of the
effect of an unit change of x1 on the response. And (as you included
the interaction disease_indicator*x1 in the model, which is correct)
you will get two such estimates, one for each disease.
Q2: You would never need the main effect of x1 in this model, and also
the "NOINT" statement is mandatory here.
Hope that helps,
Oliver- Hide quoted text -
- Show quoted text -
Dear Oliver,
Thank you for responding! I'm sorry for taking so long to reply. I
didn't realize anyone responded! My primary goal is to obtian the odds
of contracting disease 1 to the odds of contracting disease 2, after
controlling for x1.
I completely understand, and agree that disease_indicator*x1 will not
provide me with the odds ratio of interest. However, if I requested
the odds ratio for the estimates, I should obtain an odds ratio
for:"disease_indic." Would this odds ratio not tell me the odds of
contracing one disease to the odds of contracting another disease,
after controlling for the effects of the covariate for each disease.
If not, then how would you obtain this odds ratio. The whole point of
this analysis is to simply compare the odds of contracting one disease
to the odds of contracting another one, AFTER evening the playing
field with repsect to x1. I'd really love to hear your thoughts, if
you have the time to respond.
Ryan
Sorry for the double post, but to be clear...
With regard to parameter estimates I expect to obtain four
disease_indicator=1
disease_indicator=2
x1*dis=1
x1*dis=2
I expect to answer my question by
Exp(disease_indicator=1-disease_indicator=2)
I should get the same estimate if I envoke the odds ratio estimates.
Thanks again!- Zitierten Text ausblenden -
- Zitierten Text anzeigen -
HelloRyan,
I think I got your point.
However, I would approach your problem in a slightly different (and a
more elementary) way. You won't need the ODDSRATIO statement for this.
Define p1 as the probability of response for disease 1, and p2 the
corresponding response probability for disease 2. What you want to
have is the odds of the two probabilities, that is, ORp1p2 = p1*(1-p2)/
p2*(1-p1). Right?
If yes, then p1 and p2 can easily calculated by the standard
expit(=inverse logit)-transformation
p1=exp(disease_indicator=1 + x1*dis)/ (1 + exp(disease_indicator=1 +
x1*dis)) and
p2=exp(disease_indicator=2 + x2*dis)/ (1 + exp(disease_indicator=2 +
x2*dis)).
where disease_indicator=1,  x1*dis, disease_indicator=2, x2*dis are
the estimated parameters from the model. Plugging these estimates in
to the formula for ORp1p2 will give you what you want.
Unfortunately, you won't get no confidence intervals for your ORp1p2
that way. In a similar problem, I once used the multivariate delta
method for getting confidence intervals for a nonlinear combination of
GLIMMIXparameters. After a while of reading statistical textbooks I
succeeded, but that was really hard stuff ;-))
Hope that helps,
Oliver- Hide quoted text -
- Show quoted text -
Hi Oliver,
I've been searching and searching for an example of the multivariate
delta method to compute the CIs for ORp1p2, and I'm REALLY stuck. I
don't want to take up any more of your time. You've been such a
wonderful help. I was just wondering if you might have some basic tips
and/or references that might help me move this along? Again, I'm sorry
for disturbing you, and completely understand if you're too busy to
respond.
Sincerely
Ryan- Zitierten Text ausblenden -
- Zitierten Text anzeigen -
HelloRyan,
no problem, I also profited a lot from the list in the past. It feels
good to give something back ...
For me, the most accessible text for understanding the delta method
was the textbook of Agresti (Categorical Data Analysis, 2nd edition).
It has 2 short chapters on the delta method, where the first chapter
is for the delta method for a single parameter and it uses the log
odds ratio in a fourfold-table as an example.
It helped me also a lot to write down an example: I fitted a simple
logistic model with PROC LOGISTIC and then tried to reproduce the CIs
for the Odds Ratios (which are exp(b))from PROC LOGISTIC with the
delta method.
Moreover, please note that you can also use the bootstrap for getting
confidence intervals for ORp1p2. But that's another story and maybe
not easier as the delta method ...
Hope that helps,
Oliver- Hide quoted text -
- Show quoted text -
Hi Oliver,
Thanks again for responding. I just ordered the book by Agresti. I'll
follow your instructions and try to compute the OR Confidence Interval
for a simple logistic regression using the delta method, and then try
to extend that technique to my situation. We shall see...
Thanks!
Ryan- Zitierten Text ausblenden -
- Zitierten Text anzeigen -
HelloRyan,
one more point. I think that ORp1p2 depends on the value of x1 at
least if x1 is a continuous covariate.
To be concrete, in computing p1 by
p1=exp(disease_indicator=1 + x1*dis)/ (1 + exp(disease_indicator=1 +
x1*dis))
you explitcitly compute p1 for the value of x1=1 (because x1*dis =
x1*dis*1). This does not necessarily make sense (I don't know what
your x1 covariate actually represents) and you might want to check
different values by multiplying x1*dis with another value in the
computation of ORp1p2.
Oliver- Hide quoted text -
- Show quoted text -
Hi Oliver,

Thanks for this information. You are correct. The covariate is
continuous and "disease-varying." I think it would make sense to set
the value of this covariate, x1, equal to the grand mean. So when
computing ORp1p2, I would multiply the parameter estimates x1*dis=1
and x1*dis=2 by the grand mean of x1.

Since I'm posting, I thought you'd like to know that I figured out how
to compute the CIs using the delta method for the case where the
covariate, x1, is not in the equation. I used a formula that was
posted a while back:

http://groups.google.com/group/comp.soft-sys.sas/browse_thread/thread/2e18cd2aa6c5abb8/748bb6222adacb36?hl=en&lnk=gst&q=delta+method+covariance+matrix#748bb6222adacb36

se(bhat(dis1)-bhat(dis2)) = sqrt(V(bhat(dis1)) + V(bhat(dis2)) -
2Cov(bhat(dis1),bhat(dis2)))

***I obtained these values from the var-cov table:

Disease 1 Disease 2
Disease1 var_dis1 cov

Disease2 cov var_dis2

***Then I created the 95% CI by:

Disease1_Mean-Disease2_Mean+/-1.96(SE)

***The CI (based on the delta method) was the same up to 4 or 5
decimal places of the CI in the ODDSRATIO output, so I'm pretty
certain this is correct.

-------------------------

***Computing the CIs with the covariate will NOT be easy... :(

With the covariate in the model I get the following var-cov table:

Disease 1 Disease 2 x1*dis=1 x2*dis=2
Disease1

Disease2

x1*dis=1

x1*dis=2

***I'm still working on this part! (The book just arrived!) If and
when I figure it out, I'll repost so that if anyone is ever trying to
figure this out, they'll have a full example.

Thanks again Oliver. You have been such a great help!

Ryan
Ryan
2008-08-15 16:14:27 UTC
Permalink
Sorry, but want to correct previous post. The CI that I calculated was

Disease1_ParameterEstimate-Disease2ParameterEstimate+/-1.96(SE)

I didn't mean to put mean difference--it was a reflex.
Kevin Viel
2008-08-11 13:42:28 UTC
Permalink
Post by Ryan
Thank you for responding! I'm sorry for taking so long to reply. I
didn't realize anyone responded! My primary goal is to obtian the odds
of contracting disease 1 to the odds of contracting disease 2, after
controlling for x1.
I completely understand, and agree that disease_indicator*x1 will not
provide me with the odds ratio of interest. However, if I requested
the odds ratio for the estimates, I should obtain an odds ratio
for:"disease_indic." Would this odds ratio not tell me the odds of
contracing one disease to the odds of contracting another disease,
after controlling for the effects of the covariate for each disease.
If not, then how would you obtain this odds ratio. The whole point of
this analysis is to simply compare the odds of contracting one disease
to the odds of contracting another one, AFTER evening the playing
field with repsect to x1. I'd really love to hear your thoughts, if
you have the time to respond.
OK, this is starting to bother me a bit so I think I will ask for come
clarification. Please describe the hypothesis, the study design, and
emphasize the sampling technique.

I think clarifying the outcome is important. Is one disease of greater
interest? Does your study population start disease free? Importantly, is
one disease a consequence of the other? Can the sequence of the outcomes
of the disease be identified? Is the time to events important, especially
between infections? Could this be handle with survival analysis and time-
varying covariates?

I guess I am particular cautious of the interactions in the model as
formulated. Maybe I missed something?

Kevin
Ryan
2008-08-11 15:27:12 UTC
Permalink
Post by Kevin Viel
Post by Ryan
Thank you for responding! I'm sorry for taking so long to reply. I
didn't realize anyone responded! My primary goal is to obtian the odds
of contracting disease 1 to the odds of contracting disease 2, after
controlling for x1.
I completely understand, and agree that disease_indicator*x1 will not
provide me with the odds ratio of interest. However, if I requested
the odds ratio for the estimates, I should obtain an odds ratio
for:"disease_indic." Would this odds ratio not tell me the odds of
contracing one disease to the odds of contracting another disease,
after controlling for the effects of the covariate for each disease.
If not, then how would you obtain this odds ratio. The whole point of
this analysis is to simply compare the odds of contracting one disease
to the odds of contracting another one, AFTER evening the playing
field with repsect to x1. I'd really love to hear your thoughts, if
you have the time to respond.
OK, this is starting to bother me a bit so I think I will ask for come
clarification.  Please describe the hypothesis, the study design, and
emphasize the sampling technique.
I think clarifying the outcome is important.  Is one disease of greater
interest?  Does your study population start disease free?  Importantly, is
one disease a consequence of the other?  Can the sequence of the outcomes
of the disease be identified?  Is the time to events important, especially
between infections?  Could this be handle with survival analysis and time-
varying covariates?
I guess I am particular cautious of the interactions in the model as
formulated.  Maybe I missed something?
Kevin- Hide quoted text -
- Show quoted text -
Hi Kevin,

I have considered other approaches, but this approach, GLIMMIX,
appears to best fit my data.

I, too, was concerned about exluding the main effects from this model,
but after much research and help from others, it is clear to me that
including the main effect is not what I want. Here is a post that
discusses this very issue:

http://groups.google.com/group/comp.soft-sys.sas/browse_thread/thread/97c7863e451e1751/79da08042d5c35dd?hl=en&lnk=gst&q=oliver+kuss#79da08042d5c35dd

Here are the links to the two articles that Oliver suggested:

http://ssc.utexas.edu/docs/sashelp/sugi/23/Stats/p229.pdf

http://arxiv.org/ftp/arxiv/papers/0705/0705.0568.pdf


Best,

Ryan
O***@medizin.uni-halle.de
2008-08-12 07:33:13 UTC
Permalink
Post by Ryan
Post by Kevin Viel
Post by Ryan
Thank you for responding! I'm sorry for taking so long to reply. I
didn't realize anyone responded! My primary goal is to obtian the odds
of contracting disease 1 to the odds of contracting disease 2, after
controlling for x1.
I completely understand, and agree that disease_indicator*x1 will not
provide me with the odds ratio of interest. However, if I requested
the odds ratio for the estimates, I should obtain an odds ratio
for:"disease_indic." Would this odds ratio not tell me the odds of
contracing one disease to the odds of contracting another disease,
after controlling for the effects of the covariate for each disease.
If not, then how would you obtain this odds ratio. The whole point of
this analysis is to simply compare the odds of contracting one disease
to the odds of contracting another one, AFTER evening the playing
field with repsect to x1. I'd really love to hear your thoughts, if
you have the time to respond.
OK, this is starting to bother me a bit so I think I will ask for come
clarification.  Please describe the hypothesis, the study design, and
emphasize the sampling technique.
I think clarifying the outcome is important.  Is one disease of greater
interest?  Does your study population start disease free?  Importantly, is
one disease a consequence of the other?  Can the sequence of the outcomes
of the disease be identified?  Is the time to events important, especially
between infections?  Could this be handle with survival analysis and time-
varying covariates?
I guess I am particular cautious of the interactions in the model as
formulated.  Maybe I missed something?
Kevin- Hide quoted text -
- Show quoted text -
Hi Kevin,
I have considered other approaches, but this approach, GLIMMIX,
appears to best fit my data.
I, too, was concerned about exluding the main effects from this model,
but after much research and help from others, it is clear to me that
including the main effect is not what I want. Here is a post that
http://groups.google.com/group/comp.soft-sys.sas/browse_thread/thread...
http://ssc.utexas.edu/docs/sashelp/sugi/23/Stats/p229.pdf
http://arxiv.org/ftp/arxiv/papers/0705/0705.0568.pdf
Best,
Ryan- Zitierten Text ausblenden -
- Zitierten Text anzeigen -
Hello Kevin and Shawn,
sorry for confusing you, but the point here is NOT if main effects
should included into a statistical model together with their
interactions.
Ryan is simply using a trick to make SAS (PROC MIXED or PROC GLIMMIX)
estimating a model with a bivariate response. In this case the model
has to look like exactly as it does in his code. I think, Wright (see
link above) was the first to propose that idea and I have seen some
applications of the idea since then.

Oliver
Shawn Haskell
2008-08-11 14:31:46 UTC
Permalink
Post by Ryan
Hi all,
I posted something similar a while back, and I'm very grateful for the
help I received. I will make my follow-up questions brief...
   proc glimmix data=mydata;
     class disease_indic cityID personID;
     model box1 = disease_indicator disease_indicator*x1 / s
dist=binary noint;
     random intercept / subject=cityID
                        type=sp(pow)(latitude longitude)
                        group=region;
     random intercept / subject=personID
   run;
Participants responded whether they had contracted disease A and/or
disease B. As a result, I'm dealing with a multvariate response. The
city-level covariate varies across diseases (and cities). There are
two random intercepts to account for both forms of covariances.
Question 1: Would asking for the "Odds Ratio" in the model statement
give me the adjusted odds ratio for disease_indicator-----"e.g. the
odds of contracting disease A is two times the odds of contracting
disase B, after adjusting for the effect of x1 on *each* of the
disease rates."
Question 2: Would there ever be a circumstance in which the main
effect of x1 should be included in the model statement or perhaps even
replace the interaction term? My impression, after doing some research
and giving this some thought, would be "no."
Absolutely any thoughts and/or references would be greatly
appreciated!
I can't speak for GLIMMIX like the others, but I can say this: I was
taught (by the editor of The American Statistician) that the Effect
Heredity Principle states that in order for your interaction term to
mean what it is typically thought to mean, you must include the lower
order terms - e.g., x1*x2 should include both x1 and x2 whether the
smiple terms are "significant" or not. Typically we would interpret
x1*x2 as "the effect of x1 depends on x2" or vice-versa, but if the
simple terms of both x1 and x2 are not included in the model x1*x2
just becomes some sort of data transformation and does not mean as
described above. SH
Kevin Viel
2008-08-12 17:34:19 UTC
Permalink
Post by Ryan
I have considered other approaches, but this approach, GLIMMIX,
appears to best fit my data.
I, too, was concerned about exluding the main effects from this model,
but after much research and help from others, it is clear to me that
including the main effect is not what I want. Here is a post that
http://groups.google.com/group/comp.soft-
sys.sas/browse_thread/thread/97c7863e451e1751/79da08042d5c35dd?
hl=en&lnk=gst&q=oliver+kuss#79da08042d5c35dd
Post by Ryan
http://ssc.utexas.edu/docs/sashelp/sugi/23/Stats/p229.pdf
http://arxiv.org/ftp/arxiv/papers/0705/0705.0568.pdf
Thanks,

I will review those links.

Good luck,

Kevin
Kevin Viel
2008-08-12 17:32:06 UTC
Permalink
On Mon, 11 Aug 2008 07:31:46 -0700, Shawn Haskell
I was taught (by the editor of The American Statistician) that the Effect
Heredity Principle states
If that is Westfall, go ahead and name him :) He is important to SAS:

"Multiple Comparisons and Multiple Tests using SAS"

I must have been great to be in some of his classes.
Shawn Haskell
2008-08-13 12:20:01 UTC
Permalink
Post by Kevin Viel
On Mon, 11 Aug 2008 07:31:46 -0700, Shawn Haskell
I was taught (by the editor of The American Statistician) that the Effect
Heredity Principle states
"Multiple Comparisons and Multiple Tests using SAS"
I must have been great to be in some of his classes.
yes it was indeed
Kevin Viel
2008-08-13 14:16:04 UTC
Permalink
On Wed, 13 Aug 2008 05:20:01 -0700, Shawn Haskell
Post by Shawn Haskell
Post by Kevin Viel
On Mon, 11 Aug 2008 07:31:46 -0700, Shawn Haskell
I must have been great to be in some of his classes.
I am a lousy typist :( I have never been in a class of his. *It* must
have been great....

*I* still have 500 years to go before I can pronounce myself as great, if I
ever am :)
Post by Shawn Haskell
yes it was indeed
Maybe he'll teach at one of the SGF's??
Dale McLerran
2008-08-19 01:45:22 UTC
Permalink
Post by Ryan
Hi all,
I posted something similar a while back, and I'm very grateful for the
help I received. I will make my follow-up questions
brief...
proc glimmix data=mydata;
class disease_indic cityID personID;
model box1 = disease_indicator disease_indicator*x1 / s
dist=binary noint;
random intercept / subject=cityID
type=sp(pow)(latitude longitude)
group=region;
random intercept / subject=personID
run;
Participants responded whether they had contracted disease A and/or
disease B. As a result, I'm dealing with a multvariate response. The
city-level covariate varies across diseases (and cities). There are
two random intercepts to account for both forms of covariances.
Question 1: Would asking for the "Odds Ratio" in the model statement
give me the adjusted odds ratio for disease_indicator-----"e.g. the
odds of contracting disease A is two times the odds of contracting
disase B, after adjusting for the effect of x1 on *each* of the
disease rates."
Question 2: Would there ever be a circumstance in which the main
effect of x1 should be included in the model statement or perhaps even
replace the interaction term? My impression, after doing some research
and giving this some thought, would be "no."
It has taken me a while to get around to addressing this thread as I
was on an extended vacation when the thread started. For X a
continuous covariate, the model statement in the code above is
generating two regression lines as depicted below:


| bbb
| bbbaaa
| bbbaa
| bbba
| abbb
| aabbb
| aaabbb
eta | aaaabbb
| aaaa bbb
| aaaa bbb
| aaaa bbb
| aaaa bbb
| aaaa bbb
| bbb
| bbb
| bbb
---------------------------------------------------
X


where a indicates the regression against X for disease A and b
represents the regression against X for disease B. The above
parameterization produces a table of regression coefficients
something like the following:

Effect Disease_indicator Estimate
Disease_indicator A b1
Disease_indicator B b2
X*Disease_indicator A b3
X*Disease_indicator B b4

so that the line represented by a is eta=b1 + b3*X while the line
represented by b is eta=b2 + b4*X. The difference b-a at specified
value of X is the log-odds of disease B to disease A at X.

It should be noted that when comparing the odds of disease B to
disease A, there is not a single odds ratio. Instead, we have a covariate-specific odds ratio. Of course, the same is true for
the odds ratio exp(b-a).

It might be of interest to examine the odds ratio at interesting
values of X, say x1=min(x), x2=mean(x), x3=max(x) or at certain
quantiles of X. One can use the ESTIMATE statement in GLIMMIX to
obtain the difference b-a at specified X (the log-odds ratio) and
also the odds ratio itself. For X=x{i}, code would be


estimate "Odds ratio for disease B to A at <x{i}>"
disease_indicator -1 1
X*disease_indicator -<x{i}> <x{i}> / exp cl;


where <x{i}> indicates some specific value of X.

Let me note, too, that the fixed effect model specified in the
above model statement is just an alternative parameterization to
the model specification where we have an intercept term, main
effects of disease indicator and covariate, and the interaction
between disease indicator and covariate.

model box1 = disease_indicator x1 disease_indicator*x1 / s
dist=binary;


The same ESTIMATE statements can be employed to obtain the odds
ratio of B to A at specified X.

For a multivariate model, we might prefer the parameterization that
Ryan has employed because we see directly the functional relationship
of X the probability of disease. What is lost in the parameterization
that Ryan uses is the test of the interaction term, although that
can be obtained through a CONTRAST (or, in this case since there
are only 2 disease groups, through another ESTIMATE statement).
I will leave the details of these CONTRAST (ESTIMATE) statements
to others to figure out. They are really quite simple.

Dale

---------------------------------------
Dale McLerran
Fred Hutchinson Cancer Research Center
mailto: ***@NO_SPAMfhcrc.org
Ph: (206) 667-2926
Fax: (206) 667-5977
---------------------------------------
O***@medizin.uni-halle.de
2008-08-19 07:22:15 UTC
Permalink
Post by Dale McLerran
Post by Ryan
Hi all,
I posted something similar a while back, and I'm very grateful for the
help I received. I will make my follow-up questions
brief...
   proc glimmix data=mydata;
     class disease_indic cityID personID;
     model box1 = disease_indicator disease_indicator*x1 / s
                         dist=binary noint;
     random intercept / subject=cityID
                        type=sp(pow)(latitude longitude)
                        group=region;
     random intercept / subject=personID
   run;
Participants responded whether they had contracted disease A and/or
disease B. As a result, I'm dealing with a multvariate response. The
city-level covariate varies across diseases (and cities). There are
two random intercepts to account for both forms of covariances.
Question 1: Would asking for the "Odds Ratio" in the model statement
give me the adjusted odds ratio for disease_indicator-----"e.g. the
odds of contracting disease A is two times the odds of contracting
disase B, after adjusting for the effect of x1 on *each* of the
disease rates."
Question 2: Would there ever be a circumstance in which the main
effect of x1 should be included in the model statement or perhaps even
replace the interaction term? My impression, after doing some research
and giving this some thought, would be "no."
It has taken me a while to get around to addressing this thread as I
was on an extended vacation when the thread started.  For X a
continuous covariate, the model statement in the code above is
          |                                               bbb
          |                                            bbbaaa
          |                                         bbbaa
          |                                      bbba
          |                                  abbb
          |                              aabbb
          |                          aaabbb
      eta |                      aaaabbb
          |                  aaaa bbb
          |              aaaa  bbb
          |          aaaa   bbb
          |      aaaa    bbb
          |  aaaa     bbb
          |        bbb
          |     bbb
          |  bbb
          ---------------------------------------------------
                                    X
where a indicates the regression against X for disease A and b
represents the regression against X for disease B.  The above
parameterization produces a table of regression coefficients
      Effect                Disease_indicator    Estimate
      Disease_indicator             A               b1
      Disease_indicator             B               b2
      X*Disease_indicator           A               b3
      X*Disease_indicator           B               b4
so that the line represented by a is eta=b1 + b3*X while the line
represented by b is eta=b2 + b4*X.  The difference b-a at specified
value of X is the log-odds of disease B to disease A at X.
It should be noted that when comparing the odds of disease B to
disease A, there is not a single odds ratio.  Instead, we have a covariate-specific odds ratio.  Of course, the same is true for
the odds ratio exp(b-a).
It might be of interest to examine the odds ratio at interesting
values of X, say x1=min(x), x2=mean(x), x3=max(x) or at certain
quantiles of X.  One can use the ESTIMATE statement in GLIMMIX to
obtain the difference b-a at specified X (the log-odds ratio) and
also the odds ratio itself.  For X=x{i}, code would be
    estimate "Odds ratio for disease B to A at <x{i}>"
      disease_indicator     -1       1
      X*disease_indicator   -<x{i}>  <x{i}> / exp cl;
where <x{i}> indicates some specific value of X.
Let me note, too, that the fixed effect model specified in the
above model statement is just an alternative parameterization to
the model specification where we have an intercept term, main
effects of disease indicator and covariate, and the interaction
between disease indicator and covariate.
     model box1 = disease_indicator x1 disease_indicator*x1 / s
                         dist=binary;
The same ESTIMATE statements can be employed to obtain the odds
ratio of B to A at specified X.
For a multivariate model, we might prefer the parameterization that
Ryan has employed because we see directly the functional relationship
of X the probability of disease.  What is lost in the parameterization
that Ryan uses is the test of the interaction term, although that
can be obtained through a CONTRAST (or, in this case since there
are only 2 disease groups, through another ESTIMATE statement).
I will leave the details of these CONTRAST (ESTIMATE) statements
to others to figure out.  They are really quite simple.
Dale
---------------------------------------
Dale McLerran
Fred Hutchinson Cancer Research Center
Ph:  (206) 667-2926
Fax: (206) 667-5977
---------------------------------------- Zitierten Text ausblenden -
- Zitierten Text anzeigen -
Very good point, Dale. Thank you very much!

Ryan, this is maybe good news for you. There is no need for you to
master the delta method and calculate the confidence intervals for
ORp1p2 from the scratch.
Dale showed how to use the ESTIMATE statement from PROC GLIMMIX to
estimate ORp1p2 for different values of x1. And this will also give
you confidence intervals!

Oliver
Ryan
2008-08-19 19:19:06 UTC
Permalink
Post by O***@medizin.uni-halle.de
Post by Dale McLerran
Post by Ryan
Hi all,
I posted something similar a while back, and I'm very grateful for the
help I received. I will make my follow-up questions
brief...
   procglimmixdata=mydata;
     class disease_indic cityID personID;
     model box1 = disease_indicator disease_indicator*x1 / s
                         dist=binary noint;
     random intercept / subject=cityID
                        type=sp(pow)(latitude longitude)
                        group=region;
     random intercept / subject=personID
   run;
Participants responded whether they had contracted disease A and/or
disease B. As a result, I'm dealing with a multvariate response. The
city-level covariate varies across diseases (and cities). There are
two random intercepts to account for both forms of covariances.
Question 1: Would asking for the "Odds Ratio" in the model statement
give me the adjusted odds ratio for disease_indicator-----"e.g. the
odds of contracting disease A is two times the odds of contracting
disase B, after adjusting for the effect of x1 on *each* of the
disease rates."
Question 2: Would there ever be a circumstance in which the main
effect of x1 should be included in the model statement or perhaps even
replace the interaction term? My impression, after doing some research
and giving this some thought, would be "no."
It has taken me a while to get around to addressing this thread as I
was on an extended vacation when the thread started.  For X a
continuous covariate, the model statement in the code above is
          |                                               bbb
          |                                            bbbaaa
          |                                         bbbaa
          |                                      bbba
          |                                  abbb
          |                              aabbb
          |                          aaabbb
      eta |                      aaaabbb
          |                  aaaa bbb
          |              aaaa  bbb
          |          aaaa   bbb
          |      aaaa    bbb
          |  aaaa     bbb
          |        bbb
          |     bbb
          |  bbb
          ---------------------------------------------------
                                    X
where a indicates the regression against X for disease A and b
represents the regression against X for disease B.  The above
parameterization produces a table of regression coefficients
      Effect                Disease_indicator    Estimate
      Disease_indicator             A               b1
      Disease_indicator             B               b2
      X*Disease_indicator           A               b3
      X*Disease_indicator           B               b4
so that the line represented by a is eta=b1 + b3*X while the line
represented by b is eta=b2 + b4*X.  The difference b-a at specified
value of X is the log-odds of disease B to disease A at X.
It should be noted that when comparing the odds of disease B to
disease A, there is not a single odds ratio.  Instead, we have a covariate-specific odds ratio.  Of course, the same is true for
the odds ratio exp(b-a).
It might be of interest to examine the odds ratio at interesting
values of X, say x1=min(x), x2=mean(x), x3=max(x) or at certain
quantiles of X.  One can use the ESTIMATE statement inGLIMMIXto
obtain the difference b-a at specified X (the log-odds ratio) and
also the odds ratio itself.  For X=x{i}, code would be
    estimate "Odds ratio for disease B to A at <x{i}>"
      disease_indicator     -1       1
      X*disease_indicator   -<x{i}>  <x{i}> / exp cl;
where <x{i}> indicates some specific value of X.
Let me note, too, that the fixed effect model specified in the
above model statement is just an alternative parameterization to
the model specification where we have an intercept term, main
effects of disease indicator and covariate, and the interaction
between disease indicator and covariate.
     model box1 = disease_indicator x1 disease_indicator*x1 / s
                         dist=binary;
The same ESTIMATE statements can be employed to obtain the odds
ratio of B to A at specified X.
For a multivariate model, we might prefer the parameterization that
Ryanhas employed because we see directly the functional relationship
of X the probability of disease.  What is lost in the parameterization
thatRyanuses is the test of the interaction term, although that
can be obtained through a CONTRAST (or, in this case since there
are only 2 disease groups, through another ESTIMATE statement).
I will leave the details of these CONTRAST (ESTIMATE) statements
to others to figure out.  They are really quite simple.
Dale
---------------------------------------
Dale McLerran
Fred Hutchinson Cancer Research Center
Ph:                (20...       
Fax: (206) 667-5977
---------------------------------------- Zitierten Text ausblenden -
- Zitierten Text anzeigen -
Very good point, Dale. Thank you very much!
Ryan, this is maybe good news for you. There is no need for you to
master the delta method and calculate the confidence intervals for
ORp1p2 from the scratch.
Dale showed how to use the ESTIMATE statement from PROCGLIMMIXto
estimate ORp1p2 for different values of x1. And this will also give
you confidence intervals!
Oliver- Hide quoted text -
- Show quoted text -
Oliver, this is great news! I was able to run the analysis as Dale
suggested and it's giving me exactly what I want to know (ORp1p2 and
CI at varying levels of x1). I was also able to confirm the value of
ORp1p2 at x1=mean by using the formula you presented earlier in the
thread. Thanks again for all your help! Ryan

Ryan
2008-08-19 19:14:22 UTC
Permalink
Post by Dale McLerran
Post by Ryan
Hi all,
I posted something similar a while back, and I'm very grateful for the
help I received. I will make my follow-up questions
brief...
   procglimmixdata=mydata;
     class disease_indic cityID personID;
     model box1 = disease_indicator disease_indicator*x1 / s
                         dist=binary noint;
     random intercept / subject=cityID
                        type=sp(pow)(latitude longitude)
                        group=region;
     random intercept / subject=personID
   run;
Participants responded whether they had contracted disease A and/or
disease B. As a result, I'm dealing with a multvariate response. The
city-level covariate varies across diseases (and cities). There are
two random intercepts to account for both forms of covariances.
Question 1: Would asking for the "Odds Ratio" in the model statement
give me the adjusted odds ratio for disease_indicator-----"e.g. the
odds of contracting disease A is two times the odds of contracting
disase B, after adjusting for the effect of x1 on *each* of the
disease rates."
Question 2: Would there ever be a circumstance in which the main
effect of x1 should be included in the model statement or perhaps even
replace the interaction term? My impression, after doing some research
and giving this some thought, would be "no."
It has taken me a while to get around to addressing this thread as I
was on an extended vacation when the thread started.  For X a
continuous covariate, the model statement in the code above is
          |                                               bbb
          |                                            bbbaaa
          |                                         bbbaa
          |                                      bbba
          |                                  abbb
          |                              aabbb
          |                          aaabbb
      eta |                      aaaabbb
          |                  aaaa bbb
          |              aaaa  bbb
          |          aaaa   bbb
          |      aaaa    bbb
          |  aaaa     bbb
          |        bbb
          |     bbb
          |  bbb
          ---------------------------------------------------
                                    X
where a indicates the regression against X for disease A and b
represents the regression against X for disease B.  The above
parameterization produces a table of regression coefficients
      Effect                Disease_indicator    Estimate
      Disease_indicator             A               b1
      Disease_indicator             B               b2
      X*Disease_indicator           A               b3
      X*Disease_indicator           B               b4
so that the line represented by a is eta=b1 + b3*X while the line
represented by b is eta=b2 + b4*X.  The difference b-a at specified
value of X is the log-odds of disease B to disease A at X.
It should be noted that when comparing the odds of disease B to
disease A, there is not a single odds ratio.  Instead, we have a covariate-specific odds ratio.  Of course, the same is true for
the odds ratio exp(b-a).
It might be of interest to examine the odds ratio at interesting
values of X, say x1=min(x), x2=mean(x), x3=max(x) or at certain
quantiles of X.  One can use the ESTIMATE statement inGLIMMIXto
obtain the difference b-a at specified X (the log-odds ratio) and
also the odds ratio itself.  For X=x{i}, code would be
    estimate "Odds ratio for disease B to A at <x{i}>"
      disease_indicator     -1       1
      X*disease_indicator   -<x{i}>  <x{i}> / exp cl;
where <x{i}> indicates some specific value of X.
Let me note, too, that the fixed effect model specified in the
above model statement is just an alternative parameterization to
the model specification where we have an intercept term, main
effects of disease indicator and covariate, and the interaction
between disease indicator and covariate.
     model box1 = disease_indicator x1 disease_indicator*x1 / s
                         dist=binary;
The same ESTIMATE statements can be employed to obtain the odds
ratio of B to A at specified X.
For a multivariate model, we might prefer the parameterization thatRyanhas employed because we see directly the functional relationship
of X the probability of disease.  What is lost in the parameterization
thatRyanuses is the test of the interaction term, although that
can be obtained through a CONTRAST (or, in this case since there
are only 2 disease groups, through another ESTIMATE statement).
I will leave the details of these CONTRAST (ESTIMATE) statements
to others to figure out.  They are really quite simple.
Dale
---------------------------------------
Dale McLerran
Fred Hutchinson Cancer Research Center
Ph:                (206) 667-2926       
Fax: (206) 667-5977
---------------------------------------- Hide quoted text -
- Show quoted text -
Dale,

Thank you so much for helping out! It means a lot that you decided to
respond to my question, even though so much time has passed.

Ryan

PS The graphical explanation really brings home the point.
Loading...