Skip to main content
edited tags
Source Link
kjetil b halvorsen
  • 82.8k
  • 32
  • 201
  • 663

The question is about using contrasts in regression analysis (here, Poisson regression with robust error variance).

We have devideddivided the participants in our sample into 6 groups, according to their body mass index at baseline (3-category variable: normal, overweight, obese) and the metabolic status at baseline.

data d.mho; set d.mho; /*2737*/
if bmi_cat2 = 1 and Met_abnorm = 0 then gp=1; /*metabolically healthy normal weight*/
if bmi_cat2 = 1 and Met_abnorm = 1 then gp=2; /*metabolically unhealthy normal weight*/
if bmi_cat2 = 2 and Met_abnorm = 0 then gp=3; /*metabolically healthy overweight*/
if bmi_cat2 = 2 and Met_abnorm = 1 then gp=4; /*metabolically unhealthy overweight*/
if bmi_cat2 = 3 and Met_abnorm = 0 then gp=5; /*metabolically healthy obese*/
if bmi_cat2 = 3 and Met_abnorm = 1 then gp=6; /*metabolically unhealthy obese*/ 
run;

We choose the "metabolically healthy normal weight" people as the reference group. In this case, is it possible to calculate the contrasts only between group 5 and 6 (metabolically healthy obese vs metabolically unhealthy obese), while keeping 'group 1' as the reference group:

proc genmod data=&data descending;
  class   id_vol  &adjust_class  &class(ref=&ref) ;
  model &outcome =    &class &adjust_class &adjust_contin / type3 dist = poisson link = log;
  repeated subject= id_vol / type=unstr modelse;
  ods output GEEEmpPEst=modcat ; 
  estimate 'MHO vs MUO' &class 0 0 0 0 1 -1/ exp;
run; 

I've also seen examples where the contrast coefficients are not necessarily integers (but couldn't understand):

estimate 'P contrast' &class -1.5 -0.5 0.5 1.5/ exp; 

Thanks for your help!

The question is about using contrasts in regression analysis (here, Poisson regression with robust error variance).

We have devided the participants in our sample into 6 groups, according to their body mass index at baseline (3-category variable: normal, overweight, obese) and the metabolic status at baseline.

data d.mho; set d.mho; /*2737*/
if bmi_cat2 = 1 and Met_abnorm = 0 then gp=1; /*metabolically healthy normal weight*/
if bmi_cat2 = 1 and Met_abnorm = 1 then gp=2; /*metabolically unhealthy normal weight*/
if bmi_cat2 = 2 and Met_abnorm = 0 then gp=3; /*metabolically healthy overweight*/
if bmi_cat2 = 2 and Met_abnorm = 1 then gp=4; /*metabolically unhealthy overweight*/
if bmi_cat2 = 3 and Met_abnorm = 0 then gp=5; /*metabolically healthy obese*/
if bmi_cat2 = 3 and Met_abnorm = 1 then gp=6; /*metabolically unhealthy obese*/ 
run;

We choose the "metabolically healthy normal weight" people as the reference group. In this case, is it possible to calculate the contrasts only between group 5 and 6 (metabolically healthy obese vs metabolically unhealthy obese), while keeping 'group 1' as the reference group:

proc genmod data=&data descending;
  class   id_vol  &adjust_class  &class(ref=&ref) ;
  model &outcome =    &class &adjust_class &adjust_contin / type3 dist = poisson link = log;
  repeated subject= id_vol / type=unstr modelse;
  ods output GEEEmpPEst=modcat ; 
  estimate 'MHO vs MUO' &class 0 0 0 0 1 -1/ exp;
run; 

I've also seen examples where the contrast coefficients are not necessarily integers (but couldn't understand):

estimate 'P contrast' &class -1.5 -0.5 0.5 1.5/ exp;

Thanks for your help!

The question is about using contrasts in regression analysis (here, Poisson regression with robust error variance).

We have divided the participants in our sample into 6 groups, according to their body mass index at baseline (3-category variable: normal, overweight, obese) and the metabolic status at baseline.

