3

I am hoping to create a logistic regression model in R that predicts an individuals probability of having hypertension. Diabetes is closely associated with hypertensive individuals, so I know I need to include that as a predictive factor in my model. I am unsure whether it makes more sense to include a variable that accounts for individuals with both conditions (HYP_AND_DBTS) or just a variable for diabetes. It seems strange to do the former since I am including the outcome (hypertension) as part of the right side of the equation as well. But when I run the model with only the diabetes variable, the p-values of certain variables increase and I lose significance of some variables. I've included both outputs below.

Which is more accurate/correct? Or could I do either? Thank you!

#this is the model which includes a variable for both people with both conditions (HYP_AND_DBTS)
logitmfx(formula = HYPERTEN ~ AGE + BMICALC + IMMIGRANT + FAMSIZE + 
    FEMALE + BELOW_100_POVERTY + EDUC_2 + EDUC_3 + EDUC_4 + EDUC_5 + 
    REGION_1 + REGION_2 + REGION_4 + YEAR_2015 + YEAR_2016 + 
    YEAR_2017 + YEAR_2018 + HLTH_INS + SMOKE + MARRIED + NON_WHITE + 
    HYP_AND_DBTS, data = df, atmean = TRUE, robust = T, clustervar1 = "PSU", 
    clustervar2 = NULL)

Marginal Effects:
                        dF/dx   Std. Err.        z     P>|z|    
AGE                0.15083910  0.00594968  25.3525 < 2.2e-16 ***
BMICALC            0.06861334  0.00951101   7.2141 5.429e-13 ***
IMMIGRANT         -0.05294019  0.01705659  -3.1038  0.001911 ** 
FAMSIZE           -0.00990962  0.00821206  -1.2067  0.227542    
FEMALE            -0.01976796  0.01814395  -1.0895  0.275930    
BELOW_100_POVERTY  0.03871126  0.01687876   2.2935  0.021820 *  
EDUC_2             0.01359200  0.02392461   0.5681  0.569955    
EDUC_3            -0.00952550  0.02821558  -0.3376  0.735667    
EDUC_4             0.02899180  0.03409216   0.8504  0.395106    
EDUC_5            -0.02595494  0.03319661  -0.7819  0.434300    
REGION_1          -0.03016470  0.01708999  -1.7651  0.077555 .  
REGION_2          -0.00180395  0.02203897  -0.0819  0.934764    
REGION_4          -0.02992794  0.01734361  -1.7256  0.084421 .  
YEAR_2015         -0.02518077  0.00300548  -8.3783 < 2.2e-16 ***
YEAR_2016         -0.00053742  0.01900565  -0.0283  0.977441    
YEAR_2017         -0.01595128  0.01754892  -0.9090  0.363371    
YEAR_2018         -0.01459648  0.02407014  -0.6064  0.544239    
HLTH_INS           0.01784144  0.02334819   0.7641  0.444780    
SMOKE              0.03954973  0.02829393   1.3978  0.162168    
MARRIED            0.03245289  0.01815822   1.7872  0.073901 .  
NON_WHITE          0.03368043  0.01736537   1.9395  0.052438 .  
HYP_AND_DBTS       0.88910842  0.00445499 199.5757 < 2.2e-16 ***

#And this is how the model changes when I just include a variable for diabetics 

logitmfx(formula = HYPERTEN ~ AGE + BMICALC + IMMIGRANT + FAMSIZE + 
    FEMALE + BELOW_100_POVERTY + EDUC_2 + EDUC_3 + EDUC_4 + EDUC_5 + 
    REGION_1 + REGION_2 + REGION_4 + YEAR_2015 + YEAR_2016 + 
    YEAR_2017 + YEAR_2018 + HLTH_INS + SMOKE + MARRIED + NON_WHITE + 
    DIABETES, data = df, atmean = TRUE, robust = T, clustervar1 = "PSU", 
    clustervar2 = NULL)

Marginal Effects:
                       dF/dx  Std. Err.       z     P>|z|    
AGE                0.1112522  0.0042543 26.1507 < 2.2e-16 ***
BMICALC            0.0523309  0.0058889  8.8864 < 2.2e-16 ***
IMMIGRANT         -0.0385289  0.0116239 -3.3146 0.0009176 ***
FAMSIZE           -0.0089823  0.0056607 -1.5868 0.1125652    
FEMALE            -0.0179256  0.0130749 -1.3710 0.1703766    
BELOW_100_POVERTY  0.0277503  0.0125239  2.2158 0.0267063 *  
EDUC_2             0.0028593  0.0154277  0.1853 0.8529664    
EDUC_3            -0.0166905  0.0175975 -0.9485 0.3428958    
EDUC_4             0.0046877  0.0213161  0.2199 0.8259399    
EDUC_5            -0.0174337  0.0210877 -0.8267 0.4083924    
REGION_1          -0.0195481  0.0126989 -1.5393 0.1237190    
REGION_2           0.0041940  0.0159316  0.2632 0.7923591    
REGION_4          -0.0193246  0.0125330 -1.5419 0.1230998    
YEAR_2015         -0.0132119  0.0051109 -2.5850 0.0097371 ** 
YEAR_2016         -0.0022472  0.0132668 -0.1694 0.8654907    
YEAR_2017         -0.0128499  0.0122312 -1.0506 0.2934520    
YEAR_2018         -0.0085240  0.0181127 -0.4706 0.6379194    
HLTH_INS           0.0168440  0.0155863  1.0807 0.2798309    
SMOKE              0.0287534  0.0210255  1.3675 0.1714536    
MARRIED            0.0202728  0.0126911  1.5974 0.1101764    
NON_WHITE          0.0231157  0.0127708  1.8100 0.0702888 .  
DIABETES           0.1443800  0.0318991  4.5261 6.007e-06 ***
``` 
juliah0494
  • 43
  • 4

1 Answers1

2

Your intuition is correct about including an explanatory variable for which the outcome is a component would be wrong. This will induce severe bias due to mathematical coupling.

But when I run the model with only the diabetes variable, the p-values of certain variables increase and I lose significance of some variables

There is nothing wrong with that. Try not to be too concerned with p-values. You didn't "lose" anything; you avoided making a serious mistake. If it helps, try to pretend that you never fitted the first model to begin with.

Also I would advise caution in the way you interpret your models. If your goal is inference, then you need to be clear about what your main exposure is, and avoid including mediators. If you have different main exposures then you may need to fit different models for each.

Robert Long
  • 53,316
  • 10
  • 84
  • 148
  • Thank you for the clear response! That makes sense. In terms of interpreting the model, I am mostly interested in seeing how the immigrant and region (1,2, and 4) variables affect predicted probability of developing hypertension. Are you saying I should consider running separate models to understand the effect of those variables? – juliah0494 Sep 22 '20 at 20:13
  • You're welcome. I would suggest drawing a causal diagram for the relations between all your variables. For each exposure (immigrant and region) you need to ensure that you exclude any variables that are on the causal path between the exposure and the outcome (mediators), but you should include potential confounders and competing exposures. See this question and answers for more detail: https://stats.stackexchange.com/questions/445578/how-do-dags-help-to-reduce-bias-in-causal-inference – Robert Long Sep 22 '20 at 20:19
  • I see. Thanks again! – juliah0494 Sep 22 '20 at 20:26