Skip to contents

These S3 methods expose the standard regression components expected by model-auditing workflows: formulas, terms, observation counts, model frames, fitted values, and residuals. They return the expanded internal data by default because gamlss_longitudinal() represents structurally missing subject-time combinations explicitly.

Usage

# S3 method for class 'gamlss.longitudinal'
formula(
  x,
  parameter = c("mu", "sigma", "nu", "tau", "theta", "zeta"),
  internal = FALSE,
  ...
)

# S3 method for class 'gamlss.longitudinal'
terms(
  x,
  parameter = c("mu", "sigma", "nu", "tau", "theta", "zeta"),
  internal = FALSE,
  ...
)

# S3 method for class 'gamlss.longitudinal'
nobs(object, type = c("observed", "expanded", "submitted"), ...)

# S3 method for class 'gamlss.longitudinal'
model.frame(formula, type = c("expanded", "observed", "submitted"), ...)

# S3 method for class 'gamlss.longitudinal'
fitted(object, parameter = "mu", finite = FALSE, ...)

# S3 method for class 'gamlss.longitudinal'
residuals(
  object,
  type = c("response", "pearson", "quantile"),
  finite = TRUE,
  ...
)

Arguments

x, object, formula

A fitted gamlss.longitudinal object.

parameter

Distributional parameter to extract. Defaults to "mu".

internal

Logical; return internally translated formulas when TRUE.

...

Additional arguments reserved for future methods.

type

Observation-count, model-frame, or residual type.

finite

Logical; restrict fitted values or residuals to finite observed responses and finite fitted parameters.

Value

A formula, terms object, integer count, data frame, or numeric vector.