Code covered by the BSD License  

Highlights from
Descriptive Statistics

4.0

4.0 | 3 ratings Rate this file 8 Downloads (last 30 days) File Size: 3.01 KB File ID: #29305

Descriptive Statistics

by Matthias Chung

 

07 Nov 2010 (Updated 08 Nov 2010)

Calculates key values of the descriptive statistics

| Watch this File

File Information
Description

This function gets the key values for a descriptive statistics such as mean, std, mode, median, quartiles and percentiles. This includes the five- and seven-number summary.

Input x must be a vector or a matrix where each column of x is regarded as a data set if x is a matrix. Input param is an optional cell list of parameters, e.g., param = {'whisker', 2} setting whisker = 2. Multiple user defined options are separated by semi-colon, e.g., param = {'whisker', 2; 'qmethod','-mean'}.

Output ds is a structure. To extract the quartiles for instance quart = ds.quartile.

Examples:
ds = getDescriptiveStatistics(randn(1000,10))

ds = getDescriptiveStatistics(rand(1000,2),{'whisker', 2; 'qmethod','-mean'})

ds = getDescriptiveStatistics(rand(1000,2),{'percent', [25 50 75];'pmethod','nearestRank'})

MATLAB release MATLAB 7.10 (2010a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
12 Nov 2010 Virendra

very useful. Thanks.

10 Dec 2010 Yen Hanning

useful.

21 Jan 2012 Shatrughan

Useful..but could have been better if the calculation based on groups or classes would have possible..for example, in a single column data (variables), you have several classes (categories), and then calculation on each categories would have achieved. If you do not understand, please refer "grpstats" function of MATLAB..Combination of these fucntions would give more flexibility may be...Anyway good function... :)

Please login to add a comment or rating.
Updates
08 Nov 2010

Small error corrections.

Tag Activity for this File
Tag Applied By Date/Time
statistics Matthias Chung 08 Nov 2010 10:49:59
descriptive statistics Matthias Chung 08 Nov 2010 10:49:59
quartile Matthias Chung 08 Nov 2010 10:49:59
percentile Matthias Chung 08 Nov 2010 10:49:59
boxplot Matthias Chung 08 Nov 2010 10:49:59
median Matthias Chung 08 Nov 2010 10:49:59
outliers Matthias Chung 08 Nov 2010 10:49:59
whisker Matthias Chung 08 Nov 2010 10:49:59
percentile Steven Baeyens 27 Dec 2010 10:47:27
descriptive statistics Jerome Lahaye 23 Sep 2011 21:46:28

Contact us at files@mathworks.com