Hi Statalist community
I want to run a probit regression and estimate marginal effects of two variables that do not directly enter into the regression
Here is a simplified version of my problem:
I want to calculate the marginal effects of continuous variables pay and length on a binary dependent variable taskaccept (which takes values 0 or 1)
However, taskaccept is a function of ln(pay)/ln(length), such that
\[
taskaccept = a + b * (ln(pay)/ln(length))
\]
I created a variable
\[
lnpl = (ln(pay)/ln(length))
\]
And then ran the regression
What can i do now to estimate separate marginal effects with respect to pay and length?
I cannot run:
because pay and length are not covariates.
I can use the chain rule to calculate d(taskaccept)/d(pay) and d(taskaccept)/d(length) using _b[lnpl] however this restricts both marginal effects of pay and length to have the same standard errors etc., while the true relationship between taskaccept and pay and length is such that they would have separate marginal effects.
Is there a way for me to run a regression while "reminding" Stata that one of the independent variables is actually a composite of other variables? Or is there some other way for me to approach this problem?
I’ll really appreciate your help. I’m a rookie to this forum, if that wasn’t completely clear from the question.
I want to run a probit regression and estimate marginal effects of two variables that do not directly enter into the regression
Here is a simplified version of my problem:
I want to calculate the marginal effects of continuous variables pay and length on a binary dependent variable taskaccept (which takes values 0 or 1)
However, taskaccept is a function of ln(pay)/ln(length), such that
\[
taskaccept = a + b * (ln(pay)/ln(length))
\]
I created a variable
\[
lnpl = (ln(pay)/ln(length))
\]
And then ran the regression
Code:
probit taskaccept lnpl
What can i do now to estimate separate marginal effects with respect to pay and length?
I cannot run:
Code:
margins, dydx(pay length)
I can use the chain rule to calculate d(taskaccept)/d(pay) and d(taskaccept)/d(length) using _b[lnpl] however this restricts both marginal effects of pay and length to have the same standard errors etc., while the true relationship between taskaccept and pay and length is such that they would have separate marginal effects.
Is there a way for me to run a regression while "reminding" Stata that one of the independent variables is actually a composite of other variables? Or is there some other way for me to approach this problem?
I’ll really appreciate your help. I’m a rookie to this forum, if that wasn’t completely clear from the question.
Comment