| Library: | stats |
| See also: | summarize mean var min max quantile kurtosis skewness |
| Quantlet: | descriptive | |
| Description: | descriptive provides extensive descriptive statistics for the columns of a data matrix. An additional vector of name strings can be given to identify columns by names. |
| Usage: | desc=descriptive(x{,xvars}) | |
| Input: | ||
| x | n x p matrix, the columns correspond to the variables. (x may contain NaN, Inf or -Inf.) | |
| xvars | optional, p x 1 string vector, variable names. | |
| Output: | ||
| desc | string output, containing table of descriptive statistics. | |
library("stats")
setenv("outputstringformat", "%s")
x=read("bank2")
xvars="length"|"l_height"|"r_height"|"u_frame"|"l_frame"|"diagonal"
descriptive(x,xvars)
descriptive statistics for all six variables, as e.g. for length:
[ 1,]
[ 2,] =========================================================
[ 3,] Variable length
[ 4,] =========================================================
[ 5,]
[ 6,] Mean 214.896
[ 7,] Std.Error 0.376554 Variance 0.141793
[ 8,]
[ 9,] Minimum 213.8 Maximum 216.3
[ 10,] Range 2.5
[ 11,]
[ 12,] Lowest cases Highest cases
[ 13,] 71: 213.8 6: 215.7
[ 14,] 40: 213.9 24: 215.7
[ 15,] 171: 213.9 57: 215.7
[ 16,] 76: 214.1 35: 215.9
[ 17,] 172: 214.2 167: 216.3
[ 18,]
[ 19,] Median 214.9
[ 20,] 25% Quartile 214.6 75% Quartile 215.1
[ 21,]
[ 22,] Skewness 0.187724 Kurtosis 0.712654
[ 23,]
[ 24,] Observations 200
[ 25,] Distinct observations 21
[ 26,]
[ 27,] Total number of {-Inf,Inf,NaN} 0
[ 28,]
[ 29,] =========================================================
[ 30,]
| Library: | stats |
| See also: | summarize mean var min max quantile kurtosis skewness |