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]

From |
Vincent Koppelmans <vkoppel@umich.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Re: Re: Repeated Measures ANOVA: contrasts |

Date |
Sun, 2 Feb 2014 12:40:35 -0500 |

Dear Dr. Coveney, Thank you very much for the syntax and the follow up email. I have a few questions: 1) What is the difference between the contrasts: 1.5 1.5 -1 -1 -1 0 0 0.5 0.5 -1/3 -1/3 -1/3 0 0 I thought the would be the same as long as the weights are proportional? 2) You suggest to use a paired t-test on contrast variables (i.e., (time point 1 + 2) - (time point 3 + 4 + 5)). If I understand correctly, you are saying that manova/contrast designs are not valid (because of lack of power?)? The 7 time points I have can be grouped as follows: Time point 1 and 2: pre treatment Time point 3, 4, and 5: treatment Time point 6 and 7: post treatment Hence, I do not expect a difference between TP 1 and 2, but I do expect some cumulative effect from time point 3 to 5. This is why I wanted to use contrasts instead of calculating averages per condition (i.e., pre, during, and post treatment). What would be a good and valid solution here? Thank you for your time! best, Vincent Op 2 feb. 2014, om 04:36 heeft Joseph Coveney <stajc2@gmail.com> het volgende geschreven: > David C Airey wrote: > > I didn't read far enough in the help file! Page 362 and beyond > for -contrast- has examples with evaluated fractions like > `=1/3' in the linear combination. > > -------------------------------------------------------------------------------- > > I didn't read that far either. Anyway, if there is substantial autocorrelation, > and if the difference between the average of the first two observations and the > following three is of primary scientific interest, then the original poster > would perhaps be better off just computing the averages for each volunteer and > performing a paired t-test. -manova- and -manovatest- (or -contrast-) are out, > with eight volunteers and seven intervals. > > Joseph Coveney > > . set seed `=date("2014-02-02", "YMD")' > > . > . program define simem, rclass > 1. version 12.1 > 2. syntax > 3. > . drop _all > 4. set obs 8 > 5. generate byte pid = _n > 6. generate double fmt1 = rnormal() > 7. forvalues i = 2/7 { > 8. generate double fmt`i' = 0.5 * fmt`=`i'-1' + /// >> sqrt(0.75) * rnormal() > 9. } > 10. tempvar a b > 11. generate double `a' = (fmt1 + fmt2) / 2 > 12. generate double `b' = (fmt3 + fmt4 + fmt5) / 3 > 13. ttest `a' = `b' > 14. tempname p > 15. scalar define `p' = r(p) > 16. drop `a' `b' > 17. quietly reshape long fmt, i(pid) j(time) > 18. xtreg fmt i.time, i(pid) fe > 19. test (1.time + 2.time) / 2 = (3.time + 4.time + 5.time) / 3 > 20. return scalar l = r(p) > 21. return scalar t = `p' > 22. end > > . > . simulate t = r(t) l = r(l), reps(10000) nodots: simem > > command: simem > t: r(t) > l: r(l) > > > . > . foreach var of varlist l t { > 2. generate byte pos_`var' = `var' < 0.05 > 3. } > > . > . summarize pos_* > > Variable | Obs Mean Std. Dev. Min Max > -------------+-------------------------------------------------------- > pos_l | 10000 .105 .3065687 0 1 > pos_t | 10000 .0511 .2202127 0 1 > > . > . exit > > end of do-file > > * > * 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/ * * 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/

**Follow-Ups**:**Re: st: Re: Re: Repeated Measures ANOVA: contrasts***From:*"Joseph Coveney" <stajc2@gmail.com>

**References**:**st: Re: Re: Repeated Measures ANOVA: contrasts***From:*"Joseph Coveney" <stajc2@gmail.com>

- Prev by Date:
**Re: st: Gllapred for transition probabilities** - Next by Date:
**Re: st: xtabond2 & Margins** - Previous by thread:
**st: Re: Re: Repeated Measures ANOVA: contrasts** - Next by thread:
**Re: st: Re: Re: Repeated Measures ANOVA: contrasts** - Index(es):