Compile Framework/Subset Summary Statistics
Function to compile summary statistics for use with function framework.summary
from the ‘output’ of function gx.stats
.
framework.stats(xx)
xx |
name of the variable to be processed. |
The function compiles summary statistics consisting of the count of valid data, the number of NA
s, the minimum, 2nd, 5th, 10th, 25th (Q1), 50th (median), 75th (Q3), 90th, 95th and 98th percentiles and the maximum. The 95% confidence interval for the median is computed via the binomial theorem. In addition the Median Absolute Deviation (MAD) and Inter-Quartile Standard Deviation (IQSD) are computed as robust estimates of the standard deviation. Finally, the mean, standard deviation and coefficient of variation as a percentage are computed.
table |
a 20-element table is returned, see below: |
[1] |
the data/subset (sample) size, N. |
[2] |
number of |
[3:13] |
the data minimum, 2nd, 5th, 10th, 25th (Q1), 50th (median), 75th (Q3), 90th, 95th and 98th percentiles and the maximum. |
[14:15] |
the lower and upper 95% confidence bounds for the median. |
[16] |
the Median Absolute Deviation (MAD). |
[17] |
the Inter-Quartile Standard Deviation (IQSD). |
[18] |
the data (sample) Mean. |
[19] |
the data (sample) Standard Deviation (SD). |
[20] |
the Coefficient of Variation as a percentage (CV%). |
Any less than detection limit values represented by negative values, or zeros or other numeric codes representing blanks in the data, must be removed prior to executing this function, see ltdl.fix.df
.
Any NA
s in the data vector are counted and then removed prior to computing the summary statistics.
Robert G. Garrett
## Make test data available data(kola.c) attach(kola.c) ## Computes summary statistics for the Cu data fs <- framework.stats(Cu) fs ## Computes summary statistics for Finnish subset of the Cu data fs <- framework.stats(Cu[COUNTRY == "FIN"]) fs ## Clean-up and detach test data rm(fs) detach(kola.c)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.