Means: Difference between revisions
Jump to navigation
Jump to search
imported>Jeremy (Importing text file) |
imported>Jeremy (Importing text file) |
||
Line 8: | Line 8: | ||
:vals = means(x) | :vals = means(x) | ||
==== | ====Inputs==== | ||
* '''x''' = matrix (column vector) in which the sample data is stored. | * '''x''' = matrix (column vector) in which the sample data is stored. | ||
==== | ====Outputs==== | ||
The return value is a structure with fields: | The return value is a structure with fields: |
Revision as of 17:34, 3 September 2008
Purpose
Calculates the algebraic, harmonic, and geometric mean of a vector.
Synopsis
- vals = means(x)
Inputs
- x = matrix (column vector) in which the sample data is stored.
Outputs
The return value is a structure with fields:
- amean = arithmetic mean.
- na = number of obs used in amean calculation.
- hmean = harmonic mean.
- nh = number of obs used in hmean calculation.
- gmean = geometric mean.
- ng = number of obs used in gmean calculation.
Examples
mns = means(x);