analyzeData: Fit a Linear Mixed Model

View source: R/analyzeData.R

analyzeDataR Documentation

Fit a Linear Mixed Model

Description

Fit a linear mixed model and extract the information relative to the parameter of interest.

Usage

analyzeData(
  data,
  ddf = "nlme",
  getinfo = TRUE,
  data.decision = NULL,
  trace = TRUE
)

Arguments

data

[data.frame] dataset for the current analysis.

ddf

[character] method used to compute the degrees of freedom of the Wald statistic. Can be "satterthwaite" or "nlme".

getinfo

[logical] should the information be computed at interim and decision? Otherwise no information is computed.

data.decision

[integer or data.frame] data or total number of patients for the future decision analysis (only relevant at interim). Used to compute the predicted total information at decision where only current (or future) drop-out value are excluded but future observations are kept.

trace

[logical] should the execution of the function be traced?

Examples

## simulate data in the wide format
set.seed(1)
dataW <- GenData(n=104)$d

## estimate mixed model
analyzeData(dataW, getinfo = FALSE)
analyzeData(dataW, getinfo = TRUE)
analyzeData(dataW, ddf = "satterthwaite", getinfo = TRUE)


paulowhite/DelayedGSD documentation built on Nov. 1, 2023, 5:36 p.m.