BookmarkSubscribeRSS Feed
phoenix31
Fluorite | Level 6
Hi All,

 

I am trying to run a statistical analysis on Qualitative and quantitative data on a particular table.

 

A part of my macro contains the below query to run the distribution analysis on the numeric variables:

 

proc univariate data=TEST.&tbl outtable=nums1 (keep=_VAR_ _NOBS_ _NMISS_ _MIN_ _MAX_ _MODE_ _MEDIAN_ _MEAN_ _STD_ _SKEW_ _KURT_ _P1_ _P5_ _Q1_ _Q3_ _P95_ _P99_ _RANGE_ ) noprint;
var _numeric_;
run;

 

Can anyone help me with running a similar query on Categorical & other quantitative data in the table. Can a PROC MEANS / PROC FREQUENCY be used instead of Univariate?

 

Also I would like to know if there is a generelized data type (Refer the Eg above "_numeric_" for all the numeric variables) that could be used to carry out the analysis on all the quantitaive variables?

 

Thank you.

1 REPLY 1
TomKari
Onyx | Level 15

You can use _character_ to specify all of the character variables, but be careful! This may include variables such as name and address, which make no sense to do this kind of analysis on, and will fill up your output destination.

 

I suggest you eyeball your data first, which should give you some idea of the nature of the variables. PROC MEANS and PROC TABULATE are good options for analysing qualitative variables, as are bar charts.

 

Tom

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 1 reply
  • 2923 views
  • 1 like
  • 2 in conversation