# Tag Info

18

As some of the information you provided states, the two are not the same. I like better the terminology of conditional (on covariates) and unconditional (marginal) estimates. There is a very subtle language problem that clouds the issue greatly. Analysts who tend to love "population average effects" have a dangerous tendency to try to estimate such ...

15

The average marginal effect gives you an effect on the probability, i.e. a number between 0 and 1. It is the average change in probability when x increases by one unit. Since a probit is a non-linear model, that effect will differ from individual to individual. What the average marginal effect does is compute it for each individual and than compute the ...

10

If you take a look at the R help documentation you will note that there is no family argument for the lm function. By definition, lm models (ordinary linear regression) in R are fit using ordinary least squares regression (OLS) which assumes the error terms of your model are normally distributed (i.e. family = gaussian) with mean zero and a common variance. ...

8

You know that in a logit: $$Pr[y = 1 \vert x,z] = p = \frac{\exp (\alpha + \beta \cdot \ln x + \gamma z)}{1+\exp (\alpha + \beta \cdot \ln x + \gamma z )}.$$ After some tedious calculus and simplification, the partial of that with respect to $x$ becomes: $$\frac{\partial Pr[y=1 \vert x,z]}{\partial x} = \frac{\beta}{x} \cdot p \cdot (1-p).$$ This is (...

6

For a continuous variable, the marginal effect of $x_k$ in a logit is $$\Lambda(X'\beta)\cdot \left[1-\Lambda(X'\beta)\right]\cdot\beta_k,$$ where $$\Lambda(z)=\frac{\exp{z}}{1+\exp{z}}.$$ By default, Stata actually calculates the average of this over the estimation sample, but I will use the mean value of x in what follows (marginal effect at the mean ...

6

If you are interested in an approximation of the average partial effect you could just use a linear probability model in the first stage, i.e. do your instrumental variables estimation via 2SLS, for instance, in the usual way. However, due to the non-linearities involved this is not the efficient approach but it can give a good initial idea of the effect ...

6

The general approach to analysis of missing data using multiple imputation is create several complete datasets, let's say $m$, using whatever multiple imputation alogorithm you choose perform the final analysis model (eg a regression model) on each complete dataset. That is, you would run $m$ models. pool the results of the analyses. With a linear ...

5

The answers above are mostly correct, but not completely so. In general exp(bi) is the estimate of odds(x+1)/odds(x). This can be shown with some simple arithmetic. As Alex noted, for the dummy in question, white is 1 and non-white is 0, so we can think about this as x+1 and x, when x = 0. As such, if exp(bi) were 0.6, then: odds(white)/odds(non-white)...

5

If confidence and p-values are calculated using different methods, then this situation is possible. The $z$-test you have there is a Wald's $z$-test: $$z=\frac{AME}{SE}\quad\text{then}\quad p=\min{\Big\{1,2\times\big(1-\Phi(\lvert z\rvert)\big)\Big\}}$$ # in R syntax: min(1, 2 * (1 - pnorm(abs(AME / SE)))) For the confidence intervals to correspond to the ...

4

I suspect that this is just rounding error: The computer program just used more digits to compute the marginal effect than you did. Alternatively, if your model is non-linear (e.g. a logit or Poisson) then it could be that the marginal effect you got was actualy an average marginal effect instead of a marginal effect at the average. For an average marginal ...

4

As @Tomas already explained greatly in his answer you have to drive to $X_3$. $$\frac{\partial y}{\partial X_3}= \beta_3 + 2 \times \beta_4 \times X_3$$. As you want to now whether the derivative is positive you face the inquality: $$0>\beta_3 + 2 \times \beta_4 \times X_3$$. Depending on $X_3$ you can change the equation to $$\frac{-\beta_3}{2 * \... 4 Using Gaussian error propagation: summary(fit <- lm(Y ~ X + M + X*M)) sigma2mat <- vcov(fit)[-c(1, 3), -c(1, 3)] sum(coef(fit)[-c(1, 3)]) + c(-1.96, 1.96) * sqrt(sum(sigma2mat)) #[1] 147.3562 226.2858 Using bootstrapping: library(boot) DF <- data.frame(X, M, Y) set.seed(42) myboot <- boot(DF, function(DF, i) { fit <- lm(Y ~ X + M + X*M, ... 3 If your regression model is wage=b_0+b_1(exper)+b_2(exper)^2+(others variables) = b_0 + 2.36(exper) - 0.077(exper)^2 + (other variables), then the marginal effect of experience on wages is given by the partial derivative of wages wrt experience, given by w_(exper) = 2.36 - 2*0.077(exper) = 2.36 - 0.154(exper). Hence the effect of adding an extra ... 3 This has been answered before but I will try to include a very simple explanation which can hopefully get you on the right track. A logit regression model, linking the probability of a dependent variable y to some vector of independent variables X is written as follows$$Pr(y=1) = \Lambda(X\beta)$$where \Lambda() represents a logistic c.d.f. The ... 3 In a Poisson model,$$E[y \vert x]=\exp(\alpha + \beta x + \gamma x \cdot b).$$The derivative would be$$\frac{\partial E[y \vert x]}{\partial x}=\frac{\partial \exp(\alpha + \beta x + \gamma x \cdot b )}{\partial x}=\exp(\alpha + \beta x + \gamma x \cdot b)\cdot(\beta+\gamma b).$$This is a function of x and b, and folks create many types of marginal ... 3 If you want to show how your outcome resp is related to pred1, you should go for the second approach, because in the first one the predictions you obtained are affected by changing values of pred2 and pred3. In general, you can something like this plot_data <- with(Xs, expand.grid( pred1 = seq(min(pred1), max(pred1), length = 100), pred2 = ... 3 You just take the first derivative of the function with respect to X_3:$$\frac{\partial y}{\partial X_3}= \beta_3 + 2 \times \beta_4 \times X_3$$You may see that the effect of changing X_3 on y is not constant, but depends on the observed value of X_3 (for some, say, i-th observation). Also, ceteris paribus (other things fixed) interpretation ... 3 The reason why you see this big difference is because the variance of your random effects is quite big. To see why is this happening, check slide 334 in my course notes for Repeated Measurements. That is, in the case you have only random intercepts, you have the relation$$\beta^M = \frac{\beta^{SS}}{\sqrt{1 + 0.346 \sigma_b^2}},$$where \beta^M are the ... 3 A generic way to obtain this would be the following: mcoefs <- marginal_coefs(glmmAdapt, std_errors = TRUE) object <- glmmAdapt newdata <- data.frame(group = "Active", week = "week08") termsX <- delete.response(objectTermstermsX) mfX <- model.frame(termsX, data = newdata, xlev = .getXlevels(termsX, objectmodel_frames... 3 I don't think you can achieve what you want as you need the intercept to properly calculate the estimated probability for a given value of the covariate. predict(mymod, type = "response") will get you that. This becomes more difficult when you have additional covariates in the model if you want to look at the effect of varying covariate x on the response. ... 3 The average marginal effect and the slope coefficient in a logistic regression are two very different quantities, so the p-values correspond to very different tests. It is often the case that when one is not zero, the other is not zero, and they are typically in the same direction, so it makes sense that the p-values are similar. For this explanation, I'll ... 3 I think this is a good way to explain the details. I got it from Counterfactuals and Causal Inference by Morgan and Winship, which is a wonderful book. Let's say we are interested in the effect on wages from attending college (D). I am not a huge fan of distance, so imagine we had an instrumental variable Z that is a lottery where winners get a voucher ... 2 From a quick search, I think you must first define a function that calculates the average of the sample marginal effects for the logit model. You can have a look at this: http://www.r-bloggers.com/probitlogit-marginal-effects-in-r/ mfx <- function(x,sims=1000){ set.seed(1984) pdf <- ifelse(as.character(xcall)[3]=="binomial(link = \"probit\")", ... 2 One way to think of a GLM is to specify a linear predictor, which must be a linear function of covariates:$$ \eta_i = X_i \beta, $$an inverse-link g, whose input is linear predictor and output is the conditional mean:$$ \mu_i = E(Y_i | X_i) = g \left( \eta_i \right), $$and a variance function, which depends on only on the conditional mean, and is ... 2 The logistic regression estimates conditional probabilities$$\hat P(y_i\mid x_i, z_i) = \Lambda(\hat \alpha + \hat \beta x_i +\hat \gamma z_i) with $y_i$ "going to college", $x_i$ "income" and $z_i$ "gender", with $z_i=1$ representing "male". Let $i$ index the observations related to males, and $j$ the observations related to females. We will write for ...

2

The partial derivative does not necessarily identify the causal impact of a binary treatment. Some assumptions about the joint distribution of the treated and untreated outcomes are needed for this. If a treatment causes rank reversals in the distribution, then knowing the difference of $\tau$th quantile for two distributions is not enough to calculate the \$\...

2

Here's the explanation of what contrasting margins means. Let's fit a toy Tobit model (you could also use intreg), where we interact the foreign dummy with weight: sysuse auto, clear generate wgt=weight/1000 tobit mpg i.foreign##c.wgt c.headroom, ll(17) ul(30) This yields: Tobit regression Number of obs = 74 ...

2

There is no law that says you have to test anything; you can just report estimates. I suggest including confidence limits as well, and explaining exactly what you are showing.

2

The problem that you are facing is that if two predictors are correlated it is difficult to talk about the effect of each over and above the effect of the other which is what you might get if you put both into a multiple regression. This is not a problem with the statistics or the programming, most decent modern software will handle very highly correlated ...

Only top voted, non community-wiki answers of a minimum length are eligible