Can you calculate the mean, median and mode of the following data set
using data step logic? Don't use any function or procedure.
data a;
input age @@;
datalines;
22 32 32 32 43 23 24 56 45 54 28 29 27 26 25 28 30 20 18 37 36 47 46
56 19 20
;
run;
I have calculated the mean which i have posted in the answer section.
Answer Posted / sattwik kumar
data b;
set a end=lastobs;
age_temp+age;
count+1;
if lastobs then
mean=age_temp/count;
run;
Is This Answer Correct ? | 19 Yes | 4 No |
Post New Answer View All Answers
What is the SAS data set?
What are the special input delimiters used in SAS?
what are input dataset and output dataset options? : Sas programming
what is sas business intelligence? : Sas-bi
What Proc glm does?
for report generation which one you used proc report or data_null_?
what is enterprise guide? What is the use of it? : Sas programming
what is slowly changing dimension? : Sas-di
Explain what is SAS informats?
What sas features do you use to check errors and data validation?
List out some key concept of SAS
How do you control the number of observations and/or variables read or written?
what do the sas log messages "numeric values have been converted to character" mean? : Sas programming
What is the use of PROC gplot?
What is the length assigned to the target variable by the scan function?