I am having a bit trouble of deciding between PROC TTEST and PROC GLM
I m testing the rate between 2 variable over a group of years.
Is either one OK?
Quest 2. now I have 5 group of years. I want to test the rates of the variables for each group of years if some group years I have matching set. How to do the second part.
help?
Hello @ralphbenno,
Your question requires more details before experts can help. Can you revise your question to include more information?
Review this checklist:
To edit your original message, select the "blue gear" icon at the top of the message and select Edit Message. From there you can adjust the title and add more details to the body of the message. Or, simply reply to this message with any additional information you can supply.
SAS experts are eager to help -- help them by providing as much detail as you can.
This prewritten response was triggered for you by fellow SAS Support Communities member @PGStats
.I am testing 750 data points
the column are in year, age sex the rows are group of year 1900-1910...ect it goes all the way up to 1990-2000
the data is mortality rate
I wanted to test the mean between female and male from yer 1900 till 2000
I wanted to know if mortality for female are higher than male,
should I use proc glm or proc ttest. in the example below
proc glm data = Project;
class sex;
where sex in ("f" "m");
model rate = sex;
run;
quit;
or
proc ttest data = Project;
class sex;
var rate;
where sex in ("f" "m");
run;
quit;
then 2nd test
there are 10 years grouping and each years there are 100 mortality rate points. I would like to do a pairing comparison for each 10 years. to determine if there was a significant changes.
I am not sure about the code . it could look like that
I should have 10 groups and tukey test will tell me if there is a significant between years group
I cannot set it up correctly. I attached my sas code
proc glm data=project;
class sex;
where sex in ("t");
model rate = year sex / solution;
means year sex/ tukey;
run;
quit;
ok see if you can help
Under the right conditions, GLM and TTEST ought to give equivalent answers. GLM will result in a F test, TTEST will result in a t-test, however if the GLM F-test is statistically significant, then the t-test will also be statistically significant, and vice versa.
then 2nd test
there are 10 years grouping and each years there are 100 mortality rate points.
I would like to do a pairing comparison for each 10 years.
I don't know what "pairing comparison" means. Show us with a small data set, and explain what you want to do in more detail.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.