Description Usage Arguments Details Value References See Also Examples
Imputes missing values by fitting an additive or multiplicative main effects model to the non-missing data, and then randomly drawing values for the missing values, based on predictions from the model.
1 2 3 4 5 6 7 |
object |
Object of class |
mult |
If |
max |
Numeric vector giving maximum values for |
impute
performs a single imputation based on a simple, and not
necessarily appropriate, model. impute
is useful for generating
starting values for iterative calculations, for tidying data with a small
proportion of missing values, or for rough approximations. For more
sophisticated approaches to the imputation of demographic data see package
demest.
If mult
is TRUE
, meaning that the multiplicative model is
used, all non-missing values must be non-negative (0s are omitted from the
model.) If the mult
is TRUE
all imputed values are guaranteed
to be non-negative.
If all non-missing values are non-negative integers, imputed values are drawn from a Poisson distribution. Other they are drawn from a normal distribution.
The max
argument is useful when object
represents draws from a
binomial distribution. Setting max
to the number of trials for each
cell ensures that the imputed number of successes does not exceed the number
of trials.
An object with the same class as object
, with the missing
values filled in.
Little, RJA and Rubin, DB. 2002. Statistical Analysis with Missing Data, Wiley.
DemographicArray
, perturb
,
extrapolate
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.