naiveMI: Inference using naive method, under J2R

Description Usage Arguments Value

View source: R/util_fn.R

Description

Obtain estimation of the ATE using naive method by Rubin's rule or bootstrap

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
naiveMI(
  mmrm_formula,
  data_long,
  time_name,
  id_name,
  trt_name,
  M = 10,
  fit_model,
  estimator = "reg with interaction",
  bootstrap = FALSE,
  B = 100
)

Arguments

mmrm_formula

a symbolic description of the model to be fitted

data_long

long-form of the data frame

time_name

name of the time variable

id_name

name of the id variable

trt_name

name of the treatment variable

M

imputation size

fit_model

type of the analysis model. Available: lm, Rfit::rfit (rank regression), MASS::rlm (robust regression)

estimator

Estimator type in Rubin's method

bootstrap

Whether to use bootstrap variance

B

the number of bootstrap replicate

Value

point estimation, variance estimation (Rubin + bootstrap)


Merck/mmrm documentation built on Dec. 17, 2021, 4:12 a.m.