Hello! I wish to conduct a ttest comparing means of a vairable between the two groups in the class variable, but it doesn't seem to be doing that.
Here is my code:
I don't think SURVEYMEANS compares the means of the two groups, just the same way as PROC MEANS doesn't compare the means of two groups. It produces a t-test to see if the mean is equal to zero.
I think to get the t-test comparing differences between two means, you would have to use the linear model version of the t-test to compare two means
proc surveyreg data=fus;
cluster group;
class period;
model interest=period;
run;
Of course, all of this is untested; if you want tested code, provide (a portion of) the actual data as SAS data step code.
I don't think SURVEYMEANS compares the means of the two groups, just the same way as PROC MEANS doesn't compare the means of two groups. It produces a t-test to see if the mean is equal to zero.
I think to get the t-test comparing differences between two means, you would have to use the linear model version of the t-test to compare two means
proc surveyreg data=fus;
cluster group;
class period;
model interest=period;
run;
Of course, all of this is untested; if you want tested code, provide (a portion of) the actual data as SAS data step code.
Thanks so much, this worked perfectly!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.