- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I want to find out mean food intake of different food groups in my data set and significant difference between the mean food intake between men and women. Therefore, I want to adjust my variable with a covariate, namely with the total energy intake. I already performed the one-sided t-Test to check for significant differences between all food groups per day. Here is the code:
PROC TTEST DATA=diverse; VAR &foodgroup; CLASS sex; RUN;
Now I want to adjust for the covriate of total energy intake per day but I can't find the code for it in the proc ttest procedure. Is there another statement to adjust?
Aga
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
There are so many things that can be meant by "adjust" that you need to be very specific as to what you mean in this case. A working example with actual data or a link to a reference of what you want would be a good idea.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You are likely going to need to use PROC MIXED or GLIMMIX for this.
proc mixed data=have;
class sex subjid;
model &foodgroup = sex tot_energy_intake sex*tot_energy_intake;
random intercept/subject=subjid(sex);
lsmeans sex/diff;
run;
This tests to see if the slope is the same for the two sexes. If there is no significant difference, you can remove sex*tot_energy_intake. If there is a significant difference, you should fit:
proc mixed data=have;
class sex subjid;
model &foodgroup = sex sex*tot_energy_intake;
random intercept/subject=subjid(sex);
lsmeans sex/diff;
lsmeans sex/@<low value of tot_energy_intake> diff;
lsmeans sex/@<high value of tot_energy_intake> diff;
run;
Check the analysis of covariance chapter in any of the versions of SAS for Mixed Models for more on this approach.
SteveDenham
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content