summarize_growth_model_ls {GrowthCurveME}R Documentation

Summarize least-squares growth model object and data

Description

This function is used within the summarize_growth_model function to create a list object of data frames based on a user's input data frame and output least-squares 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_ls(
  data_frame,
  ls_model,
  function_type = "exponential",
  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

ls_model

The least-squares model object that is created using the growth_curve_model_fit

function_type

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

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 summarize_growth_model

Examples

# Load example data (exponential data)
data(exp_mixed_data)
# Fit an mixed-effects growth model to the data
exp_ls_model <- growth_curve_model_fit(
data_frame = exp_mixed_data,
function_type = "exponential",
model_type = "least-squares",
return_summary = FALSE)
# Summarize the data by creating a summary list object
exp_ls_model_summary <- summarize_growth_model_ls(
data_frame = exp_mixed_data,
ls_model = exp_ls_model,
function_type = "exponential",
time_unit = "hours")

[Package GrowthCurveME version 0.1.0 Index]