impute: Impute a dataset

Description Usage Arguments Examples

Description

Impute a dataset

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
impute(model, ..., n.imp = 19)

## S4 method for signature 'ANY'
impute(model, ..., n.imp = 19)

## S4 method for signature 'glmerMod'
impute(model, data, ..., n.imp)

## S4 method for signature 'inla'
impute(model, ..., n.imp = 19)

## S4 method for signature 'lm'
impute(model, data, ..., n.imp)

Arguments

model

model to impute the dataset

...

other arguments. See details

n.imp

the number of imputations. Defaults to 19

data

The dataset holding both the observed and the missing values

Examples

1
2
3
4
dataset <- generateData(n.year = 10, n.site = 50, n.run = 1)
dataset$Count[sample(nrow(dataset), 50)] <- NA
model <- lm(Count ~ Year + factor(Period) + factor(Site), data = dataset)
impute(model, dataset)

ThierryO/multimput documentation built on May 9, 2019, 4:42 p.m.