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 / 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


Please Help Members By Posting Answers For Below Questions

What are the five ways to do a table lookup in sas? : sas-grid-administration

1056


What is the difference between SAS functions and procedures?

1141


What is the sas data set? : sas-grid-administration

971


What is auto call macro and how to create a auto call macro? What is the use of it? How to use it in sas with macros? : sas-macro

1032


How will you use the WHO Drug Dictionary for Reporting Clinical Trials?

2328


Tell me about % include and % eval? : sas-macro

1134


where to use sas business intelligence? : Sas-bi

1073


what are the categories that sas informats are used to the place the data? : Sas-administrator

1036


WHAT IS SAS WEB SERVICE and what are the steps to create an xml service ?

2788


what is snowflake schema? : Sas-di

1210


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

1153


explain the difference between proc means and proc summary?

1113


explain what is data set in sas? : Sas-administrator

973


What are the parameters of scan function?

1162


What is the differnce between SDTM 3.1.2 to 3.1.1 version

5069