data d.mho; set d.mho; /*2737*/
if bmi_cat2 = 1 and Met_abnorm = 0 then gp=1; /*metabolically healthy normal weight*/
if bmi_cat2 = 1 and Met_abnorm = 1 then gp=2; /*metabolically unhealthy normal weight*/
if bmi_cat2 = 2 and Met_abnorm = 0 then gp=3; /*metabolically healthy overweight*/
if bmi_cat2 = 2 and Met_abnorm = 1 then gp=4; /*metabolically unhealthy overweight*/
if bmi_cat2 = 3 and Met_abnorm = 0 then gp=5; /*metabolically healthy obese*/
if bmi_cat2 = 3 and Met_abnorm = 1 then gp=6; /*metabolically unhealthy obese*/ 
run;

We choose the "metabolically healthy normal weight" people as the reference group. In this case, is it possible to calculate the contrasts only between group 5 and 6 (metabolically healthy obese vs metabolically unhealthy obese), while keeping 'group 1' as the reference group:

proc genmod data=&data descending;
  class   id_vol  &adjust_class  &class(ref=&ref) ;
  model &outcome =    &class &adjust_class &adjust_contin / type3 dist = poisson link = log;
  repeated subject= id_vol / type=unstr modelse;
  ods output GEEEmpPEst=modcat ; 
  estimate 'MHO vs MUO' &class 0 0 0 0 1 -1/ exp;
run; 

I've also seen examples where the contrast coefficients are not necessarily integers (but couldn't understand):

estimate 'P contrast' &class -1.5 -0.5 0.5 1.5/ exp; 
added 209 characters in body
Source Link
Happy Cretine
  • 681
  • 1
  • 6
  • 22

I don't really understand how to useThe question is about using contrasts in regression analysis (here, Poisson regression with robust error variance).

We have devided the participants in our sample into 6 groups, according to their body mass index at baseline (3-classcategory variable: normal, overweight, obese) and the metabolic status at baseline.

data d.mho; set d.mho; /*2737*/
if bmi_cat2 = 1 and Met_abnorm = 0 then gp=1; /*metabolically healthy normal weight*/
if bmi_cat2 = 1 and Met_abnorm = 1 then gp=2; /*metabolically unhealthy normal weight*/
if bmi_cat2 = 2 and Met_abnorm = 0 then gp=3; /*metabolically healthy overweight*/
if bmi_cat2 = 2 and Met_abnorm = 1 then gp=4; /*metabolically unhealthy overweight*/
if bmi_cat2 = 3 and Met_abnorm = 0 then gp=5; /*metabolically healthy obese*/
if bmi_cat2 = 3 and Met_abnorm = 1 then gp=6; /*metabolically unhealthy obese*/ 
run;

Though I'm not sure howWe choose the "metabolically healthy normal weight" people as the reference group. In this case, is it possible to calculate the contrasts only between 2 of the six groupsgroup 5 and 6 (metabolically healthy obese vs metabolically unhealthy obese), while keeping 'group 1' as the reference group:

proc genmod data=&data descending;
  class   id_vol  &adjust_class  &class(ref=&ref) ;
  model &outcome =    &class &adjust_class &adjust_contin / type3 dist = poisson link = log;
  repeated subject= id_vol / type=unstr modelse;
  ods output GEEEmpPEst=modcat ; 
  estimate 'MHO vs MUO' &class 0 0 0 0 1 -1/ exp;
run; 

I've also seen examples where the contrast coefficients are not necessarily integers (but couldn't understand):

estimate 'P contrast' &class -1.5 -0.5 0.5 1.5/ exp;

Thanks for your help!

I don't really understand how to use contrasts in regression analysis.

We have devided the participants in our sample into 6 groups, according to their body mass index at baseline (3-class variable: normal, overweight, obese) and the metabolic status at baseline.

data d.mho; set d.mho; /*2737*/
if bmi_cat2 = 1 and Met_abnorm = 0 then gp=1; /*metabolically healthy normal weight*/
if bmi_cat2 = 1 and Met_abnorm = 1 then gp=2; /*metabolically unhealthy normal weight*/
if bmi_cat2 = 2 and Met_abnorm = 0 then gp=3; /*metabolically healthy overweight*/
if bmi_cat2 = 2 and Met_abnorm = 1 then gp=4; /*metabolically unhealthy overweight*/
if bmi_cat2 = 3 and Met_abnorm = 0 then gp=5; /*metabolically healthy obese*/
if bmi_cat2 = 3 and Met_abnorm = 1 then gp=6; /*metabolically unhealthy obese*/ 
run;

