SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
newbie69
Fluorite | Level 6

Hi,

I coded some really easy code but I always got the error  "The type of the name(c) is unknown". could be the reason that there are some missing values in the column c? thanks for help 🙂

 

proc tabulate data = in;
class class1;
var var1;
table a, b*c;
quit;
2 REPLIES 2
Astounding
PROC Star
All variables being used in a table must first appear in a CLASS or VAR statement.

At the same time, variables not being used such as CLASS1 and VAR1 should not appear.

You will need to understand the purpose of CLASS and VAR.
ballardw
Super User

@newbie69 wrote:

Hi,

I coded some really easy code but I always got the error  "The type of the name(c) is unknown". could be the reason that there are some missing values in the column c? thanks for help 🙂

If you have some missing values for VARIABLE C (SAS data sets have variables, not columns) and decide to use it as a CLASS variable then the default behavior by Tabulate is to drop the entire observation from the report. If you use C as a VAR variable, requesting a statistic like Sum or mean, then the missing values are ignored in the summary.

 

But nothing much is going to happen until you decide if B and C are Class or Var variables though the way you have B it pretty much should be a Class variable.

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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
  • 2 replies
  • 1288 views
  • 0 likes
  • 3 in conversation