The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [marginal-effect]

Marginal effects measure the change in the conditional mean of outcome $y$ when regressors change by one unit.

91 questions
Filter by
Sorted by
Tagged with
27 views

Make Nonlinear Smooth Interpretable in Logistic GAM Regression

I have a nonlinear smooth fit in a logistic regression from the package mgcv in R. Visualizing the smooth, the y-axis I get using either ...
10 views

Marginal effects of a smooth in a gamm4 model

I'm trying to obtain marginal effects of a smooth in a {gamm4} model. I notice a discrepancy between what {ggeffects} gives me and what I get manually. For a smooth x0, I calcualte the predictions ...
27 views

Is it necessary to adjust for multiple comparisons (e.g. Bonferroni) when using continuous interaction terms (e.g. age)?

I am interested in analyzing how the effect of a dichotomous variable on a dichotomous outcome changes by age. In reading this how-to article from UCLA's Institute for Digital Research & Education-...
42 views

Marginal effects in multinomial logit in R

I am trying to calculate average marginal effects (dF/dx) for a multinomial logit model in R. Package mfx provides the solution only for binomial (and not the multinomial) model. Is there a package or ...
28 views

interpretation of AME for logistic regression with log transformed and mean centered variable with interaction

I transformed my independent variables: MCfunction <- function(x) (log(1+x) - mean(log(1+x), na.rm=T)) ...
74 views

AME (Average Marginal Effect) for lme4::glmer using margins::margins command

I am running a logistic mixed model regression using lme4::glmer Command. I wanted to report AME (average marginal effect for my coefficients). I used the ...
16 views

Difference in scales for marginal effects

I am trying to run a fixed parameter model, a random parameter model and a latent class model with the same dataset. My dependent variable is whether or not an individual in wearing a seat belt. And ...
34 views

Substantive Interpretation of Negative Binomial

I am trying to interpret the output from a negative binomial regression. Online, I read that we can exponentiate the coefficients to get substantively significant values. However, I know that this ...
41 views

Interpretation of Marginal Effects for Dummy Variable (using mfx package in R)

So, I calculated a negative binomial regression model and I am trying to estimate the mean marginal effects in R. To do this, I used the mfx package and wrote the ...
31 views

Marginal Effects in R

I estimated a negative binomial regression model in R that counts the number of cyberattacks a country initiates per year. My unit of observation is country-year. Since cyberattacks are a very rare ...
9 views

Marginal Treatment Effect with a continuous treatment variable

I am totally new to the concept, but I would like to apply a MTE estimation within the following simultaneous equation model (if it is even possible) : \begin{cases} Y_i = \alpha_0 + \alpha_1. A_i + ...
26 views

Marginal distributions for Dirichlet regression

I have a compositional data set with three options (OptionND, OptionSD and OptionPV) that sum to 1.0 for each observation. I have two potential explanatory variables Age and Income. Here is a sub ...
11 views

Computing marginal probability and Bayes factor of structural model

I have a Bayesian structural model of the following format: $Y1 = X \alpha +\epsilon$ $Y2 = S \beta + \eta$ $\epsilon = \gamma \eta + \chi$ where Y1 and Y2 are linked by the error terms. I ...
52 views

Which emmeans to choose between full and main effect mixed effect models with heteroscedasticity corrected

I have a split splot full factorial design : 3 blocks, each block contains 4 plots for factor E and each plot is divided into 3 subplots for factor F. I use a mixed effect model with random effects on ...
54 views

Why margins and mfx yield different results in R?

