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 character string specifying the covariate which will be tested. The argument covTested is necessary only if testType is covForm. The default option for covTested is given by "1", which represents the first covariate in the formula argument.

npathsave

An integer value specifying the number of paths saved among all the paths. The default is given by 50. Note that it requires a lot of memory if saving all sampled paths (N by N matrix for each npath, and so npath*N*N elements).

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 March 22, 2026, 5:06 p.m.