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: summarize descriptive frequency mean var min max quantile

Quantlet: summarizex
Description: provides a summary table (containing: N, Nmiss, min, max, mean, standard error, 1%, 10%, 25%, 50%, 75%, 90%, 99% quantiles) for all columns of a data matrix. Missings values are omitted. An additional vector of name strings can be given to identify the columns by names.

Usage: summ = summarizex(x{,xvars})
Input:
x n x p matrix, the columns correspond to the variables.
xvars optional, p x 1 vector of strings, containing variable names.
Output:
summ string output, containing summary table.

Example:
library("stats")
x=read("bank2")
xvars="length"|"l_height"|"r_height"|"u_frame"|"l_frame"|"diagonal"
summarizex(x,xvars)

Result:
[ 1,] "          "
[ 2,] "                    N       Nmiss     Minimum     Maximum        Mean    Std.Dev.    Variance"
[ 3,] "         -------------------------------------------------------------------------------------"
[ 4,] "length            200           0       213.8       216.3       214.9     0.37655     0.14179"
[ 5,] "l_height          200           0         129         131      130.12     0.36103     0.13034"
[ 6,] "r_height          200           0         129       131.1      129.96     0.40407     0.16327"
[ 7,] "u_frame           200           0         7.2        12.7      9.4175      1.4446      2.0869"
[ 8,] "l_frame           200           0         7.7        12.3       10.65     0.80295     0.64472"
[ 9,] "diagonal          200           0       137.8       142.4      140.48      1.1523      1.3277"
[10,] "          "
[11,] "                   1%         10%         25%      Median         75%         90%         99%"
[12,] "         -------------------------------------------------------------------------------------"
[13,] "length          213.9       214.5       214.6       214.9       215.1       215.4       215.7"
[14,] "l_height        129.4       129.6       129.9       130.2       130.4       130.6       130.8"
[15,] "r_height        129.1       129.4       129.7         130       130.2       130.4       131.1"
[16,] "u_frame           7.2         7.7         8.2         9.1        10.6        11.6        12.3"
[17,] "l_frame           8.5         9.7        10.1        10.6        11.2        11.8        12.2"
[18,] "diagonal        137.8       139.2       139.5      140.45       141.5       141.9       142.3"
[19,] " "



Author: M. Mueller, 20011221
(C) MD*TECH Method and Data Technologies, 05.02.2006