| desc | R Documentation |
desc() estimates the descriptive statistics such as
Min(Minimum), 1st Qu.(quartile), Median, Mean
(average), 3rd Qu.(3rd quartile), Max(maximum), var
(variance), std.dev(standard deviation), coef.var
(CV or coefficient of variation) of the data set.
desc(datap, resp)
datap |
The data set |
resp |
an integer value indicating the column
in |
The desc() function estimates the descriptive statistics,
in tables for one or more independent (exogenous) variables on
a dependent(endogenous) variable. It acts only on numerical
variables.
For example for the variable x:
1st. quartile:
\mjsdeqnQ_1 = (n + 1) x 1/4
2nd. quartile or Median:
\mjsdeqnmd = (n + 1) x 2/4
3rd Qu.:
\mjsdeqnQ_3 = (n + 1) x 3/4
Arithmetic mean:
\mjsdeqn\barx=\frac1n \sum_i=i^n x_i
Range:
\mjsdeqnR_x = \max(x) - \min(x)
Variance:
\mjsdeqn\sigma_x^2 = \frac\sum_i=1^n(x_i-\barx)^2n
Standard deviation:
\mjsdeqnsd_x = \sqrt\frac\sum_i (x_i - \mu)^2n
SEM or SE.mean, the standard error of the mean is
calculated simply by taking the standard deviation and
dividing it by the square root of the sample size:
\mjsdeqnSEM_x = \fracsd(x)\sqrtn
coef.var or coefficient of variation:
\mjsdeqnCV = \fracsd(x)\barx \times 100
Returns a list of 3 objects:
Descriptive statistics1 of input data
Descriptive statistics2 of input data
A table of correlation coefficients
Ali Arminian abeyran@gmail.com
Bhattacharyya GK and Johnson RA 1997. Statistical Concepts and Methods, John Wiley and Sons, New York.
Draper N and Smith H 1981. Applied Regression Analysis, John Wiley & Sons, New York.
Neter, J, Whitmore, GA, Wasserman, W 1992. Applied Statistics. Allyn & Bacon, Incorporated, ISBN 10: 0205134785 / ISBN 13: 9780205134786.
Snedecor, G.W., Cochran, W.G. 1980. Statistical Methods. Iowa State University Press.
correlation, multiple linear regression,
data(dtsimp)
desc(dtsimp, 1)
data(dtraw)
desc(dtraw[, -1], 1)
data(heart)
desc(heart, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.