Library: | stats |
See also: | mean mediancl varcl |
Quantlet: | meancl | |
Description: | Computes the mean of the columns of classified data |
Usage: | z = meancl(gr, fr) | |
Input: | ||
gr | m x n grid matrix, each column must be ordered ascendently | |
fr | (m-1) x n matrix of frequencies for each interval in each column | |
Output: | ||
z | 1 x n row vector of means for each column |
library("stats") randomize(666) ; make four columns each with 15 random intervals gr = sort(normal(5,4)|5+normal(5,4)|10+normal(5,4),0) gr[,3] = 10 + gr[,3] fr = ceil(30*uniform(14)~20*uniform(14,2)~2*uniform(14)) meancl(gr,fr)
Contents of m [1,] 4.6065 5.3096 14.82 4.6954