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
1 answer
28 views

Marginal Effect in a Gamma GLM with Quadratic Terms

I am building a gamma GLM regression model with a log link function. The model I fit is below: I understand that I can calculate the marginal effect of x on log(y) by taking the derivative with ...
user avatar
1 vote
1 answer
69 views

Computing and simulating average marginal effect standard error using Delta Method with reproducible codes

I am trying to simulate calculating Average Marginal Effects on a basic linear regression with interaction on a binary variable and compare the empirical standard deviation I get from simulations and ...
user avatar
1 vote
1 answer
45 views

Why marginal effect and average marginal effects are the same for NB regression?

Using the margins() function from the margins R package, I fitted a negative binomial model (...
user avatar
  • 155
2 votes
1 answer
38 views

Interpreting main effect with significant interaction term in continuous by continuous multiple regression

I have the classic multiple regression model $Z=β_0+β_1X+β_2Y+β_3XY$ that produces output with a significant interaction term. There's a lot of advice out there (and the formal principle of ...
user avatar
  • 198
0 votes
0 answers
28 views

Can confidence intervals be found for the difference in marginal probabilities from two different logistic models of the same sample?

So, I have two multivariable logistic regressions for the same sample. They differ in one independent variable: Model A has a dummy variable for membership in the top 50% (compared to the bottom 50%) ...
user avatar
  • 1
0 votes
0 answers
10 views

Residual of marginal effects

I am trying to understand how marginal effects works. If i have calculated Marginal effects of a logit model, does some type of unit error exist? I don't know if this is a correct term, but an error ...
user avatar
  • 107
1 vote
2 answers
41 views

How to measure marginal effect of interdependent variables on a binary outcome?

My data represents observations on a possible sequences of events that may lead to a positive outcome (y). Each event (A, B, C, D) is dependent on the previous event; for D to occur C must occur, for ...
user avatar
0 votes
0 answers
29 views

Marginal/Adjusted Predictions Python

I am an R user trying to learn Python. Is there a way to find marginal predictions of an effect in Python? What I mean is finding the prediction of a particular variable while setting all other ...
user avatar
  • 185
0 votes
1 answer
40 views

A specific marginal effect for logistic regression

For the logit estimate of the slope parameter,I would like to obtain the marginal effect of the regressor ndisease evaluated at $\Lambda (x'\beta)=\bar{y}$. I obtain the logic estimation as follows: ...
user avatar
  • 940
1 vote
1 answer
63 views

AUC between estimated lines

Let's say you have a lmer model that test the drug effect of a set of rats with a set of rats (Control): lme1 <- lmer(lVolume ~ Days*Drug + (Days|Drug)) where ...
user avatar
0 votes
1 answer
53 views

Can Marginal effects and Incidence Rate Ratios be exactly the same?

Consider a boring count data model of citations of an article in relation to its page number and the price of the journal. I prefer an ordinary negative binomial regression. Can it be that the ...
user avatar
  • 403
0 votes
0 answers
31 views

Linear mixed-effects model results are significant but estimated marginal means not?

I have a model like: model_goals <- lmerTest::lmer(value ~ goalstimecondition + (1|ID), data = data, REML = TRUE) ...
user avatar
1 vote
1 answer
73 views

Interpreting Multinomial Logistic Regression Results with Interaction Terms

My dependent variable is vote choice between the three major Canadian federal parties, using Liberals as the reference point. I have three different lines of code drawn up to study the effect of ...
user avatar
0 votes
1 answer
35 views

emmip() - what does the y-axis represent when an offset was included

I used emmip() to create a graph showing an interaction-style plot. In the model (GLMM, poisson distribution) that I fed into the graph the dependent variable (number of visits, count) was adjusted by ...
user avatar
  • 51
0 votes
0 answers
72 views

margins when using a log link. problems with the "expression" option

I am trying to reproduce the output of the margins command in Stata after running an xtgee regression with logarithmic link and ...
user avatar
  • 1
0 votes
0 answers
90 views

How do I interpret marginal effects in Logit?

Impact of Non-Communicable diseases on Employment, where loss of employment is considered as a dummy variable where: 1 equals loss of job by the patient 0 otherwise A logistic regression with ...
user avatar
  • 1
1 vote
1 answer
75 views

Interpretation of coefficient in logistic regression

Let's say I have the following model: $$\ln\Big(\frac{\mathbb{P}(Y_i = 1 | X_i)}{\mathbb{P}(Y_i = 0 | X_i)}\Big) = \beta_0 + \beta_1 X_{1,i} + \beta_2 X_{2,i}$$ Let $\rho = \frac{\mathbb{P}(Y_i = 1 | ...
user avatar
0 votes
0 answers
31 views

Bootstrapping average marginal effects in bonomial logistic regression

This is more of a theoretical question than a practical question, but I was wondering if it is common to bootstrap average marginal effects in R for a binomial logistic model? I assume it would make ...
user avatar
  • 1
0 votes
1 answer
20 views

pariwise comparison when test of effects not significant

I am making a full factorial repeated measure test in SPSS, and the Test of Within-Subjects Effects/multivariate tests are all non-significant. In this case would estimated marginal means pairwise ...
user avatar
0 votes
0 answers
72 views

Interpretation of ALE plots

I'm computing the ALE plots for a dataset where the features are strongly correlated. All features are positively correlated with the response variable. So I expect the ALE plots obtained through the ...
user avatar
1 vote
1 answer
228 views

Why individual fixed effect method is not estimating average marginal effects (panel data)?

I am using an individual fixed effect method in a panel data. I look whether the working hours changed differently between men and women following the 2008 financial crisis. Here is a simple model in ...
user avatar
  • 107
0 votes
0 answers
51 views

emmeans - joint effects of interaction terms

I would like to see the joint effects of an interaction term. I tried joint_tests() but it gives f ratios. However, I would prefer Incidence Rate Ratios (IRR) because the rest of my results section ...
user avatar
  • 51
1 vote
1 answer
95 views

emmeans - change reference level of contrast

Good day I need some help, I used the following code: EMM <- emmeans(model1, ~ A | B) ...
user avatar
  • 51
1 vote
0 answers
81 views

emmeans in R - generating and interpreting contrasts [closed]

I hope somebody is available to help a desperate rookie.. I fitted a glmer with a Poisson distribution and log link, including main effects and several interactions, an offset variable and a random ...
user avatar
  • 51
0 votes
0 answers
47 views

Marginal Effects with Lagged data

I have a panel data model with lagged dependant and independent variables. I am looking for ways to calculate marginal effects. Here is a simplified formula: Y = 2 lagged(Y) + 3 lagged (X1) + 4 X1 + 5 ...
user avatar
  • 1
0 votes
1 answer
83 views

Signs of MarginalEffects and CoefficientEstimates in Multivariate Probit

Could someone explain that the sign of coefficient estimates and their corresponding marginal effects in the Multivariate Probit Model is the same or they could be different? IF they are different, ...
user avatar
0 votes
2 answers
312 views

Reporting average marginal effects of a survey-weighted logit model with R

I'm working with survey data of a complex sample to estimate binary outcome models. I am trying to report average marginal effects of a logit model, which I estimated through ...
user avatar
0 votes
0 answers
11 views

What do you call effects calculated from regression coefficients including interactions but excluding main effects?

Imagine a regression model with this formula: $$ y_i = \alpha + \beta_1x_i + \beta_2w_i + \beta_3x_iw_i $$ , i.e. a model with two categorical predictors and the interaction between the two. I reckon ...
user avatar
  • 113
1 vote
0 answers
23 views

Why are standard errors larger for conditional effects versus marginal effects?

I am estimating the conditional and marginal effects for a continuous by continuous interaction in a linear mixed effects model. The standard errors for the conditional effects are much larger than ...
user avatar
1 vote
1 answer
397 views

How to calculate marginal effects with multinomial regression for survey data in R

I am trying to calculate average marginal effects for a multinomial logistic regression fitted using the svrepmisc package in R. The ...
user avatar
  • 11
2 votes
1 answer
68 views

What is $ \frac{d \ E(ln(y)|X)}{d \ y}$ in OLS?

Assume that the true model (DGP) is $ ln(y) \ = \ \beta_0 \ + \ \beta_1 ln(x_1) \ + \ \cdots \ + \ \beta_k x_k \ + \ \varepsilon \hspace{3em} \text{where } \ \begin{bmatrix} x_1\\ \vdots\\ x_k\\ \...
user avatar
  • 173
1 vote
0 answers
30 views

Why do Shapley values increase over time?

I calculated the Shapley values (using xgboot package, gbm regression model) of several big actors in the cocoa market and received results which I cannot explain: it seems that Shapley increases (the ...
user avatar
0 votes
0 answers
19 views

Marginal effect of binary choice model

Suppose we have a standard binary choice model. However, the regressors $x$ are partitioned into two parts: $x = (x, d)$, where $X_1\in R^k$ and $d\in(0,1)$. $\beta = (\beta_1, \beta_2)$ are ...
user avatar
4 votes
1 answer
286 views

Understanding margins-package in R: Two different significance levels (marginal effects)

I posted this question already on Stack Overflow (here) but it was suggested to ask this question here on StackExchange. So, I have a question concerning different outputs when changing the type-...
user avatar
2 votes
0 answers
388 views

STATA margins dydx with over(.), continuous variables and interaction effect

I have a logistic regression model with two variables (A and B), which I also interact. A and B are both continuous. After the estimation I want to use the margins command to plot the marginal effect ...
user avatar
0 votes
0 answers
27 views

How to interpret marginal effects when both DV and IVs are in fractional form?

I ran a fractional probit model in which both IV and DV are in fractional form (i.e. proportions). Now I am having difficulty in interpreting the marginal effects (dydx). Suppose, the variable "...
user avatar
0 votes
1 answer
145 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 ...
user avatar
  • 111
0 votes
1 answer
569 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() ...
user avatar
  • 53
1 vote
0 answers
268 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 ...
user avatar
  • 239
0 votes
0 answers
66 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 ...
user avatar
1 vote
2 answers
205 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 ...
user avatar
  • 239
0 votes
1 answer
295 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 ...
user avatar
  • 75
2 votes
1 answer
72 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 ...
user avatar
  • 187
1 vote
0 answers
63 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 ...
user avatar
0 votes
1 answer
114 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 ...
user avatar
1 vote
0 answers
250 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 ...
user avatar
  • 11
0 votes
0 answers
63 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 ...
user avatar
  • 1
0 votes
1 answer
358 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 ...
user avatar
0 votes
1 answer
115 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 ...
user avatar
  • 5
1 vote
1 answer
127 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 ...
user avatar