sim_one_group: Simulate longitudinal data with monotone missingness for one...

Description Usage Arguments Value

View source: R/util_fn.R

Description

Generate longitudinal data with monotone missingness

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
sim_one_group(
  n,
  k,
  P,
  sigma,
  beta,
  pi = NULL,
  pi_par = NULL,
  trt = 1,
  missing_type,
  distribution,
  outlier = "none"
)

Arguments

n

sample size

k

dimension of the covariates

P

the number of time point

sigma

Covariance matrix for the longitudinal response

beta

regression coefficient for the baseline covariates

pi

Observed probability for each missing pattern under MCAR

pi_par

Parameters for the missing mechanism model under MAR

trt

name of the treatment

missing_type

Type of missing. Available: MCAR, MAR, MNAR

distribution

Underlying multivariate distribution for the longitudinal responses

outlier

The types of outlier may exists. Available: none, Type 1, Type 2

Value

a list including a wide-form data frame and a long-form data frame


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