Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: testing mediation in quantile regression
From
Samantha Batchelor <[email protected]>
To
[email protected]
Subject
st: testing mediation in quantile regression
Date
Thu, 17 May 2012 17:41:48 +1000
Hi,
Can anyone help me with code to test mediation when running quantile
regression? R has a package that does it but the similar one for
Stata (called mediation) doesn't handle quantile regression.
For example, the mediator and outcome model below.
xi3: sqreg readingsc i.gender i.ethnicity i.mothered q9, q(.25 .5 .75) reps(500)
xi3: sqreg comp readingsc i.gender i.ethnicity i.mothered*q9, q(.25 .5
.75) reps(500)
I've tried using R as well but I cant figure out how to deal with
interactions in the mediation code (or even how to get the effect of
q9 at each level of mothered after I have a significant interaction,
that is, the equivalent of using [email protected] in Stata) so if anyone
knows quantreg in R and wants to point me in that direction that would
be ok too.
Thanks in advance,
Sam Batchelor
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/