nonpara_fn: Get bootstrap variance estimate

Description Usage Arguments Value

View source: R/util_fn.R

Description

For a given dataset, compute the bootstrap variance estimate by a prespecified method

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
nonpara_fn(
  formula,
  data_wide = NULL,
  data_long = NULL,
  time_name = NULL,
  id_name,
  trt_name,
  M,
  B,
  fit_model,
  estimator,
  method,
  llh_method = NULL
)

Arguments

formula

a symbolic description of the model to be fitted

data_wide

wide-form of the data frame

data_long

long-form of the data frame

time_name

name of the time variable (needed for long-form data)

id_name

name of the id variable

trt_name

name of the treatment variable

M

imputation size

B

number of bootstrap replicates

fit_model

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

estimator

type of the estimator. Available: sample mean, reg with interaction, reg without interaction

method

several methods to use. Available: naive MI, sequential MI, naive likelihood, sequential likelihood

llh_method

name of the likelihood-based method. Available: PMM, CBMI

Value

variance estimation by nonparametric bootstrap


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