Last data update: 2014.03.03

R: Summarize a Fitted DStree Object
summary.DStreeR Documentation

Summarize a Fitted DStree Object

Description

Returns a detailed listing of a fitted DStree object.

Usage

## S3 method for class 'DStree'
summary(object, cp = 0, digits = getOption("digits"), file, ...)

Arguments

object

fitted model object of class "DStree". This is assumed to be the result of some function that produces an object with the same named components as that returned by the DStree function.

digits

Number of significant digits to be used in the result.

cp

trim nodes with a complexity of less than cp from the listing.

file

write the output to a given file name. (Full listings of a tree are often quite long).

...

arguments to be passed to or from other methods.

Details

The function prints the call, the table shown by printcp, the variable importance (summing to 100) and details for each node.

See Also

summary, DStree.object, printcp.

Examples

data(UnempDur)
tree <- DStree(spell~ui+age+tenure+logwage,status="censor1",data=UnempDur)
summary(tree)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(DStree)
Loading required package: rpart
Loading required package: pec
Loading required package: prodlim
Loading required package: Ecdat
Loading required package: Ecfun

Attaching package: 'Ecfun'

The following object is masked from 'package:base':

    sign


Attaching package: 'Ecdat'

The following object is masked from 'package:datasets':

    Orange

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DStree/summary.DStree.Rd_%03d_medium.png", width=480, height=480)
> ### Name: summary.DStree
> ### Title: Summarize a Fitted DStree Object
> ### Aliases: summary.DStree
> ### Keywords: tree
> 
> ### ** Examples
> 
> data(UnempDur)
> tree <- DStree(spell~ui+age+tenure+logwage,status="censor1",data=UnempDur)
> summary(tree)
Call:
DStree(formula = spell ~ ui + age + tenure + logwage, status = "censor1", 
    data = UnempDur)
  n= 3343 

          CP nsplit
1 0.04945555      0
2 0.01212965      1
3 0.01000000      2

Variable importance
     ui logwage  tenure     age 
     54      30       9       7 

Node number 1: 3343 observations,    complexity param=0.04945555
Median Surv=0.087944960, Deviance=8164.9750, wt=3343 
  left son=2 (1848 obs) right son=3 (1495 obs)
  Primary splits:
      ui      splits as  RL,           Deviance=7761.172, (0 missing)
      age     < 42.5     to the right, Deviance=8084.407, (0 missing)
      logwage < 5.45318  to the right, Deviance=8113.974, (0 missing)
      tenure  < 4.5      to the right, Deviance=8117.796, (0 missing)
  Surrogate splits:
      tenure  < 0.5      to the right, agree=0.628, (0 split)
      logwage < 5.244385 to the right, agree=0.605, (0 split)
      age     < 26.5     to the right, agree=0.597, (0 split)

Node number 2: 1848 observations
Median Surv=0.015151520, Deviance=4201.7940, wt=1848 

Node number 3: 1495 observations,    complexity param=0.01212965
Median Surv=0.177926400, Deviance=3559.3780, wt=1495 
  left son=6 (978 obs) right son=7 (517 obs)
  Primary splits:
      logwage < 5.31564  to the right, Deviance=3457.325, (0 missing)
      tenure  < 1.5      to the right, Deviance=3463.831, (0 missing)
      age     < 24.5     to the right, Deviance=3500.693, (0 missing)
  Surrogate splits:
      age < 23.5     to the right, agree=0.679, (0 split)

Node number 6: 978 observations
Median Surv=0.221881400, Deviance=2485.9490, wt= 978 

Node number 7: 517 observations
Median Surv=0.094777560, Deviance= 974.3907, wt= 517 

> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>