Learn R Programming

SynergyLMM (version 1.1.2)

lmmModel_estimates: Get estimates from a linear mixed model of tumor growth data

Description

lmmModel_estimates allows the user to easily extract some of the interesting model estimates for further use in other functions, such as for power calculation.

Usage

lmmModel_estimates(model, robust = FALSE, type = "CR2")

# S3 method for explme lmmModel_estimates(model, robust = FALSE, type = "CR2")

# S3 method for gompertzlme lmmModel_estimates(model, robust = FALSE, type = "CR2")

Value

A data frame with the estimated values for the coefficients of the tumor growth for each treatment, their standard error, the standard deviation of the random effects, and the standard deviation of the residuals of the model. These values can be useful for the power analysis of the model using APrioriPwr().

Arguments

model

An object of class "lme" representing the linear mixed-effects model fitted by lmmModel().

robust

If TRUE, sandwich-based robust estimators of the standard error of the regression coefficient estimates by clubSandwich::conf_int() are provided. Sandwich-based robust estimators are only available for exponential growth models ('explme').

type

Character string specifying which small-sample adjustment should be used when robust = True. Available options are "CR0", "CR1", "CR1p", "CR1S", "CR2", or "CR3". See "Details" section of clubSandwich::vcovCR() for further information.

Details

The model estimates provided by lmmModel_estimates include:

  • Fixed effect coefficients for the Control, Drug A, Drug B, (Drug C, if present), and Combination groups, respectively.

  • The standard error (se) corresponding to each of the fixed effect coefficients.

  • Standard deviation of the random effects (between-subject variance). Column sd_ranef.

  • Standard deviation of the residuals (within-subject variance). Column sd_resid.

Examples

Run this code
data("grwth_data")
# Fit example model
lmm <- lmmModel(
  data = grwth_data,
  sample_id = "subject",
  time = "Time",
  treatment = "Treatment",
  tumor_vol = "TumorVolume",
  trt_control = "Control",
  drug_a = "DrugA",
  drug_b = "DrugB",
  combination = "Combination"
  ) 
# Get the estimates
lmmModel_estimates(lmm)

Run the code above in your browser using DataLab