BookmarkSubscribeRSS Feed
abuhamad
Calcite | Level 5

Hello All, 

I have a problem that I would to to do ttest but the log showed me that "The CLASS variable has more than two levels"

 

proc ttest data=work.two;
class AR;
var IN_1_AMT
title 'TTest 1 - Calculating TTEST for IN_1_AMT AR';
run;

 

please help for this problem

2 REPLIES 2
Reeza
Super User

Well, does your class have more than 2 levels? If so, you need proc anova instead. 

Shivi82
Quartz | Level 8

Correct as Rezza has mentioned you need to perform ANOVA test in case you have more than 2 class variables.

 

Also please see if ur observations are less than 30 or else you need to use Z test <this scenario is applicable only when we you have 2 class variables else ANOVA is the solution>.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 4597 views
  • 1 like
  • 3 in conversation