Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: wsanova syntax


From   Christian Genova <[email protected]>
To   [email protected]
Subject   Re: st: wsanova syntax
Date   Wed, 04 Oct 2006 16:46:52 +0800

Thanks for the immediate response. The time element in my dataset is 3 and not 2 as previously mentioned. ID is nested under control. I mistakenly placed "id" before "control" but yes, id #1 under control 1 is different from id #1 in control 2.

With these, the syntax I used then is correct?

I initially used the non-parametric tests (Wilcoxon signed rank and Mann-Whitney U rank tests) but decided to use WSANOVA at the end. In the research I'm doing where weights and heights of children cannot really be uniform, the samples are expected to be non-homogenous. I'm not a statistician so I'm open to any suggestions to make my study more reliable and accurate though.

Joseph Coveney wrote:

Christian Genova wrote:

Can someone kindly lend assistance on the wsanova syntax for repeated
measures. I'm still a novice with STATA so hope anyone can assist.

There are 2 repeated variables: id and control. ID is person belonging
to group "control". Tthe same persons in year 1 (id) belonging to group
(control) were analyzed in time 2.
I want to compare the scores in time 1 and 2, between time (scores in
time 1 compared with scores in time 2) and control in time 1 and 2
(whether there was signicant difference in scores of "control 1" at time
1 to scores at time 2, and within "control" in time 1 and 2 (whether
there was significant difference between scores of "control 1 and 2" in
time 1 compared to time 2).

time id control score
----------------------------------
1 1 1 5
1 2 1 6
1 3 1 5
1 1 2 3
1 2 2 4
2 1 1 7
2 2 1 8
2 3 1 5
2 1 2 2
2 2 2 10

I used: wsanova SCORE CONTROL, id(ID) between(TIME). Is this correct?

--------------------------------------------------------------------------------

The syntax for -wsanova- doesn't look right.

>From your description, I'm assuming that id is nested under control, that
is, that id #1 under control #1 is not the same person as id #1 under
control #2. If that's the case, then the syntax for -wsanova- would look
more like that below for your setup. (Note that -repeated()- or -epsilon-
is superfluous with only two levels of the time factor.)

Keep in mind that what you've displayed is an unbalanced dataset. And that
some of the of contrasts you're after (if I followed your description
correctly) would involve Satterthwaite weighting of between and within
variances.

Have you considered forgoing ANOVA and just use Student's t-test for the
specific comparisons of interest?

Type -help ttest- for syntax for paired and independent samples.
Alternatives could be the Mann-Whitney U / Wilcoxon rank-sum (-ranksum-) and
Wilcoxon sign-rank(-signrank-) tests.

Joseph Coveney

clear
set more off
input time id control score
1 1 1 5
1 2 1 6
1 3 1 5
1 1 2 3
1 2 2 4
2 1 1 7
2 2 1 8
2 3 1 5
2 1 2 2
2 2 2 10
end
compress
replace id = control * 10 + id
order control id time
sort control id time
list, noobs sepby(control)
anova score control / id|control time time*control, repeated(time)
wsanova score time, id(id) between(control) epsilon
exit


*
* 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/



--
---------------------------------------------------------------
Christian A. Genova II
Research Assistant
Socio-Economics Unit II
AVRDC – The World Vegetable Center
P.O. Box 42, Shanhua
74151 Tainan, TAIWAN, R.O.C.
Tel +886 6 583 7801 ext 462
Fax +886 6 583 0009
Email: [email protected]
www.avrdc.org
---------------------------------------------------------------


*
* 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