plot_residDiagnostics {SynergyLMM}R Documentation

Plots for residuals diagnostics

Description

Visualization of residuals diagnostics for a fitted linear mixed model of tumor growth data.

Usage

plot_residDiagnostics(model)

Arguments

model

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

Value

A list with different plots for evaluating the normality and homoscedasticity of the normalized residuals (standardized residuals pre-multiplied by the inverse square-root factor of the estimated error correlation matrix, see nlme::residuals.lme), including:

Examples

data(grwth_data)
# Fit the 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",
  show_plot = FALSE
  )
# Generate plots 
plot_residDiagnostics(lmm)
# Access to specific plots
plot_residDiagnostics(lmm)[[1]]
plot_residDiagnostics(lmm)[[2]]

[Package SynergyLMM version 1.0.1 Index]