carx.formula: A formula interface to the 'carx' method

Description Usage Arguments Value See Also Examples

View source: R/carx_default.R

Description

This interface uses the supplied formula and data provided by data and other arguments in ... to invoke the carx.default method. This is the preferred way of calling the carx.default function.

Usage

1
2
## S3 method for class 'formula'
carx(formula, data = list(), ...)

Arguments

formula

a formula representing the regression part of the model, such as y ~ x1 + x2.

data

a list, data.frame, or a cenTS object which includes the following:

  • the response variable with variable name identified by the supplied formula.

  • any covariate(s) with with variable name(s) identified by the supplied formula.

  • ci whose components take values from -1, 0, 1, where -1 (0,1) indicates that the corresponding element in the response variable is left-censored (not censored, right censored).

  • lcl which denotes the vector of left (lower) censoring limits.

  • ucl which denotes the vector of right (upper) censoring limits.

...

other parameters accepted by carx.default except y, x, ci, lcl, and ucl.

Value

a CARX object of the estimated model.

See Also

carx.default for more options.

cenTS on how to construct a cenTS object.

Examples

1
2
dat = carxSim(nObs=100,seed=0)
mdl <- carx(y~X1+X2-1,data=dat, p=2, CI.compute = FALSE)

carx documentation built on Nov. 20, 2017, 9:04 a.m.

Related to carx.formula in carx...