imi.lm.conv: imi.lm.conv

Description Usage Arguments Value See Also Examples

Description

This function uses iterative multiple imputation idea to compute the distance between estimated parameters and their precisions imputed datasets when fitting a linear models to see whether the already generated sets of imputed data are sufficient for such analysis or not.

Usage

1
2
imi.lm.conv(data.imp,epsilon,resp,regressors, conv.plot=TRUE,
                         dis.method='mahalanobis',mah.scale='combined',successive.valid=3)

Arguments

data.imp

A list imputed sets of data as its components.

epsilon

The threshold for difference between two iterations.

resp

A string value input with the name of the response variable. Note that this should match the name of one of the columns in the data.miss.

regressors

A vector of string values with the names of the predictors. Note that they should match the names of the variables in data.miss.

conv.plot

A logitical value, if 'TRUE' then a convergence plot will be generated, if 'FALSE' no plot will be provided.

dis.method

A string takes its values among 'euclidean', 'inf.norm', and 'mahalanobis' which specifies the distance measure between two iterations. Note that our suggestion is to use 'mahalanobis', other options are provided for research purposes.

mah.scale

A string takes its values among 'within', 'between', and 'combined' which specifies the scale matrix in Mahalanobis distance. Note that our suggestion is to use 'combined', other options are provided for research purposes.

successive.valid

An integer with minimum 1 which specifies the number of successive steps the stopping rule should be validated so the procedure could terminate.

Value

dis.steps

A vector with computed distance between iterations.

sufficient.M

An integer indicating the minumum number of sufficent imputed datasets, in case of insufficiency it will take the value 'Not sufficient!'

See Also

imi.lm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# In the setting of the example for imi.lm, we have:
imi.lm.conv(out.lm$data.imp,epsilon=0.05,resp,regressors,
+              conv.plot=TRUE,
+              dis.method='mahalanobis',mah.scale='within',successive.valid=3)
$dis.steps
 [1] 0.62518742 0.26078660 0.23218647 0.21404833 0.05736930 0.05001030 0.02659284 
 [8] 0.08570338 0.03877358 0.06810190 0.04897386 0.02438733 0.04324450

$sufficient.M
[1] 14

>
> imi.lm.conv(out.lm$data.imp,epsilon=0.01,resp,regressors,
+              conv.plot=TRUE,
+              dis.method='mahalanobis',mah.scale='within',successive.valid=3)
$dis.steps
 [1] 0.62518742 0.26078660 0.23218647 0.21404833 0.05736930 0.05001030 0.02659284
 [8] 0.08570338 0.03877358 0.06810190 0.04897386 0.02438733 0.04324450

$sufficient.M
[1] "Not sufficient!"

vahidnassiri/imi documentation built on June 25, 2019, 5:50 a.m.