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 / ravikumar
Answer:
data new;
set a end = last;
count+1;
age_n+age;
if last then do;
mean = round(((age_n)/(count)),.8);
median = ((count+1)/2);
end;
run;
By the above program we can calculate the mean and median.
lets us know me, if anybody find the logic for find mode
| Is This Answer Correct ? | 0 Yes | 6 No |
Post New Answer View All Answers
Mention how to limit decimal places for the variable using proc means?
what are the benefits of data integration? : Sas-di
Explain substr function?
Compare sas with other data analytics tools.
What is run-group processing?
Did you used proc test? when?
what is sas metadata server? : Sas-di
Explain the difference between using drop = data set option in set and data statement?
What is program data vector (pdv) and what are its functions?
What is the sas data set? : sas-grid-administration
i want for interview question & answer plz it need immediate send t my mail raviprakashmot@gmal.cm
I have a dataset concat having variable a b & c. How to rename a b to e & f?
what is the function of catx syntax? : Sas-administrator
Why and when do you use proc sql?
Hi Jeevan/Akshara I have tried to contact SASI Vats for latest Advanced SAS Programming Certification Dumps (A00-212) but have not got any response. I would highly and gratefully appreciate your assistance in this regard. If you guys have access to this, would you be kind enough to forward it to me ? I would abide by all the terms you have for this. Please, note my email id: upretigopi@yahoo.com Preti Sharma