m2_mi: multiple imputation to set a margin

View source: R/m2_mi.R

m2_miR Documentation

multiple imputation to set a margin

Description

multiply imputes unobserved fraction for preservation of control treatment effect over placebo, which is used to set up a clincal margin (M2) for non-inferiority trial

Usage

m2_mi(dt, num_m = 10, maxit = 20, mi_method = "norm",
  use_pckg = "mice", i, n_iter = 100, chain = "one", n_minb = 2)

Arguments

dt

tibble, contains clinical experts survey information

num_m

numeric, Default: 10, number of imputed datasets

maxit

numeris, Default: 20, number of maximum iterations per imputation

mi_method

characgter, Default: "norm", method used for mice mi

use_pckg

character, 'mice' or 'norm', package to be used in MI

i

numeric, the seed is defined as 666*i (norm package)

n_iter

numeric, Default: 100, number of iterations to be used in data augmentation procedure (norm package)

chain

character, Default 'one', 'one' or 'multiple' chains for data augmentation

n_minb

numeric, Default 3, to set minbucket for mice when 'cart' is used

Details

the function reads a partially observed survey data, then multiple imputes it using mice with normal model

Value

tibble, contains summary of the multiply imputed responses

See Also

tibble map2 cor


yuliasidi/m2imp documentation built on Jan. 16, 2024, 3:59 a.m.