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
I have a dataset concat having variable a b & c. How to rename a b to e & f?
What are the statements that are executed only?
Give some examples where proc report’s defaults are different than proc print’s defaults?
What is auto call macro and how to create a auto call macro? What is the use of it? How to use it in sas with macros? : sas-macro
Explain substr function?
What is Linear Regression?
What does P-value signify about the statistical data?
What are the parameters of scan function?
what is the function of catx syntax? : Sas-administrator
Explain what Proc glm does?
i have a dataset with 100 obs i want to generate title from 20th obs onwards with total observations. that should contain 100 obs.dont use firstobs and dnt split the data. use dataset block or proc report? how can we genarate;
Differentiate between format and informat? : sas-grid-administration
what is sas enterprise intelligence architecture? : Sas-bi
what are informats in sas? : Sas-administrator
what is the use of proc sql? : Sas programming