Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

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

Note:

Example:
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)

Result:
Contents of m
[1,]   4.6065   5.3096    14.82   4.6954



Author: J. Budek, K. Komorad, W. Haerdle, 20010716. license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006