- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The assignment I'm working asks me to use proc univariate to explore the 8 extreme observations in a worksheet, so I used the SAS Documentation and it says to use
nextrobs=8;
which gives me an error: ERROR 180-322: Statement is not valid or it is used out of proper order.
Can anyone tell me how to fix it? Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
NEXTROBS isn't a separate statement it is an option on the UNIVARIATE statement. See example here: https://documentation.sas.com/?docsetId=procstat&docsetTarget=procstat_univariate_examples03.htm&doc...
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@mintbit wrote:
i have a question relating to this. The nextrob option is not in parentheses but the (obs=n) is. are they not both options? How do I know when to put something in parentheses?
OBS= is a Dataset Option. Like KEEP= or RENAME=. Those always appear in parentheses after a dataset name. They are totally independent of PROC UNIVARIATE. You can use dataset options pretty much anywhere you use a dataset name.
NEXTROB is an optional part the PROC UNIVARIATE statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
use codes like below:
ods select extremeobs;
proc univariate data=pg1.eu_occ nextrobs=10;
var camp;
run;
ods trace off;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
ODS select ExtremeObs;
proc univariate data=data.lib
nextrobs=8;
Var abc def;
Run;