BookmarkSubscribeRSS Feed
Dylans15
Calcite | Level 5

Good Afternoon,

 

I am still new to SAS programming and I am having trouble figuring out how to conduct a basic T-Test. Any help is appreciated!

 

Thanks,

Dylan

4 REPLIES 4
novinosrin
Tourmaline | Level 20

have you looked into proc ttest?

All you need is to follow the documentation

Reeza
Super User

See the examples here:

https://documentation.sas.com/?docsetId=statug&docsetVersion=14.3&docsetTarget=statug_ttest_examples...

 

If you have more specific questions feel free to post more details. 

 


@Dylans15 wrote:

Good Afternoon,

 

I am still new to SAS programming and I am having trouble figuring out how to conduct a basic T-Test. Any help is appreciated!

 

Thanks,

Dylan


 

Dylans15
Calcite | Level 5

Now that I figured out how to use proc t-test, I am running into this error-

ERROR: The CLASS variable has more than two levels.

Any advice?

 

Thanks

Reeza
Super User

T-Test is designed to test the difference between two groups. Do you have more than two groups? Usually, the analogous test for more groups than 2 is the ANOVA test, via PROC ANOVA or PROC GLM.

 


@Dylans15 wrote:

Now that I figured out how to use proc t-test, I am running into this error-

ERROR: The CLASS variable has more than two levels.

Any advice?

 

Thanks


 

 

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore 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
  • 4 replies
  • 2552 views
  • 4 likes
  • 3 in conversation