Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: interaction in an ordered probit model


From   [email protected]
To   [email protected]
Subject   Re: st: interaction in an ordered probit model
Date   Tue, 19 Apr 2005 18:44:36 +0200

Hi Grace, I cannot help you in substantially. But interaction effects are usually good to interpret when plotting them. "prchange" is part of the spost ado package by Long. This package also contains the "prvalue" and "praccum" command. With prvalue (and e.g. a forvalues slope) you can produce a series of predicted values, praccum stores them in matrices, which can be plotted. I included an example for a negative binomial regression with an interaction term; you just need to figure out how prvalue works for oprobit...

Hope it helps!
Best, CHris

*--> estimate model: #delimit ;
capture drop i_fm_fg ;
gen i_fm_fg = fmotiv * fgeleg; /* INTERACTION TERM! */
nbreg emiprown_n
alterb egp_bn2 egp_bn3 egp_bn4 egp_bn7 egp_bn9 egp_bnm nnieb fmotiv fgeleg i_fm_fg
, cluster(id) robust nolog;
fitstat;
test egp_bn2 egp_bn3 egp_bn4 egp_bn7 egp_bn9 egp_bnm nnieb;
tab1 emiprown emiprown_n;


*>> PLOTT INTERACTION:.;

sum fmotiv fgeleg ;
#delimit cr
capture drop p_*
*-> line for fgeleg = 0 along the fmotiv continuum:.

forvalues count = 0(.2)6.03 {
local int = `count' * 0
quietly prvalue, x(fmotiv=`count' fgeleg= 0 i_fm_fg=`int' egp_bn2=0 egp_bn3=0 egp_bn4=0 egp_bn7=0 egp_bn9=0 egp_bnm=0 nnieb=0) rest(mean) praccum, using(mat_ne) xis(`count')
}
praccum, using(mat_ne) gen(p_ne)


*-> line for fgeleg = 1.98 along the fmotiv continuum:.

forvalues count = 0(.2)6.03 {
local int = `count' * 1.98
quietly prvalue, x(fmotiv=`count' fgeleg= 1.98 i_fm_fg=`int' egp_bn2=0 egp_bn3=0 egp_bn4=0 egp_bn7=0 egp_bn9=0 egp_bnm=0 nnieb=0) rest(mean) praccum, using(mat_nu) xis(`count')
}
praccum, using(mat_nu) gen(p_nu)



*-> line for fgeleg = 4.77 along the fmotiv continuum:.

forvalues count = 0(.2)6.03 {
local int = `count' * 4.77
quietly prvalue, x(fmotiv=`count' fgeleg= 4.77 i_fm_fg=`int' egp_bn2=0 egp_bn3=0 egp_bn4=0 egp_bn7=0 egp_bn9=0 egp_bnm=0 nnieb=0) rest(mean) praccum, using(mat_po) xis(`count')
}
praccum, using(mat_po) gen(p_po)


*--> Labels for the plots:.
lab var p_nep0 "Pr(No Missing | fgeleg= 0.00)"
lab var p_nup0 "Pr(No Missing | fgeleg= 1.98)"
lab var p_pop0 "Pr(No Missing | fgeleg= 4.77)"

lab var p_nep1 "Pr(1of3 Missing | fgeleg= 0.00)"
lab var p_nup1 "Pr(1of3 Missing | fgeleg= 1.98)"
lab var p_pop1 "Pr(1of3 Missing | fgeleg= 4.77)"

lab var p_nep2 "Pr(2of3 Missing | fgeleg= 0.00)"
lab var p_nup2 "Pr(2of3 Missing | fgeleg= 1.98)"
lab var p_pop2 "Pr(2of3 Missing | fgeleg= 4.77)"

lab var p_nep3 "Pr(All Missing | fgeleg= 0.00)"
lab var p_nup3 "Pr(All Missing | fgeleg= 1.98)"
lab var p_pop3 "Pr(All Missing | fgeleg= 4.77)"

*--> PLOT Commands:.

twoway (line p_nep0 p_nup0 p_pop0 p_pox, sort xtitle("fmotiv")ytitle("Probability No Missings")t1("Negative Binomial on % Missing on Attitude Questions"))
more
twoway (line p_nep1 p_nup1 p_pop1 p_pox, sort xtitle("fmotiv")ytitle("Probability 1 Missing")t1("Negative Binomial on % Missing on Attitude Questions"))
more
twoway (line p_nep2 p_nup2 p_pop2 p_pox, sort xtitle("fmotiv")ytitle("Probability 2 Missing")t1("Negative Binomial on % Missing on Attitude Questions"))
more
twoway (line p_nep3 p_nup3 p_pop3 Zitat von Grace Lee <[email protected]>:


Hi everyone:

I am wondering how I can interpret an interaction term in an ordered
probit model. I understand that the signs (directions) of the marginal
effects of the regressors in an ordered probit model depend on the
categories of the dependent variables. So in order to assess the
impact of an independent variable, I need to calculate the marginal
effect of the independent variable for each category.
But I am just wondering how I should estimate the impact of an
interaction term in an ordered probit. Or does it make sense to
estimate an ordered probit model with an interaction term? Would
Stata's "prchange" command help me assess and interactive effect?

Sincerely,
Grace

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index