tramnet {tramnet}R Documentation

Regularised Transformation Models

Description

Partially penalized and constrained transformation models, including Cox models and continuous outcome logistic regression. The methodology is described in the tramnet vignette accompanying this package.

Usage

tramnet(model, x, lambda, alpha, constraints = NULL, ...)

Arguments

model

an object of class "tram" as returned by any of the modelling functions from package tram.

x

a numeric matrix, where each row corresponds to the same row in the data argument used to fit model

lambda

a positive penalty parameter for the whole penalty function

alpha

a mixing parameter (between zero and one) defining the fraction between absolute and quadratic penalty terms

constraints

an optional list containing a matrix of linear inequality contraints on the regression coefficients and a vector specifying the rhs of the inequality

...

additional parameters to solve

Value

An object of class "tramnet" with coef, logLik, summary, simulate, residuals and plot methods

Author(s)

Lucas Kook, Balint Tamasi, Sandra Sigfried

Examples


if (require("penalized") & require("survival")) {
  ## --- Comparison with penalized
  data("nki70", package = "penalized")
  nki70$resp <- with(nki70, Surv(time, event))
  x <- scale(model.matrix( ~ 0 + DIAPH3 + NUSAP1 + TSPYL5 + C20orf46,
                          data = nki70))
  fit <- penalized(response = resp, penalized = x, lambda1 = 1, lambda2 = 0,
                   standardize = FALSE, data = nki70)
  y <- Coxph(resp ~ 1, data = nki70, order = 10, log_first = TRUE)
  fit2 <- tramnet(y, x, lambda = 1, alpha = 1) ## L1 only
  coef(fit)
  coef(fit2)
}


[Package tramnet version 0.0-8 Index]