Description Usage Arguments Details Value See Also Examples
prep.dtmm
takes a data frame, or matrix and prepares it to be analyzed
by diagMAAR.dtmm.
1 |
dt |
A numeric matrix, data frame or data table. |
prep.dtmm
is part of the data preparation functions used to pre-process
data sets so that diagnostic tests for the MAAR assumption can be ran.
prep A prep S3 object that contains the original data, the desired diagnostic test to use, the sample size, the number of missing variables, the location of the missing variables, the number of variables and a data set that has the missingness indicators appended.
Other prep: prep.ccm
, prep.cop
,
prep
1 2 3 4 5 6 7 8 | # Generate 100 iid samples from a MVN with correlation equal to 0.3
samples.mvn <- sample_mvn(5, 0.3, 100)
# Take the Gaussian data and and delete some values from the fourth row.
obs.nvmn <- MAAR_mechanism(samples = samples.mvn, miss.coef = 0.2,
miss.nvar = 1, miss.var = 4,
prob.coef = matrix(c(-1, 0.5, 0.7, - 0.2), 1, 4))
dt.prep <- prep.dtmm(obs.mvn)
print(dt.prep)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.