1

I am trying to find the marginal effects of my probit (but if anyone knows how to do it with a logit regression I can use that one instead) regression. My dependent variable (my Y) tells me 4 possible actions that one can do and are ordered by aggressiveness of the move (Action1: most aggressive response, Action4 least aggressive response). My independent variables are 4 variables (all continuous) that tell me the state of the system. The goal of the regression is to see how does a change in the state of the system affect the choice of reaction.

I have looked at several packages (mlogit, erer, VGAM, etc) but neither package seems to have an marginal effect function that simply gives you the marginal effect of each independent variable.

I would like to get something similar to what you can get for a binomial logit/probit regression using a marginal effect function such as maBina. For example, if I were to run a simply logit/probit regression using glm I would get:

mylogit <- glm(admit ~ gre + gpa + rank, family = binomial(link = "logit"), x=TRUE, data =    mydata)
> summary(mylogit)

Call:
glm(formula = admit ~ gre + gpa + rank, family = binomial(link = "logit"), 
data = mydata, x = TRUE)

Deviance Residuals: 
   Min       1Q   Median       3Q      Max  
-1.6268  -0.8662  -0.6388   1.1490   2.0790  

Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
(Intercept) -3.989979   1.139951  -3.500 0.000465 ***
gre          0.002264   0.001094   2.070 0.038465 *  
gpa          0.804038   0.331819   2.423 0.015388 *  
rank2       -0.675443   0.316490  -2.134 0.032829 *  
rank3       -1.340204   0.345306  -3.881 0.000104 ***
rank4       -1.551464   0.417832  -3.713 0.000205 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

but since this is a logit regression the coefficients don't tell me the marginal effect of, say, GPA on the probability of getting admitted into college. To get such marginal effect, hence to answer the question "how does an increase in the value of GPA affect my likeliness of being accepted into college?") I need to run a separate command, such as maBina and I get:

>maBina(mylogit, x.mean = FALSE, rev.dum = TRUE, digits = 3)
Call:  glm(formula = admit ~ gre + gpa + rank, family = binomial(link = "logit"), 
data = mydata, x = TRUE)

Coefficients:
(Intercept)          gre          gpa        rank2        rank3        rank4  
-3.989979     0.002264     0.804038    -0.675443    -1.340204    -1.551464  

Degrees of Freedom: 399 Total (i.e. Null);  394 Residual
Null Deviance:      500 
Residual Deviance: 458.5        AIC: 470.5

$out
             effect error t.value p.value
(Intercept) **-0.776** 0.233  -3.337   0.001
gre          **0.000** 0.000   1.931   0.054
gpa          **0.156** 0.069   2.263   0.024
rank2       **-0.136** 0.061  -2.221   0.027
rank3       **-0.261** 0.072  -3.614   0.000
rank4       **-0.251** 0.049  -5.106   0.000

where "effect" (the 2nd column from the left in the latest table, in bold) is what I'm looking for.

g_puffo
  • 613
  • 3
  • 11
  • 21
  • Have you considered moving this to [stats.SE]? I might take a shot at answering this there. – tchakravarty May 14 '14 at 23:57
  • Hi and thanks for answering! How do I move it to Cross Validated? I have no problem moving my question there if it means getting a new answer. – g_puffo May 15 '14 at 06:23
  • My suggestion would be to post a new question on CV, and request this one to be deleted. This question already has an answer so the mods might decide not to delete this. – tchakravarty May 15 '14 at 06:41

1 Answers1

0

Generally one uses summary.glm and pulls the coefficients table from that object if all you want is the table of coefficients and standard errors, which it appears is the case here:

 summary(glmfit)$coefficients   # or
 coef( summary(glmfit))

On the other hand if what you want are predictions for proportions or probabilities, then the use of predict.glm is capable of delivering predicted responses on the measured scale rather than on the transformed scale where the regression coefficients were estimated:

?predict.glm

There is also an effects package that provides graphical displays and allows specification of selected contrasts.

install.packages("effects", dependencies=TRUE)
help(package="effects")

It would clarify your expectations if you presented a simple example and said what values you mean to be "effects".

So after clarification I now wonder if you want a programmatic method for extracting a particular value. If so then it is as simple as:

> ea$out['gpa', 'effect']
[1] 0.534       # where ea is the object created in ?maBina example
IRTFM
  • 258,963
  • 21
  • 364
  • 487
  • Thanks for your reply! It's my understanding that with a logit or probit model the coefficients of the regression DON'T tell me the marginal effects of my regressors. I'm not interested in predicting per se but I would just like to know how does a change in value of X1 affect the likeliness that either of the 4 actions will be chosen. I have edited my initial question to better explain what do I mean by "marginal effect". – g_puffo Nov 13 '13 at 22:30
  • Exactly. Which was why I was surprised that you offered the coefficients matrix as what you said you wanted. I pointed out that `predict.glm` allowed you to specify a `..,type="response",...` parameter which was what I wondered whether you might be seeking. Again. Posting a dataset with your expectations for the particular result is the way to best pose questions. – IRTFM Nov 13 '13 at 22:33
  • I'm sorry, I have edited my question so to make more clear which is the regression output (of my example binary logit regression) and which one is the marginal effects output (for my example, obtained using function maBina) for the regression. Unfortunately I'm cannot post the dataset but I'm not sure how could that be helpful in determining how to use R in order to get the marginal effects I'm after. Also, I have no expectation of the values of those marginal effects given that I don't know how to get them in R – g_puffo Nov 13 '13 at 23:56
  • I'm sorry, it seems that in my attempt to make things more clear I actually made them more complicated! what I provided you with is an example of a BIVARIATE logit model, for which there are several functions that allow one to compute the marginal probabilities. What I need is how to do it when we have a MULTINOMIAL logit regression (not binomial) – g_puffo Nov 14 '13 at 01:56
  • Surely there is something you can do. Why not post the results of `dput(maBina(mylogit, x.mean = FALSE, rev.dum = TRUE, digits = 3)$out)`, and be sure to say WHICH number you want. – IRTFM Nov 14 '13 at 06:01