- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Is this code correct?
data Blood;
set blood;
run;
ods trace on;
proc univariate data=blood;
var RBC WBC;
run;
ods trace off;
ods select quantiles;
proc univariate data=blood;
var RBC WBC;
run;
ods select extrm_obs;
title "Extreme Observations of RBC and WBC";
proc Univariate data=Blood;
id Subject;
var RBC WBC;
run;
ods select extremeobs;
title "Extreme Observations of RBC and WBC";
proc Univariate data=Blood;
id Subject;
var RBC WBC;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@mughaloimran wrote:
For this problem,Run PROC UNIVARIATE on the variables RBC and WBC from the Blood data set.1.1 Display the names of the output objects created by this procedure. Attach a screenshot that shows the names.Show the code and output of names of the output objects. Any unnecessary outputs will cause a penalty of losing points.1.2 Run PROC UNIVARIATE again, selecting only the output object that shows extreme observations.And send this output to a temporary SAS data set extrm_obs. Set the title as “Extreme Observations of RBC and WBC”. Show the code, data set of extrm_obs and interpretation of the data set. Anyunnecessary outputs will cause a penalty of losingpoints.1.3 Issue two ODS statements: one to select the Basic Statistical Measures output object and the other to send this output to a permanent SAS data set : RBC_WBC_Measures. Set the title as "Basic Statistical Measures for RBC and WBC". Show the code ,data set and interpretation of the dataset
Is this code correct?
data Blood;
set blood;
run;ods trace on;
proc univariate data=blood;
var RBC WBC;
run;
ods trace off;
ods select quantiles;
proc univariate data=blood;
var RBC WBC;
run;ods select extrm_obs;
title "Extreme Observations of RBC and WBC";
proc Univariate data=Blood;
id Subject;
var RBC WBC;
run;
ods select extremeobs;
title "Extreme Observations of RBC and WBC";
proc Univariate data=Blood;
id Subject;
var RBC WBC;
run;
Have you tried to run it? What does the sas log report?
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set
Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets
--------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Clearly, the code you submitted to SAS is different from the code you posted to the community. That's why you should always paste the SAS log that shows the error and the SAS code prior to the error.
Your screenshot shows that the code you are submitting has a BY statement such as
BY Gender;
When you use a BY statement, the data must be sorted by the variables(s) on the BY statement.
So to fix the error, either delete the BY statement or run PROC SORT:
proc sort data=Blood;
by Gender;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
hello @mughaloimran
Can you provide sample data from the dataset you have used?