coef.tramnet_Lm {tramnet}R Documentation

coef method for class "tramnet_Lm"

Description

coef method for class "tramnet_Lm"

Usage

## S3 method for class 'tramnet_Lm'
coef(object, with_baseline = FALSE, tol = 1e-06,
  as.lm = FALSE, ...)

Arguments

object

object of class "tramnet_Lm"

with_baseline

If TRUE, also prints coefficients for the baseline transformation

tol

tolerance when an estimate should be considered 0 and not returned (default: 1e-6)

as.lm

If TRUE parameters are rescaled to the usual parametrization of lm

...

Additional arguments to coef

Value

Numeric vector containing the linear model shift parameter estimates

Author(s)

Torsten Hothorn, Lucas Kook

Examples


data(cars)
m0 <- Lm(dist ~ 1, data = cars)
x <- as.matrix(cars[, "speed", drop = FALSE])
mt <- tramnet(m0, x = x, alpha = 0, lambda = 0, check_dcp = FALSE)
coef(mt)
coef(mt, with_baseline = TRUE)
coef(mt, as.lm = TRUE)
coef(lm(dist ~ speed, data = cars))


[Package tramnet version 0.0-8 Index]