I am running an unbalanced two-way analysis of variance using "proc
glm"
Both two factors contain 2 levels. say A, B and 1, 2.
I wanna do a subgroup comparison, say. whether change between 1 and 2
in A is different from change between 1 and 2 in B.
I think "contrast" statement in "proc glm" can do this, cannot it?
And is there anyone can tell me how to set up the contrast for this
comparison?
Thanks
The outcome variable is the vitamin D level, and two factors are
season(winter or summer) and supplement(yes or no)
the unbalanced two-way analysis of variance I used in SAS glm is
proc glm;
class season supplement;
model level = season supplement season*supplement;
lsmeans season*supplement/pdiff=all adjust=tukey;
contrast "a vs b" season*supplement 1 -1 -1 1;
run;
quit;
I set the contrast as we wanna compare (mu(yes winter)-mu(yes-summer)
- (mu(no winter)-mu(no summer));
ie. whether difference between winter and summer in supplement is
different from difference between winter and summer in supplement no
group.
So the contrast i use is the coefficient before the equation above.
This is just my personal thoughts. Please let me know whether it is
correct.
Thanks so much.
Fred
Why do you need anything beyond the F-test on the interaction between
the two variables? It tests the null hypothesis that the effect of
one variable is the same across all levels of the other variable.
--
Bruce Weaver
bwe...@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/Home
"When all else fails, RTFM."
Tony
Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001
Hi Everyone,
Thanks
--
To post a new thread to MedStats, send email to MedS...@googlegroups.com .
MedStats' home page is http://groups.google.com/group/MedStats .
Rules: http://groups.google.com/group/MedStats/web/medstats-rules
To unsubscribe from this group, send email to medstats+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
What i want to test is the null hypothesis of equal "treatment effect"
in the two subgroups.
In my example, whether treatment effect between summer and winter with
supplement is different from treatment effect between summer and
winter without supplements. ie. whether MU(supp yes summer) - MU(supp
yes winter) differs MU(supp NO summer)-MU(supp No winter)
On Mar 25, 3:09 am, "Lachenbruch, Peter"
Sent: 3/24/2010 12:24:39 PM
Subject: Re: {MEDSTATS} How to set up contrast statement for subgroup comparison in SAS glm
Confidentiality Statement:
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
I think it is clear now.
Thanks