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.
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
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.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.