I am investigating the effect of X (a dummy variable 1 or 0) on Y but I want to interact X with credit score groups.
Let's say I am running a probit reg
probit Y X##i.Creditgroup, vce(cluster group)
I want to eventually see how X affects Y differently across the credit groups. I know that computing marginal effects of interaction terms using margins is incorrect. So following Norton et al, I am trying to use "inteff".
So I converted my variables so that I don't have factor variables since inteff can't handle factor variables.
so assume there are 4 credit groups and X is a binary, so i have now,
gen x_credit4 = (X== 1 & creditgroup==4)
gen x_credit3 = (X== 1 & creditgroup==3)
gen x_credit2 = (X== 1 & creditgroup==2)
gen x_credit1 = (X== 1 & creditgroup==1)
gen credit4 = (creditgroup==4)
gen credit3 = (creditgroup==3)
gen credit2 = (creditgroup==2)
gen credit1 = (creditgroup==1)
probit Y X x_credit4 x_credit3 x_credit2 x_credit1, vce(cluster zipcode_year)
inteff Y X x_credit4 x_credit3 x_credit2 x_credit1
and I get an "r(9);" error!
Any help will be greatly appreciated. (any other methods to potentially compute the marginal effects)
Let's say I am running a probit reg
probit Y X##i.Creditgroup, vce(cluster group)
I want to eventually see how X affects Y differently across the credit groups. I know that computing marginal effects of interaction terms using margins is incorrect. So following Norton et al, I am trying to use "inteff".
So I converted my variables so that I don't have factor variables since inteff can't handle factor variables.
so assume there are 4 credit groups and X is a binary, so i have now,
gen x_credit4 = (X== 1 & creditgroup==4)
gen x_credit3 = (X== 1 & creditgroup==3)
gen x_credit2 = (X== 1 & creditgroup==2)
gen x_credit1 = (X== 1 & creditgroup==1)
gen credit4 = (creditgroup==4)
gen credit3 = (creditgroup==3)
gen credit2 = (creditgroup==2)
gen credit1 = (creditgroup==1)
probit Y X x_credit4 x_credit3 x_credit2 x_credit1, vce(cluster zipcode_year)
inteff Y X x_credit4 x_credit3 x_credit2 x_credit1
and I get an "r(9);" error!
Any help will be greatly appreciated. (any other methods to potentially compute the marginal effects)
Comment