0
$\begingroup$

I ran a binomial model with a logit link in R. I am trying to understand the coefficient relation to the logit scale output provided by the emmeans package in R. Idled is the reference level for "manip" and included in the intercept. Slcarea, mean_vd.x, and mean_mfvd.x are continuous and numerical.

Call:  glm(formula = KILL ~ manip + slcarea + mean_vd.x + mean_mfvd.x, 
    family = binomial(link = logit), data = sbm)

Coefficients:
  (Intercept)  manipburnplus      manipdisk   manipharvest       manipmow        slcarea      mean_vd.x    mean_mfvd.x  
     0.226982       1.593982       0.415085       1.356314       0.036138       0.682750      -0.015690      -0.007954  

Here is the emmeans output on the logit scale:

> confint(emmeans(fm_sbm_KILL_veg,"manip"),level = .85)
 manip    emmean    SE  df asymp.LCL asymp.UCL
 idle     -0.836 0.296 Inf   -1.2624   -0.4105
 burnplus  0.758 0.469 Inf    0.0828    1.4323
 disk     -0.421 0.244 Inf   -0.7729   -0.0698
 harvest   0.520 0.707 Inf   -0.4985    1.5383
 mow      -0.800 0.753 Inf   -1.8847    0.2841

Results are given on the logit (not the response) scale. 
Confidence level used: 0.85 

and emmeans on the response level (probability):

> confint(emmeans(fm_sbm_KILL_veg,"manip"),level = .85,type="response")
 manip     prob     SE  df asymp.LCL asymp.UCL
 idle     0.302 0.0624 Inf     0.221     0.399
 burnplus 0.681 0.1019 Inf     0.521     0.807
 disk     0.396 0.0584 Inf     0.316     0.483
 harvest  0.627 0.1654 Inf     0.378     0.823
 mow      0.310 0.1611 Inf     0.132     0.571

Confidence level used: 0.85 
Intervals are back-transformed from the logit scale 

I understand the emmeans logit to emmeans response relationship (inverse logit) but not the coefficient to logit scale output. Can someone help me understand this connection? More specifically, how would I calculate the idle level (-0.836) from the intercept coefficient (0.226982)?

As Russ suggested.

> emmeans(fm_sbm_KILL_veg,"manip",level=.85)@linfct
     (Intercept) manipburnplus manipdisk manipharvest manipmow       slcarea mean_vd.x mean_mfvd.x
[1,]           1             0         0            0        0 -1.266326e-17  51.33096    32.43631
[2,]           1             1         0            0        0 -1.266326e-17  51.33096    32.43631
[3,]           1             0         1            0        0 -1.266326e-17  51.33096    32.43631
[4,]           1             0         0            1        0 -1.266326e-17  51.33096    32.43631
[5,]           1             0         0            0        1 -1.266326e-17  51.33096    32.43631
$\endgroup$

1 Answer 1

1
$\begingroup$

If you look at

EMM = emmeans(...)
EMM@linfct

Then each row of linfct has exactly the linear combination of coefficients that is used to obtain each estimate (on the logit scale).

$\endgroup$
4
  • $\begingroup$ Posted the result of your suggestion. I still am not making the connection. $\endgroup$ Apr 9, 2021 at 3:45
  • $\begingroup$ With each row of linfct, multiply each of those values by their corresponding regression coefficients, then add up the results to obtain the prediction for that row. Use all of the elements of each row, and all of the regression coefficients. In particular, there are two numeric covariates in this model, and those play a role in the predictions because they are included in the regression equation. $\endgroup$
    – Russ Lenth
    Apr 9, 2021 at 12:51
  • $\begingroup$ Russ - In my first attempts to add up the equation, I didn't use all the decimal places from the coefficients. After fixing that, then I got the -.836. Thanks for the help! $\endgroup$ Apr 9, 2021 at 14:29
  • $\begingroup$ Basically, that's a sign of numerical ill-conditioning. Not that unusual when a model includes covariates that stay far away from zero. For that reason, people often standardize, center, or code their covariates. $\endgroup$
    – Russ Lenth
    Apr 9, 2021 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.