BookmarkSubscribeRSS Feed
SASs33ker
Calcite | Level 5

Hi,

I have a data table where the sorting has been done on a char8 column successfully.

Now, I would like to do a proc means on the table, but when I get to the VAR statement, the variable column lable doesn't appear from the selection.

I have done the exact same procedure before, but I'm puzzled by why the program no longer detects the column of interest in the "VAR" statement.

Any ideas?

4 REPLIES 4
Tom
Super User Tom
Super User

What drop down are you talking about?  Are you using Enterprise Guide?

SASs33ker
Calcite | Level 5

Yes, I am using enterprise guide.

You know when you after you've written "VAR" the Enterprise Guide prompts you to choose from columns to do the means calculations on?

It's like filling in argument(s) in Excel formula.

I suspect it has to do with the data type of the column, which is char8, but it should not matter. (All columns contains text values except the numeric column where the average calculation is done)

Has anybody else ran into the same problem?

Thanks

Tom
Super User Tom
Super User

You cannot take the mean of a character variable.

You can use them in a CLASS statement.  Did you try that?

SASs33ker
Calcite | Level 5

Oh.....right...

I've missed the fact that what's after the "VAR" are columns on which arithmetic average are done, which require them to be numeric.

btw, how would you write it using a CLASS statement?

Thank you

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 4 replies
  • 690 views
  • 3 likes
  • 2 in conversation