Learn R Programming

MRStdLCRT (version 0.1.0)

mrstdlcrt_fit: Fit model-robust standardization for longitudinal CRTs

Description

Fit model-robust standardization for longitudinal CRTs

Usage

mrstdlcrt_fit(
  data,
  formula,
  cluster_id = "cluster",
  period = "period",
  trt = "trt",
  method = c("gee", "lmer", "glmer"),
  family = c("gaussian", "binomial"),
  corstr = "independence",
  scale = c("RD", "RR", "OR")
)

Value

Object of class "mrs".

Arguments

data

data.frame with outcome, treatment, period, cluster, covariates.

formula

model formula; may include interactions and random effects.

cluster_id

cluster id column name.

period

period column name.

trt

treatment column name (0/1).

method

"gee","lmer","glmer".

family

"gaussian","binomial".

corstr

gee correlation.

scale

For binomial: "RD","RR","OR" (RR/OR are on log scale).