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


Please Help Members By Posting Answers For Below Questions

What is the SAS data set?

881


What are the special input delimiters used in SAS?

858


what are input dataset and output dataset options? : Sas programming

788


what is sas business intelligence? : Sas-bi

811


What Proc glm does?

834


for report generation which one you used proc report or data_null_?

7089


what is enterprise guide? What is the use of it? : Sas programming

744


what is slowly changing dimension? : Sas-di

852


Explain what is SAS informats?

823


What sas features do you use to check errors and data validation?

949


List out some key concept of SAS

805


How do you control the number of observations and/or variables read or written?

997


what do the sas log messages "numeric values have been converted to character" mean? : Sas programming

762


What is the use of PROC gplot?

854


What is the length assigned to the target variable by the scan function?

891