1

I am trying to figure out how to calculate the marginal effects of my model using the, "clogit," function in the survival package. The margins package does not seem to work with this type of model, but does work with "multinom" and "mclogit." However, I am investigating the affects of choice characteristics, and not individual characteristics, so it needs to be a conditional logit model. The mclogit function works with the margins package, but these results are widely different from the results using the clogit function, why is that? Any help calculating the marginal effects from the clogit function would be greatly appreciated.

mclogit output:

Call:
mclogit(formula = cbind(selected, caseID) ~ SysTEM + OWN + cost + 
    ENVIRON + NEIGH + save, data = atl)

         Estimate Std. Error z value Pr(>|z|)    
SysTEM   0.139965   0.025758   5.434 5.51e-08 ***
OWN      0.008931   0.026375   0.339    0.735    
cost    -0.103012   0.004215 -24.439  < 2e-16 ***
ENVIRON  0.675341   0.037104  18.201  < 2e-16 ***
NEIGH    0.419054   0.031958  13.112  < 2e-16 ***
save     0.532825   0.023399  22.771  < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Null Deviance:     18380 
Residual Deviance: 16670 
Number of Fisher Scoring iterations:  4 
Number of observations:  8364 

clogit output:

Call:
coxph(formula = Surv(rep(1, 25092L), selected) ~ SysTEM + OWN + 
    cost + ENVIRON + NEIGH + save + strata(caseID), data = atl, 
    method = "exact")

  n= 25092, number of events= 8364 

             coef exp(coef)  se(coef)       z Pr(>|z|)    
SysTEM   0.133184  1.142461  0.034165   3.898 9.69e-05 ***
OWN     -0.015884  0.984241  0.036346  -0.437    0.662    
cost    -0.179833  0.835410  0.005543 -32.442  < 2e-16 ***
ENVIRON  1.186329  3.275036  0.049558  23.938  < 2e-16 ***
NEIGH    0.658657  1.932195  0.042063  15.659  < 2e-16 ***
save     0.970051  2.638079  0.031352  30.941  < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

        exp(coef) exp(-coef) lower .95 upper .95
SysTEM     1.1425     0.8753    1.0685    1.2216
OWN        0.9842     1.0160    0.9166    1.0569
cost       0.8354     1.1970    0.8264    0.8445
ENVIRON    3.2750     0.3053    2.9719    3.6091
NEIGH      1.9322     0.5175    1.7793    2.0982
save       2.6381     0.3791    2.4809    2.8053

Concordance= 0.701  (se = 0.004 )
Rsquare= 0.103   (max possible= 0.688 )
Likelihood ratio test= 2740  on 6 df,   p=<2e-16
Wald test            = 2465  on 6 df,   p=<2e-16
Score (logrank) test = 2784  on 6 df,   p=<2e-16

margins output for mclogit

margins(model2A)
   SysTEM      OWN      cost ENVIRON   NEIGH   save
 0.001944 0.000124 -0.001431 0.00938 0.00582 0.0074

margins output for clogit

margins(model2A)
Error in match.arg(type) : 
  'arg' should be one of “risk”, “expected”, “lp”
ssm1020
  • 33
  • 5
  • It is better to provide a [MER](https://stackoverflow.com/help/minimal-reproducible-example), so others can reproduce your results and provide further help. Additionally, could you elaborate more on that: _"I am investigating the affects of choice characteristics, and not individual characteristics"_ ? – Álvaro A. Gutiérrez-Vargas Mar 21 '21 at 13:35
  • @ÁlvaroA.Gutiérrez-Vargas https://data.princeton.edu/wws509/notes/c6s3 look at this link for a detailed break down of the difference between multinomial and condition logit models. The biggest difference is in the utility function, I am focused on how the choice characteristics affect the individuals selecting a choice, and not how the individuals characteristics affect which alternative they select. I also am not allowed to share my data, so i am unsure how i would provide a MER. – ssm1020 Mar 22 '21 at 15:20
  • Real data is not required; simulated one suffices for a MER. – Álvaro A. Gutiérrez-Vargas Mar 24 '21 at 13:39

0 Answers0