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 difference between: x=a+b+c+d; and x=sum (of a, b, c ,d);? : Sas programming
how could you generate test data with no input data? : Sas programming
What is the difference between match merge and one to one merge?
Mention how to limit decimal places for the variable using proc means?
What are the different types of sas functions?
how to remove duplicates using proc sql?
Differentiate input and infile.
what do the pad and dim functions do? : Sas programming
what is the different between functions and procs that calculate the same simple descriptive statistics? : Sas programming
data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.
explain about various caches available in data integrator? : Sas-di
What is the sas data set? : sas-grid-administration
how to change the execute of macro
What is the difference between where and if statement?
Briefly explain input and put function?