When I run a simple logit regression between a binary variable $y$ over another binary variable $x$, the average marginal effects obtained by the function logitmfx (...
482 views

lm and glm function in R

I was running a logistic regression in r using glm() as glm(Y ~X1 + X2 +X3, data = mydata, family = binomial(link = "logit")) ...
24 views

Interpretation of average marginal effect for proportion outcome in Poisson model with offset

To see the association of malaria prevalence with village level risk factors, I ran a Poisson model in r with the prevalence of malaria(y) as a dependent variable, altitude(x1) and Forestation(x2) as ...
23 views

Marginal effects in an AB/BA cross-over study

I am currently working on an AB/BA cross-over study. There I have a treatment $T$, a time-varying covariate $X$ and a dummy variables $Z$. I wish to study the interaction between $X$ and $T, Z$. I ...
49 views

Using variance-covariance matrix of mixed-effects logistic regression to obtain p-values for custom contrasts

My question is a follow-up to this question, following through on @Isabelle Ghement's excellent series of responses. I just want to run this past some people in the know to see if what I am doing is ...
42 views

Logit regression: Treat binary indepedent variables as continuous or as categorical for the marginal effect?

I have two logit models: A standard binary one (y=0/1) and an ordered logit model (y = yes, definitely/yes, maybe/no, probably not/no, definitely not. Now, to get the marginal effects of the binary ...
316 views

Standard partial regression plot vs. effect plot from 'effects' package

I'll use a modification of this example to ask my question about an apparent alternative way of presenting a partial regression plot, using the effects package. ...
44 views

Interpreting marginal effect of interactions in OLS

I have the following model, as you can see I have included an interaction between i.own for 10 dummies and innoscore which is grand mean centred as a way of making interpretation easier. ...
31 views

GSEM Tobit margin

I am trying to estimate the marginal effects as follows but am unable to get it right. I run the tobit model and it shows ok, but am not sure how to replicate it with gsem. I am running Stata 14.2 MP. ...
10 views

Marginal effets

Good morning I would like to question you something This is my regression and my marginal effects, they are inqual, what should be the problem? How can I interpret this results
422 views

How to interpret the marginal effect of a dummy regressors in a logit model

I have a problem interpreting the marginal effect of a dummy variable in a logit model. (I am using Stata to estimate the logit regression) I've run a simple logit say this: ...
62 views

Surprisingly large difference between conditional and marginal effects estimates

I am performing a logistic mixed effects regression on some data I have. There are 201 participants answering a question over 6 time points. The model includes 4 fixed effects: X1, X2, X3, and Time. ...
42 views

Marginal interpretation of fixed effects in GLMM

I understand that when applying GLMMs (e.g. in logistic mixed effects regression), the interpretation of the coefficients for the fixed effects is that they are also conditional on the random effects (...
303 views

Delta Method Average Marginal Effects Multinomial Logit

Following the incredible demonstration in Statalist by Jeff Pitblado on how to calculate - using the Delta Method - the Standard Errors for Average Marginal Effects of a Logit Model. Q: What would ...
53 views

Interpretation of sign switch of marginal effect

I have calculated marginal effects for my problem. How do I interpret aswitch of the sign of the marginal effect (see plot). For example, when I want to answer a question like the following. Does ...
284 views

Is delta method better than bootstrap to generate standard error for marginal effects?

I read here, here, here, here, and elsewhere that " Parametric bootstrap closely related to objective Bayes. (That’s why it’s a good importance sampling choice.) When it applies, parboot approach ...
258 views

OLS effect of X squared ond dependent variable

I have my OLS regression: $y = \beta_1 + \beta_2 X_2 + \beta_3 X_3 +\beta_4 (X_3)^2$ Could anybody please explain to me the effect of a change in $X_3$ on the dependent variable?(Is the effect ...
91 views

Margins in “R” throws confidence intervals that do not contain cero, yet p-value > 0.05. Is this possible?

I am running a logit model on survey data using the svyglm function in the survey package in R. I am using the margins function to find the average marginal effects, but then something weird happens. ...
465 views

...
36 views

Interpreting marginal plots and results from underlying regression

I am helping someone with a project and want to be sure I am understanding how to interpret this correctly. We are running a simple OLS regression where we are predicting a continuous DV (number of ...
62 views

How to interpret an interaction between an endogenous and an exogenous variable

Consider the following model for a regression : $y = \beta_0 + \beta_1 x_1 + \beta_2 x_2+ \beta_3 x_1 x_2 + u$. Suppose $x_1$ is exogenous and $x_2$ is endogenous. Endogeneity precludes me from ...
144 views

About Partial dependence for Poisson GLM

Can someone tell me what would be the expression for calculating the partial dependence on a GLM model with family specified as Poisson? From applying Friedman partial dependence estimation ...
389 views

Interpreting Marginal Effect Results

I'm having a little bit of difficulty interpreting the marginal effects results I obtained since I am quite new to this sort of stuff. For my model I'm running an ordered probit regression where there ...
1k views

Predicted probabilities and marginal effects relationship (R, margins package)

Working on a logit model, i get the following results: Predicted Probs.: ...
860 views

Average Marginal Effects vs. Marginal Effects at the Mean

Can the Logit regression produce different results for Marginal Effects at the Mean and Average Marginal Effects? If so, what does that mean?
133 views

Which p-value should I use ? (Probit and interaction terms)

I ran a Probit model to determine which variables/interaction terms are significant. I got these results: Probit: "mino" is not significant. Whith the margins command (Averadge marginal effect) I ...
266 views

How to calculate probit marginal effects over groups with Stata [closed]

How to properly calculate marginal effects of a probit model to capture marginal effect of one variable over a group. The setup is the following (simplified version): Data: ...
60 views

test the significance of the marginal effects of a spatial probit model

I'm using the CRAN package spatialprobit to estimate a Spatial Probit. The function sarprobit calculates the marginal effects ...
174 views

Is the t-value (or z-value) of the margins of a logit model equal to the t-value of the coefficient?

The accepted answer of this question seems to indicate that the z-value of the margin is the same as the z-value of the coefficient in the logit model. This, it seems, is true with how Stata ...
149 views

Marginal effect of variables - Logistic regression, Boosted tree, and other tree-based models

Assuming I have a classification problem where I have binary dependent variable Y and independent variables X1-X10. The X variables are categorical. Say we are interested in the marginal effect of ...
750 views

fixed effect and marginal effect in negative binomial

Probably this question has no sense but I am really confused and I need help. I have a panel data model. I ran a fixed effect negative binomial regression for a variable which indicates the number of ...
175 views

Predicted probability at the mean decreases when more variables are added to a Logistic regression model

I have been thinking about this question for the past couple days and have not been able to come to a conclusion. I am running a logistic regression and want to calculate the % change in predicted ...
508 views

How to calculate marginal effects in McFadden's choice model?

I am estimating a multinomial choice model in stata with the command asclogit. One of the case specific variable is a dummy variable. I want to get the marginal effects of the dummy variable on choice ...
87 views

To which p-value should I look at? Of the regression coefficient or of the Average Marginal Effect?

I am trying to analyse this logit regression model using R. I wish to identify the effect of a treament variable (...
Using a linear model like OLS, the marginal effects are simply the coefficients given by $\beta = (X'X)^{-1}X'y$. However, in a nonlinear model, it is more difficult to derive marginal effects. For ...
Consider the generalized regression model (in my case a probit, but I'll leave it more generally): $$E[y|X] = F(x'\beta)$$ where both $x$ and $\beta$ are ($K \times 1$) column vectors and $F$ is ...