coef.WCE: Obtain estimated coefficients from 'WCE' object

View source: R/coef.WCE.R

coef.WCER Documentation

Obtain estimated coefficients from WCE object

Description

This function extracts the estimated coefficients from a WCE object.

Usage

## S3 method for class 'WCE'
coef(object, ...)

Arguments

object

A WCE object.

...

Optional; other parameters to be passed through to coef.

Details

The function returns a list with one element if the WCE object was fitted without covariates and two if the WCE object was fitted with covariates. The first element is a matrix of estimated coefficients for the artificial D variables (see Sylvestre and Abrahamowicz, 2009). Each row of the matrix corresponds to a model with the number of knots specified in WCE. The second element of the list is a matrix of estimated covariate coefficients. Similarly, each row of the matrix corresponds to a model with the number of knots specified in WCE.

Value

WCEest Matrix of estimated coefficients of the artificial D variables.

covariates Matrix of estimated coefficients of the covariates (optional).

References

Sylvestre, M. P., & Abrahamowicz, M. (2009). Flexible modeling of the cumulative effects of time-dependent exposures on the hazard. Statistics in medicine, 28(27), 3437-3453.

See Also

WCE

Examples

wce <- WCE(data=drugdata, analysis="Cox", nknots=1, cutoff = 90, constrained = "R",
id = "Id", event = "Event", start = "Start", stop = "Stop", expos = "dose",
covariates = c("age", "sex"))
coef(wce)


WCE documentation built on May 29, 2024, 2:40 a.m.