afttest.formula: Model Diagnostics for AFT Models using Formulas

View source: R/afttest.R

afttest.formulaR Documentation

Model Diagnostics for AFT Models using Formulas

Description

Model Diagnostics for AFT Models using Formulas

Usage

## S3 method for class 'formula'
afttest(
  object,
  data,
  npath = 200,
  testType = "omnibus",
  estMethod = "rr",
  eqType = "ns",
  covTested = 1,
  npathsave = 50,
  linApprox = TRUE,
  seed = NULL,
  ...
)

Arguments

object

A formula expression, of the form response ~ predictors. The response is a Surv object with right censoring. See the documentation of lm, coxph and formula for details.

data

An optional data frame in which to interpret the variables occurring in the formula.

npath

An integer value specifying the number of approximated processes. The default is given by 200.

testType

A character string specifying the type of the test. The following are permitted:

omnibus

an omnibus test

link

a link function test

covForm

a functional form of a covariate

estMethod

A character string specifying the type of the estimator used. The readers are referred to the aftgee package for details. The following are permitted:

ls

Least-Squares Approach for Accelerated Failure Time with Generalized Estimating Equation

rr

Accelerated Failure Time with Smooth Rank Regression

eqType

A character string specifying the type of the estimating equation used to obtain the regression parameters. The readers are referred to the aftgee package for details. The following are permitted:

ns

Regression parameters are estimated by directly solving the nonsmooth estimating equations.

is

Regression parameters are estimated by directly solving the induced-smoothing estimating equations.

covTested

A single design-matrix column to test when testType is covForm, supplied by position or name. In formulas containing factors, a factor can expand to several columns; use one of the expanded column names returned by model.matrix().

npathsave

An integer value specifying the number of simulated paths retained in the returned object. The default is 50. Retaining paths can require substantial memory for omnibus tests.

linApprox

A logical value. If TRUE, the multiplier bootstrap is computed using the asymptotic linear approximation, which is significantly faster. If FALSE, the estimating equations are solved numerically for each bootstrap replication. Defaults to TRUE.

seed

An optional integer specifying the random seed for reproducibility.

...

Other arguments passed to methods.


afttest documentation built on Nov. 11, 2026, 9:06 a.m.