Originally posted by Joro Kolev
View Post
I am sorry for bothering you again, but do you know how to compute marginal effects of an interaction term after xtivreg2? I have been trying to google, but it seems I have found none. Specifically, the following is what I want to compute:
Code:
margins tenure_south, dydx(tenure)
Code
Code:
webuse nlswork, clear gen union_south = union*south // interaction term for IV gen rtenure = floor(tenure) gen tenure_south = rtenure*south // interaction term for endogenous variable gen age_south = age*south // interaction term for age xtivreg2 ln_w age age_south south (tenure tenure_south = union union_south), fe margins tenure_south, dydx(tenure)
variable __marg_pvar_1 not found
Code:
xtivreg ln_w age age_south south (tenure tenure_south = union union_south), fe margins tenure_south, dydx(tenure)
factor tenure_south not found in list of covariates
Thank you.
Comment