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
Tell me more about the parameters in macro? : sas-macro
What is the different between functions and PROCs that calculate the same simple descriptive statistics?
What is the function of output statement in a SAS Program?
how to do user inputs and command line arguments in sas?
How would you code a macro statement to produce information on the sas log? This statement can be coded anywhere? : sas-macro
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
Explain the special input delimiters used in sas programming.
what are the benefits of data integration? : Sas-di
What is program data vector (pdv)?
what is the different between functions and procs that calculate the same simple descriptive statistics? : Sas programming
what cause the "error: connect:" and "error in the libname statement" when there weren't any such problems?
How would you include common or reuse to be processed along with your statements?
In sas admin differentiate between roles and capabilities? : sas-grid-administration
what are 5 ways to perform a table lookup in sas? : Sas-administrator
describe the interaction table in sas di? : Sas-di