summarize_growth_model {GrowthCurveME}R Documentation

Summarize growth model object and data

Description

This function is used to create a list object of data frames based on a user's input data and output growth model object from growth_curve_model_fit. The list object (referred to in this package as 'growth_model_summary_list') can be used to extract model predicted values, residuals, and can be inputted into supporting functions from GrowthCurveME to generate plots and perform model diagnostics.

Usage

summarize_growth_model(
  data_frame,
  growth_model_object,
  model_type = "mixed",
  function_type = "exponential",
  fixed_rate = TRUE,
  time_unit = "hours"
)

Arguments

data_frame

A data frame object that at minimum contains three variables:

  • cluster - a character type variable used to specify how observations are nested or grouped by a particular cluster. Note if using a least-squares model, please fill in cluster values with a single repetitive dummy variable (e.g., '1'), do not leave blank.

  • time - a numeric type variable used for measuring time such as minutes, hours, or days

  • growth_metric - a numeric type variable used for measuring growth over time such as cell count or confluency

growth_model_object

The model object that is created using the growth_curve_model_fit

model_type

A character string specifying the model_type that was fit using the growth_curve_model_fit function. Options include either "mixed" or "least-squares". Defaults to "mixed".

function_type

A character string specifying the function for modeling the shape of the growth. Options include "exponential", "linear", "logistic", or "gompertz".

fixed_rate

A logical value specifying whether the rate constant of the function should be treated as a fixed effect (TRUE) or random effect (FALSE). Defaults to TRUE

time_unit

A character string specifying the units in which time is measured in. Defaults to "hours"

Value

A list object with the following data frames within the list:

See Also

growth_curve_model_fit

Examples


# Load example data (exponential data)
data(exp_mixed_data)
# Fit an mixed-effects growth model to the data
exp_mixed_model <- growth_curve_model_fit(
data_frame = exp_mixed_data,
function_type = "exponential",
return_summary = FALSE)
# Summarize the data by creating a summary list object
exp_mixed_model_summary <- summarize_growth_model(
data_frame = exp_mixed_data,
growth_model_object = exp_mixed_model,
model_type = "mixed",
function_type = "exponential",
time_unit = "hours")
# Extracting a data frame from the list object
model_summary_wide <- exp_mixed_model_summary[["model_summary_wide"]]


[Package GrowthCurveME version 0.1.11 Index]