Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

missingsummary

Classify and summarize missing values in a dataset


Description

Routines classifies codes of missing valuesas numbers in objects of the compositions package.

Usage

missingSummary(x,..., vlabs = colnames(x), 
                 mc=attr(x,"missingClassifier"), 
                 values=eval(formals(missingType)$values))
   missingType(x,..., mc=attr(x,"missingClassifier"),
                 values=c("NMV", "BDL", "MAR", "MNAR", "SZ", "Err"))

Arguments

x

a dataset which might contain missings

...

additional arguments for mc

mc

optionally in missingSummary, an alternate routine to be used instead of missingType

vlabs

labels for the variables

values

the names of the different types of missings. "Err" is a value that can not be classified e.g. Inf.

Details

The function mainly counts the various types of missing values.

Value

missingType returns a character vector/matrix with the same dimension and dimnames as x giving the type of every value.
missingSummary returns a table giving the number of missings of each type for each variable.

Author(s)

K. Gerald van den Boogaart

References

Boogaart, K.G., R. Tolosana-Delgado, M. Bren (2006) Concepts for the handling of zeros and missings in compositional data, Proceedings of IAMG 2006, Liege

See Also

Examples

data(SimulatedAmounts)
x <- acomp(sa.lognormals)
xnew <- simulateMissings(x,dl=0.05,MAR=0.05,MNAR=0.05,SZ=0.05)
xnew
missingSummary(xnew)

compositions

Compositional Data Analysis

v2.0-1
GPL (>= 2)
Authors
K. Gerald van den Boogaart <boogaart@hzdr.de>, Raimon Tolosana-Delgado, Matevz Bren
Initial release
2021-01-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.