View source: R/estimationdata.R
EstimationData | R Documentation |
Conducts imputation if necessary.
EstimationData(
formula = NULL,
data = NULL,
subset = NULL,
weights = NULL,
missing = "Exclude cases with missing data",
m = 10,
seed = 12321,
error.if.insufficient.obs = TRUE,
remove.missing.levels = TRUE,
impute.full.data = TRUE
)
formula |
An object of class |
data |
A |
subset |
An optional vector specifying a subset of
observations to be used in the fitting process, or, the name of
a variable in |
weights |
An optional vector of sampling weights, or, the name
of a variable in |
missing |
How missing data is to be treated in the
regression. Options are: |
m |
Number of imputation samples. |
seed |
The random number seed used in the imputation. |
error.if.insufficient.obs |
Throw an error if there are more variables than observations. |
remove.missing.levels |
Logical; whether levels are removed if they do not occur in the observed data. |
impute.full.data |
logical; if |
Removes any empty levels from factors.
A list with components
estimation.data
- tidied (filtered/subsetted and
NA-free) data.frame
weights
- the cleaned
weights with any filters applied(i.e. the weights with NA and
negative weights set to 0),
unfiltered.weights
-
the cleaned weights from the complete data (i.e. with no filter
applied)
post.missing.data.estimation.sample
-
logical vector with length equal to the number of rows of
data
with a TRUE
value in position i
indicating that the i
th row of data
appears in
the tidied data estimation.data
data
-
original data
(without subset applied), but with
imputation performed (if requested)
description
-
character; description of the data; see
SampleDescription
Imputation
,
SampleDescription
,
EstimationDataTemplate
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.