Questions tagged [marginal-effect]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

Package brms (STAN): 3D-plot about tensor product interactions

I am using the 'brms' package to fit some Generalized Additive Models in R, through STAN. The package interfaces well with the 'mgcv' package, for fitting splines, and I was thinking about plotting ...
0
votes
1answer
28 views

What is the marginal effect when there is interaction in a regression model?

I have data which has experience(in months), genderMale, and exp*genderMale (interaction). My question is: What's the marginal ...
0
votes
0answers
26 views

Multinominal logit regression - marginal effects

I am running a multinominal logit regression with five dependent variable categories: "1", "2", "3", "4" and "5". I computed marginal effects in Stata ...
0
votes
1answer
63 views

average marginal effect AME vs. average partial effect APE

Say I have a binary logistic regression model: model1 : logit = b0 + b1 *age + b2 *gender_f + b3 *race_f with age being continuous and race_f and gender_f being two-level factors. The margins() ...
0
votes
0answers
8 views

Showing the marginal effects of a first stage regression, is there any point?

I am using a CF/2SRI method to estimate the effect of an endogenous discrete explanatory variable, with a non-linear first stage. It appears to be common practice (in economics at least) to argue and ...
1
vote
0answers
22 views

Control Function (CF) / Two Stage Residual Inclusion (2SRI) - with an ordinal EEV - in Stata

I am mostly an R user. But since I have not found a way yet to reproduce generalised residuals in R (link), I am using Stata for ...
0
votes
0answers
31 views

standard error of the marginal effect of a three-way interaction

Imagine we have a three-way interaction. For example: Y = b_0 + b_1X + b_2W + b_3Z + b_4XW + b_5XZ + b_6ZW + b_7XZW + e I want to know how to compute the standard ...
0
votes
0answers
28 views

The interpretation of a positive glm coefficient, with a negative marginal effect

I found this post titled: "Positive coefficient but negative marginal effect in mlogit". EDIT: However I recently had the same "issue" with an ordinal probit model and the ...
0
votes
0answers
23 views

how to compute marginal effects of predictors in NBSTRAT (truncated & endogenously stratified negative binomial) model? (Stata)

I'm using STATA 16.0 to develop recreational demand function via using NBSTRAT model. I have several factor and continuous variables that force me to use "xi:" prefix in the model syntax ...
1
vote
2answers
39 views

Getting the (Stata) margins from fractional regression (=glm with family quasibinomial) for an ordinal variable in R

I first found this really nice Stata video on fractional regression (the dependent variable is a proportion including 0 and 1). I am especially interested in how he applies the margin approach to ...
0
votes
0answers
37 views

How to interpret the marginal effects (MEM) of binary variables in R?

