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

What is the difference between one to one merge and match merge? Give an example.

1053


Assuming {et} is randomly drawn from N(0,1) and e0 = 0, generate 200 observations of xt = et − 0.5e(t−1) and draw a line graph of xt.

1877


Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?

1907


if the Id has more then two transcatiion then show the first observation, IF Id has only two observation then It show both the observation

1612


What are the default statistics for means procedure?

1231


Describe 5 ways to do a “table lookup” in SAS?

1142


what are the considerations when picking a SAS/STAT procedure?

3364


what do the sas log messages "numeric values have been converted to character" mean? What are the implications? : Sas programming

1264


What is the maximum length of the macro variable? : sas-macro

1081


How to convert a numeric variable to a character variable?

1196


What are the differences between proc means and proc summary?

1126


If you could design your ideal job, what would it look like?

2919


what is business intelligence? : Sas-bi

1056


How would you define the end of a macro?

1083


What is the use of divide function?

1055