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


 

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

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