BookmarkSubscribeRSS Feed
ralphbenno
Fluorite | Level 6

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?

3 REPLIES 3
Community_Guide
SAS Moderator

Hello @ralphbenno,


Your question requires more details before experts can help. Can you revise your question to include more information? 

 

Review this checklist:

  • Specify a meaningful subject line for your topic.  Avoid generic subjects like "need help," "SAS query," or "urgent."
  • When appropriate, provide sample data in text or DATA step format.  See this article for one method you can use.
  • If you're encountering an error in SAS, include the SAS log or a screenshot of the error condition. Use the Photos button to include the image in your message.
    use_buttons.png
  • It also helps to include an example (table or picture) of the result that you're trying to achieve.

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.

 

edit_post.png

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

.
ralphbenno
Fluorite | Level 6

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

 

 

 

 

PaigeMiller
Diamond | Level 26

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.

--
Paige Miller

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

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!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 3353 views
  • 0 likes
  • 3 in conversation