BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
France
Quartz | Level 8

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.

1 ACCEPTED SOLUTION

Accepted Solutions
novinosrin
Tourmaline | Level 20

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;

 

View solution in original post

4 REPLIES 4
novinosrin
Tourmaline | Level 20

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;

France
Quartz | Level 8
dear novinosrin,

how could i set the weight and height? could you give me an example ?
novinosrin
Tourmaline | Level 20

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;

 

Ksharp
Super User
proc univariate data=sashelp.class outtable=want noprint;
var _numeric_;
run;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 844 views
  • 1 like
  • 3 in conversation