Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Explain data step in SAS

1105


What are SAS/ACCESS and SAS/CONNECT?

1150


Mention what is SAS data set?

1135


How can you limit the variables written to output dataset in data step?

1319


how to remove duplicates using proc sql?

1152


What do you know about sas data set?

1122


what are several options for creating reports in web report studio? : Sas-bi

1159


If you need the value of a variable rather than the variable itself what would you use to load the value to a macro variable? : sas-macro

1067


Explain what Proc glm does?

1220


what is broad cast agent? : Sas-bi

1071


What are common programming errors committed in sas

1152


What is the difference between using drop = data set option in data statement and set statement?

1166


Are you involved in writing the inferential analysis plan? Tables specfications?

2226


what is sas application server? : Sas-di

1083


what versions of sas have you used (on which platforms)? : Sas programming

1074