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]
RE: st: anova account for the same individuals
From
"Airey, David C" <[email protected]>
To
"<[email protected]>" <[email protected]>
Subject
RE: st: anova account for the same individuals
Date
Thu, 21 Nov 2013 01:01:26 +0000
.
/*
Liling,
With regard to plots, I suggest you plot the ad means
(marginal means) and CIs in one graph, and maybe all
pairwise differences and CIs in another plot.
I generally do this before models in case they
spit out something nonsensical.
/*
clear
webuse t43 // like your experimental design
anova score drug person, repeated(drug)
// in recent Statas (>=12), we can use
pwcompare drug, mcompare(tukey)
margins drug
marginsplot // to get a marginal means plot
// all paired t-tests, unadjusted
// you can do this in v. 11
reshape wide score, i(person) j(drug)
local t=4 // 4 drugs
forvalues j = 1/`=`t'-1' {
forvalues k = `=`j'+1'/`t' {
display "Drug `j' vs. `k'"
ttest score`j' == score`k'
}
}
/*
You would need to collect the difference estimates and CIs
from these t-tests to plot (write them down, or post them as you go).
*/
// xtmixed can be used in this way in newer Statas
xtmixed score i.drug || person:
pwcompare drug
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/