Though I'm not sure how to calculate the contrasts only between 2 of the six groups (metabolically healthy obese vs metabolically unhealthy obese):

proc genmod data=&data descending;
  class   id_vol  &adjust_class  &class(ref=&ref) ;
  model &outcome =    &class &adjust_class &adjust_contin / type3 dist = poisson link = log;
  repeated subject= id_vol / type=unstr modelse;
  ods output GEEEmpPEst=modcat ; 
  estimate 'MHO vs MUO' &class 0 0 0 0 1 -1/ exp;
run; 

I've seen examples where the contrast coefficients are not necessarily integers:

estimate 'P contrast' &class -1.5 -0.5 0.5 1.5/ exp;

Thanks for your help!

The question is about using contrasts in regression analysis (here, Poisson regression with robust error variance).

We have devided the participants in our sample into 6 groups, according to their body mass index at baseline (3-category variable: normal, overweight, obese) and the metabolic status at baseline.

data d.mho; set d.mho; /*2737*/
if bmi_cat2 = 1 and Met_abnorm = 0 then gp=1; /*metabolically healthy normal weight*/
if bmi_cat2 = 1 and Met_abnorm = 1 then gp=2; /*metabolically unhealthy normal weight*/
if bmi_cat2 = 2 and Met_abnorm = 0 then gp=3; /*metabolically healthy overweight*/
if bmi_cat2 = 2 and Met_abnorm = 1 then gp=4; /*metabolically unhealthy overweight*/
if bmi_cat2 = 3 and Met_abnorm = 0 then gp=5; /*metabolically healthy obese*/
if bmi_cat2 = 3 and Met_abnorm = 1 then gp=6; /*metabolically unhealthy obese*/ 
run;

We choose the "metabolically healthy normal weight" people as the reference group. In this case, is it possible to calculate the contrasts only between group 5 and 6 (metabolically healthy obese vs metabolically unhealthy obese), while keeping 'group 1' as the reference group:

proc genmod data=&data descending;
  class   id_vol  &adjust_class  &class(ref=&ref) ;
  model &outcome =    &class &adjust_class &adjust_contin / type3 dist = poisson link = log;
  repeated subject= id_vol / type=unstr modelse;
  ods output GEEEmpPEst=modcat ; 
  estimate 'MHO vs MUO' &class 0 0 0 0 1 -1/ exp;
run; 

I've also seen examples where the contrast coefficients are not necessarily integers (but couldn't understand):

estimate 'P contrast' &class -1.5 -0.5 0.5 1.5/ exp;

Thanks for your help!

Source Link
Happy Cretine
  • 681
  • 1
  • 6
  • 22

Using contrasts in Poisson regression

I don't really understand how to use contrasts in regression analysis.

We have devided the participants in our sample into 6 groups, according to their body mass index at baseline (3-class variable: normal, overweight, obese) and the metabolic status at baseline.

data d.mho; set d.mho; /*2737*/
if bmi_cat2 = 1 and Met_abnorm = 0 then gp=1; /*metabolically healthy normal weight*/
if bmi_cat2 = 1 and Met_abnorm = 1 then gp=2; /*metabolically unhealthy normal weight*/
if bmi_cat2 = 2 and Met_abnorm = 0 then gp=3; /*metabolically healthy overweight*/
if bmi_cat2 = 2 and Met_abnorm = 1 then gp=4; /*metabolically unhealthy overweight*/
if bmi_cat2 = 3 and Met_abnorm = 0 then gp=5; /*metabolically healthy obese*/
if bmi_cat2 = 3 and Met_abnorm = 1 then gp=6; /*metabolically unhealthy obese*/ 
run;

Though I'm not sure how to calculate the contrasts only between 2 of the six groups (metabolically healthy obese vs metabolically unhealthy obese):

proc genmod data=&data descending;
  class   id_vol  &adjust_class  &class(ref=&ref) ;
  model &outcome =    &class &adjust_class &adjust_contin / type3 dist = poisson link = log;
  repeated subject= id_vol / type=unstr modelse;
  ods output GEEEmpPEst=modcat ; 
  estimate 'MHO vs MUO' &class 0 0 0 0 1 -1/ exp;
run; 

I've seen examples where the contrast coefficients are not necessarily integers:

estimate 'P contrast' &class -1.5 -0.5 0.5 1.5/ exp;

Thanks for your help!