Statistics Toolbox
  Go to function:
    Search    Help Desk 
grpstats    Examples   See Also

Summary statistics by group.

Syntax

Description

means = grpstats(X,group) returns the means of each column of X by group. X is a matrix of observations. group is a column of positive integers that indicates the group membership of each row in X.

[means,sem,counts] = grpstats(x,group,alpha) supplies the standard error of the mean in sem. counts is the same size as the other outputs. The i-th row of counts contains the number of elements in the i-th group.

grpstats(x,group) displays a plot of the means versus index with 95% confidence intervals about the mean value of for each value of index.

grpstats(x,group,alpha) plots 100(1 - alpha)% confidence intervals around each mean.

Example

We assign 100 observations to one of four groups. For each observation we measure five quantities with true means from 1 to 5. grpstats allows us to compute the means for each group.

See Also

tabulate, crosstab



[ Previous | Help Desk | Next ]