summary_its: Summarize and Rename Coefficients for an ITS Model

View source: R/summary_its.R

summary_itsR Documentation

Summarize and Rename Coefficients for an ITS Model

Description

This function takes a gls model object generated by 'fit_its_model()' and modifies the summary output by renaming the coefficients, variable names, and other model-related terms to make them easier to interpret in the context of interrupted time series (ITS) analysis.

Usage

summary_its(model)

Arguments

model

A gls model object that was generated by another custom function in the package.

Details

The function modifies various components of the gls object, including:

  • Coefficients

  • Variable names in matrices (e.g., variance-covariance)

  • Terms and factors used in the model

  • Predicted variables

The renamed terms in the model output are specifically tailored to better describe the parameters of ITS models, such as control and pilot group slopes before and after interventions.

The function provides more meaningful names for ITS models by replacing default coefficient names with:

  • (Intercept) becomes "Control y-axis intercept"

  • x becomes "Pilot y-axis intercept difference to control"

  • time_index becomes "Control pre-intervention slope"

  • x:time_index becomes "Pilot pre-intervention slope difference to control"

Additional terms for up to 3 interventions are automatically renamed, reflecting intervention-related slopes in both control and pilot groups.

Value

A modified summary of the gls model object, where the coefficient names and other relevant model attributes have been renamed to be more interpretable.


multipleITScontrol documentation built on April 4, 2026, 1:08 a.m.