framework.stats: Compile Framework/Subset Summary Statistics

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Function to compile summary statistics for use with function framework.summary from the ‘output’ of function gx.stats.

Usage

1

Arguments

xx

name of the variable to be processed.

Details

The function compiles summary statistics consisting of the count of valid data, the number of NAs, 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.

Value

table

a 20-element table is returned, see below:

[1]

the data/subset (sample) size, N.

[2]

number of NAs encountered in the input vector, NNA.

[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%).

Note

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 NAs in the data vector are counted and then removed prior to computing the summary statistics.

Author(s)

Robert G. Garrett

See Also

gx.stats, ltdl.fix.df, remove.na

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## 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)

rgr documentation built on May 2, 2019, 6:09 a.m.

Related to framework.stats in rgr...