Learn R Programming

Surrogate (version 3.4.4)

ICA_contcont_long: Fit a longitudinal model and calculate its ICA

Description

This is the single-call user interface. Model fitting uses all available observations at their actual measurement times. The mandatory evaluation grid is used only after fitting to construct the causal covariance matrices. Baseline responses must be rows in data with time = 0; they contribute to fitting but are excluded from the ICA evaluation grid.

Usage

ICA_contcont_long(
  data,
  model,
  formula,
  evaluation_times,
  id,
  treatment,
  time,
  endpoint,
  outcome,
  surrogate_label,
  true_label,
  treatment_levels = c(0, 1),
  covariates = character(0),
  residual_type = "exponential",
  sensitivity = list(residual = seq(-1, 1, by = 0.1), random_effects = seq(-1, 1, by =
    0.1)),
  extrapolation = c("warn", "allow", "error"),
  start_fit = NULL,
  control = list(rel.tol = 1e-10, x.tol = 1e-10, eval.max = 5000, iter.max = 3000),
  return_candidates = FALSE,
  progress = FALSE,
  tol = 1e-12
)

Value

An object of class surrogate_longitudinal_ica.

Arguments

data

A data.frame in long format.

model

One of the model names accepted by longitudinal_model_spec().

formula

Fixed-effects formula written in terms of the standardized response Y.

evaluation_times

A common numeric grid, endpoint-specific T/S grids, or "common_observed".

id, treatment, time, endpoint, outcome

Column names in data.

surrogate_label, true_label

Values identifying the two endpoints.

treatment_levels

Control and active treatment values, in that order.

covariates

Optional additional covariate columns.

residual_type

Temporal residual-correlation structure.

sensitivity

A list. Element residual is the grid for the four unidentified residual cross-world correlations. For RI models, random_effects is the corresponding random-intercept grid. For RI/RS models, random_completions must be a list of cross-arm covariance matrices Cov(b0,b1).

extrapolation

Extrapolation action; default "warn".

start_fit

Optional fitted model used for initialization.

control

Control list passed to nlminb().

return_candidates

Retain admissible completion components.

progress

Display progress for large calculations.

tol

Numerical tolerance.