dear all
i would like to make a statistic by using following codes
proc univariate data=Step6.Number_of_patent_us_end;
var col1-col91440;
output=Step6.patent_us mean=mean max=max min=min std=std;
run;
but the result shows that,
16 proc univariate data=Step6.Number_of_patent_us_end;
17 var col1-col91440;
18 output=Step6.patent_us mean=mean max=max min=min std=std;
------
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
19 run;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE UNIVARIATE used (Total process time):
real time 0.09 seconds
cpu time 0.10 seconds
could you please give me some suggestion?
thanks in advance.
Since you didn't give us a sample. I used sas provided dataset sashelp.class for the illustration. The dataset sashelp.class contains variables height and weight. Please replicate the code for your dataset and the numeric variables for which you want to compute statistics
or in other words try the below corrected code of yours
proc univariate data=Step6.Number_of_patent_us_end;
var col1-col91440;
output out=Step6.patent_us mean=mean max=max min=min std=std;
run;
you are missing output out like
proc univariate data=sashelp.class;
var weight height;
output out=want mean=mean max=max min=min std=std;
run;
Since you didn't give us a sample. I used sas provided dataset sashelp.class for the illustration. The dataset sashelp.class contains variables height and weight. Please replicate the code for your dataset and the numeric variables for which you want to compute statistics
or in other words try the below corrected code of yours
proc univariate data=Step6.Number_of_patent_us_end;
var col1-col91440;
output out=Step6.patent_us mean=mean max=max min=min std=std;
run;
proc univariate data=sashelp.class outtable=want noprint;
var _numeric_;
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.