My model is binary logit regression and the dependent variable is default (whether a loan would be defaulted, if it was, it is given a value of 1). I ran logitmfx (...
0
votes
1answer
15 views

Testing reliability of regression coefficients

If I run a logit/linear regression for the purpose of measuring marginal effects and estimating the causal impact of a specific independent variable on the dependent variable, is there a reliable way ...
0
votes
0answers
22 views

Marginal effect of discrete R.V. in multinomial or binary logit

I am trying to prove a formula for the marginal effect of a discrete random variable in the context of multinomial logit. Strictly speaking, I believe this could be solved in a logit framework as well,...
0
votes
0answers
19 views

Replicating STATA output for RR and confidence intervals based on marginal effects in [R]

I am working on replicating an output from STATA, with the following data where we want to obtain Relative risk and confidence intervals based on the marginal effects. I have been able to calculate ...
0
votes
0answers
7 views

Average marginal effects/predictions vs. effects/predictions averaging across other covariates

Example 2 here shows the model $$write = ses + female$$ where $SES$ is a three level categorical variable and $female$ is a dummy variable. The example (using SAS) shows how to predict a value of $...
0
votes
0answers
22 views

Difference in intuition: instrument vs bivariate model

this is a follow-up to this question. I wanted to estimate using Stata's cmp command a system of 2 equations: an ordered probit and a linear equation. 1 - linear model: $$y = \alpha + \beta z + \...
2
votes
1answer
24 views

Is Dropping Interaction Terms Reasonable if You Just want Partial Regression Weights

Without interaction terms in a model, coefficients of lower order terms represents partial regression weights (i.e. how much influence does one parameter have assuming all other parameters are held ...
1
vote
0answers
27 views

Hazard-ratio of marginal effects?

I am doing a study on manipulated hospital discharges using a similar methodology as this paper. In short, we observe that patients are more likely to be discharged directly after a higher tariff rate ...
0
votes
1answer
58 views

Deriving marginal effects for a bivariate model: ordered probit + linear regression

I am having trouble obtaining marginal effects of the following model in Stata, so that I would love to have some help in how to obtain an expression by hand: I have a system with two equations: an ...
1
vote
0answers
62 views

Marginal effect for mixed effects models (for python statsmodels)

I have a mixed effects model, developed using python statsmodels, and I want to know the effect of each independent variable on the response variable, assuming all other variables are constant. Based ...
0
votes
0answers
44 views

Is it possible and reasonable to use AMEs for interpretation in a logistic regression even if the spline methodology is to be used?

Because of the linearity assumption of the logistic regression I have to use splines for my regression. I am now wondering if I should still use AMEs to extend the results? I am working with R. I know ...
0
votes
0answers
69 views

About comparing coefficients between logistic regression models with AME

I have two questions about comparing coefficients between two or more logistic regression models with different number of variables. I estimated three different logistic models (using R, the ...
0
votes
0answers
10 views

How to predict the marginal effects including interaction with only one of the categorical predictors in lme?

generate a fake data set suppose I have 10 sites, each with 3 blocks, in each block, I have a factorial design of treatment 1 (control and trt1) and treatment 2 (control and trt2). I want to look at ...
0
votes
1answer
86 views

Average Marginal Effects interpretation when explanatory variables are ratios

In short, I am working with a classification problem where I have conducted a logistic regression. The dependent variable is a binary variable with the five explanatory variables being ratios ranging ...
0
votes
1answer
44 views

How to compute Poisson mfx when a regressor changes by more than one unit?

I am running a Poisson regression on some data and I have to interpret the marginal effects on the dependent variable when one of the regressors decreases by 45 units. I understand the marginal ...
0
votes
0answers
106 views

How to estimate the marginal effects from panel tobit model in R

I am working with a 7-year panel data using forest loss as an outcome. Forest loss is expressed in percent of the area, and only 6% of the areas had forest loss. Given the large number of zeros in the ...
1
vote
1answer
62 views

How ca we use add_grouping with emtrends in R to estimated marginal means of linear trends? [closed]

We've conducted a quasi-experiment where an intervention was available for students to use in four semesters and was not available in other four semesters in a large college-level course. Students ...
3
votes
0answers
20 views

How to find the [marginal] effect of X on Y when Y is binary and very rare. Can I make groups of similar X and model counts of Y instead?

tl;dr How to model the causal impact of X on binary Y when Y is very rare. Can I make groups and model count instead? Background/What I tried I want to know what the effect of the number of "...
0
votes
0answers
36 views

Marginal effects in conditional logit in R

I am trying to calculate average marginal effects (dF/dx) for a conditional logit model in R. Package mfx provides the solution only for binomial (and not the conditional logit) model. Is there a ...
6
votes
1answer
153 views

How to calculate and interpret a marginal treatment effect (local instrumental variable)? (Intuition through simple example.)

I am working on the intuition behind local instrumental variables (LIV), also known as the marginal treatment effect (MTE), developed by Heckman & Vytlacil. I have worked some time on this and ...
3
votes
1answer
350 views

Average marginal effects by hand?

I'm having trouble calculating average marginal effects by hand. I have the coefficients from Latent Gold (so if anyone knows how to get AMEs from that program, that would be helpful!). Otherwise, I ...
1
vote
0answers
12 views

Finding Marginal Effects of Logistic Regression Coefficents

I used a logistic regression model to predict the probability of a fruit being a pomegranate or not with the explanatory variables as the number of seeds and the ounces it weights. My coefficients ...
2
votes
1answer
41 views

After running a probit, how can I generate the margins for the whole distribution?

I'm using Stata. I ran a probit of the form $$ \text{outcome}_i = \beta \ f(\text{income}_i) + \gamma\text{ Controls}_i $$ Where $f(\text{income}_i)$ is a fractional polynomial. I'm interested on the ...
0
votes
0answers
46 views

How to interpret the marginal effects of a logit model

I’m trying to run a binary logit model to study the commute distance between place of residence and place of work for individuals. I’m reporting the marginal effects. I’m having hard time interpreting ...
3
votes
1answer
117 views

Margins after mice?

I would like to apply the margins function to imputed data (I used mice), but it seems not possible. Do you know if a function exists that calculates marginal effects with imputed data? Thank you! ...
0
votes
0answers
16 views

Correct interpretation of interaction terms between 2 dummy variables

Using logistic regression, I am attempting to model the marginal effect of being female and earning below the poverty threshold (both binary variables) on predicting probability of developing ...
0
votes
0answers
15 views

What value are binary variables held at when evaluating Marginal Effect at Mean?

I am hoping to interpret the results of a logit regression model measuring hypertension as the dependent variable. I coded the model to calculate coefficients based on the marginal effect at the mean. ...
0
votes
0answers
13 views

Non Linear regression to obtain diminishing marginal effect / elasticity [duplicate]

I am working with some real estate data on housing units. For a given market, I have data on occupied units, rents, and control variables such as population, demographics, income levels etc. I'd like ...
2
votes
1answer
184 views

Obtaining the complete confidence intervals of binary interacted variables

I have an OLS regression with a binary treatment X and a binary moderating variable M, where the regression equation is: $$ Y = \alpha + \beta_1 X + \beta_2 M + \beta_3(X \times M). $$ The effect of $...
0
votes
0answers
19 views

Statistical significance of two marginal effects and their difference

I run fixed-effects regression including an interaction term of my two key explanatory variables (one continuous, one ...
0
votes
0answers
21 views

Marginal effect at representative value vs subgroup analysis

I analyse marginal effect of a continuous variable in a fixed effects regression. I would like to see if ME change for certain groups/categories. The first approach asks ...
1
vote
0answers
70 views

Marginal effects model with ggpredict() for a generalized poisson linear model

I am working with count data of mosquito abundance and I want to isolate the effect of land-use from the effect of topographic variables. Therefore, I'm combining a poission regression model with ...
0
votes
1answer
104 views

When/why are average marginal effects (AME) equal to marginal effect at means (MEM)?

I wonder why my two versions of marginal effects (AME and MEM) yield identical results: ...
0
votes
1answer
274 views

Why does the accumulated local effects plot look that way?

I read a blog post about machine learning explainability - https://towardsdatascience.com/an-overview-of-model-explainability-in-modern-machine-learning-fc0f22c8c29a It shows as an example this ...
0
votes
1answer
28 views

how to interpret the marginal effect on y from an etregess model of ln(y)

Using stata (with weighted survey design) I ran the following, where logwage is the log of wage. The log was taken because wage was not normally distributed. There is also information about the ...
0
votes
0answers
54 views

Logistic regression and margins in Stata

I have a question regarding some logit-regressions and their margins I've been calculating in Stata and I hope that this is the right place to ask it. So, I'm trying to explain interest in politics (...
0
votes
0answers
13 views

distribution marginal associations in linear model with random design

We have a vector $x \in \mathbb{R}^d$, and it's a random vector which has some underlying distribution $p(x)$. We are also given a fixed vector $\beta \in\mathbb{R}^d$. Suppose we have $n$ vectors i.i....
0
votes
0answers
18 views

How to fix an error with an Average marginal effects code in an negative binomial model?

I am using a STATA dataset activity.dta with information about the legislative activity of MPs in Japan. That's how the content of the dataset looks like when I remove the missing values and limit the ...
0
votes
0answers
18 views

Difference between marginal effects at the mean and average marginal effects in a logistic regression model? [duplicate]

I am new to the categorical data analysis. Can someone explain to me in the in the simplest possible way: What is the difference between the predicted probabilities and the marginal effects in a ...
0
votes
0answers
55 views

How can I calculate marginal effects for GLM with an offset term?

When I use the package margins in R, I'm unable to calculate the marginal effects for a GLM with an offset term. I get the following error when I run ...