mimpose: impose missing values

Description Usage Arguments Details Value See Also Examples

View source: R/mimpose.R

Description

imposes missing values

Usage

1
2
mimpose(dt, b_trt = 0, b_y = 0, b_x1 = 0, b_x2 = 0, b_ty = 0,
  do = 0.1, seed)

Arguments

dt

dataframe, on which missing values are imposed

b_trt

numeric, group missingness parameter, Default: 0

b_y

numeric, outcome missingness parameter, Default: 0

b_x1

numeric, covariate x1 missingness parameter, Default: 0

b_x2

numeric, covariate x2 missingness parameter, Default: 0

b_ty

numeric, covariatet treatment by group interaction, Default: 0

do

numeric, target drop-out rate, Default: 0.1

seed

numeric, seed specification before deleting observations

Details

this functtion returns the oroginal dataframe, where outcome variable y is replaces with incomplete outcome y.m

Value

original dataframe with missing outcome values

See Also

Uniform

Examples

1
2
3
4
5
6
 t <- sim_cont(
 p_C = 0.6, p_T = 0.5, n_arm = 200,
 mu1 = 4, mu2 = 100, sigma1 = 1,
 sigma2 = 20, r12 = -0.3,
 b1 = 0.1, b2 = -0.01)
 tm <- mimpose(t, b_x1 = 0.2, seed = 1555)

yuliasidi/nibinom documentation built on Dec. 14, 2021, 11:43 p.m.