fittrees: Fit Trees for 5-STAR

View source: R/5STARcorefun.R

fittreesR Documentation

Fit Trees for 5-STAR

Description

Fits preliminary (3A) and pooled final (3B) trees to determine homogenous risk strata for use with 5-STAR algorithm

Usage

fittrees(yy, X, family = "cox", verbose = 0,
  tree.hyper = tree_control())

Arguments

yy

Trait/response (either a binary or continuous covariate or a Surv() object summarizing follow-up time for right-censored data and status indicator where 1=dead, 0=censored)

X

Data frame of all possible stratification covariates

family

Trait family, current options: "cox", "binomial", or "gaussian"

verbose

Numeric variable indicating amount of information to print to the terminal (0 = nothing, 1 = notes only, 2+ = notes and intermediate output)

tree.hyper

List of control variables for tree fitting (see tree_control for details), many of which will be passed into ctree_control.

Value

  • strataids: vector of subject-level strata membership (1 = highest risk, 2 = 2nd highest risk, etc.)

  • stratadefn: definition of final formed strata, in terms of covariates

  • finaltree: ctree object; final, pruned tree built by ctree, in terms of preliminary strata membership

  • prelimstrataids: vector of subject-level strata membership for preliminary, unpruned tree

  • prelimstratadefn: definition of final formed strata, in terms of covariates for preliminary, unpruned tree

  • prelimtree: ctree object; preliminary, unpruned tree built by ctree, in terms of covariates


rmarceauwest/fiveSTAR documentation built on June 30, 2023, 7:38 a.m.