pmrm_estimates: Parameter estimates and confidence intervals

View source: R/pmrm_estimates.R

pmrm_estimatesR Documentation

Parameter estimates and confidence intervals

Description

Report parameter estimates and confidence intervals for a progression model for repeated measures (PMRM).

Usage

pmrm_estimates(
  fit,
  parameter = c("theta", "beta", "alpha", "gamma", "sigma", "phi", "rho", "Sigma",
    "Lambda"),
  confidence = 0.95
)

Arguments

fit

A fitted model object of class "pmrm_fit" returned by a pmrm model-fitting function.

parameter

Character string, name of the type of model parameter to summarize. Must be one of "beta", "theta", "alpha", "gamma", "sigma", "rho", "Sigma", or "Lambda".

confidence

Numeric between 0 and 1, the confidence level to use in 2-sided normal confidence intervals.

Value

A tibble with one row for each scalar element of the selected model parameter and columns with estimates, standard errors, lower and upper bounds of two-sided normal confidence intervals, and indexing variables. If applicable, the indexing variables are arm and/or visit to indicate the study arm and study visit. If there is no obvious indexing factor in the data, then a generic integer index column is used. For covariance matrices, elements are identified with the visit_row and visit_column columns.

beta is not a true parameter. Instead, it is a function of theta and fixed at zero for the control arm and at baseline. At these marginals, the standard errors and confidence intervals for beta are NA_real_.

Examples

  set.seed(0L)
  simulation <- pmrm_simulate_decline_nonproportional(
    visit_times = seq_len(5L) - 1,
    gamma = c(1, 2)
  )
  fit <- pmrm_model_decline_nonproportional(
    data = simulation,
    outcome = "y",
    time = "t",
    patient = "patient",
    visit = "visit",
    arm = "arm",
    covariates = ~ w_1 + w_2
  )
  pmrm_estimates(fit, parameter = "beta")
  pmrm_estimates(fit, parameter = "alpha")

pmrm documentation built on March 12, 2026, 5:07 p.m.