biometrician / abe

An R package for Augmented Backward Elimination
GNU General Public License v3.0
3 stars 0 forks source link

#24: new lines for each warning #24

Closed biometrician closed 1 year ago

biometrician commented 1 year ago

As a suggestion, I think the warnings would be easier to read if there is a new line for each warning using \n.

# Load packages ---------------------------------------------------
library(abe)        # variable selection + stability measures (abe, abe.resamling)
library(Hmisc)
library(shrink)
library(survival)

# Load data ------------------------------------------------------
data("GBSG", package = "shrink")

GBSG$enodes <- exp(-0.12 * GBSG$posnodal)
GBSG$prm.log2 <- log(GBSG$prm+1,2)
GBSG$esm.log2 <- log(GBSG$esm+1,2)
GBSG$age.spl <- rcspline.eval(GBSG$age, nk = 5, inclx = T)
GBSG$tumgrad.f <- factor(GBSG$tumgrad, levels = c(2, 1, 3))

fit <- coxph(Surv(rfst, cens) ~ age.spl + factor(menostat) + prm.log2
             + esm.log2 + tumsize +  enodes + tumgrad.f + strata(htreat),
             data = GBSG, x = TRUE, y = TRUE)

abe(fit, GBSG, include = "htreat", active = "menostat", tau = 0.05,
               exp.beta = TRUE, exact = TRUE, criterion = "alpha", alpha = 0.2,
               type.factor = "factor", verbose = FALSE)     

If it is okay, I would ask Gregor to do this.