BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
yael
Quartz | Level 8

Hello

 

I am trying to check t test while I have a variables dl dm dn (profit vs assets in 3 variations) while my class is az. The az is dummy variable with 0 or 1 (1 is a family and 0 is not a family).

 

This is my project:

proc ttest data=sasuser.sasfile120416;

class az;

var dl dm dn;

run;

 

And the answer I got in log is

ERROR: The CLASS variable has more than two levels.

 

I checked and the az is only 1 and 0, so what it could be?

 

Thanks for any help!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Any missing values? Is a format applied to variable. 

 

Post output from following:

 

proc freq data=sasuser.sasfile120416;
Format az;
Table az/missing
Run;

View solution in original post

2 REPLIES 2
Reeza
Super User

Any missing values? Is a format applied to variable. 

 

Post output from following:

 

proc freq data=sasuser.sasfile120416;
Format az;
Table az/missing
Run;
FreelanceReinh
Jade | Level 19

@Reeza: Observations with missing values of the CLASS variable would be omitted from the calculations. Also, class levels are determined from the formatted values of the CLASS variable.

 

@yael: Is az a numeric variable or a character variable? Does it have a format (see PROC CONTENTS output)?

 

 

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 4053 views
  • 2 likes
  • 3 in conversation