Stratified.staged.tree {ceg}R Documentation

Stratified.staged.tree

Description

Constructor method to Stratified.staged.tree S4 objects. It accepts different sets for parameters types.

Usage

Stratified.staged.tree(x, y, z, ...)

## S4 method for signature 'missing,ANY,ANY'
Stratified.staged.tree(x, y, z, ...)

## S4 method for signature 'ANY,ANY,ANY'
Stratified.staged.tree(x, y, z, ...)


  ## S4 method for signature 'data.frame,numeric,numeric'
Stratified.staged.tree(x = "data.frame",
  y = 1L, z = 0L)


  ## S4 method for signature 'data.frame,numeric,missing'
Stratified.staged.tree(x = "data.frame",
  y = 1L)


  ## S4 method for signature 'data.frame,missing,missing'
Stratified.staged.tree(x = "data.frame")


  ## S4 method for signature 'Stratified.event.tree,list,ANY'
Stratified.staged.tree(x = "Stratified.event.tree",
  y = "list")

Arguments

x

(data.frame) is a well behavioured data set or (Stratified.event.tree)

y

(numeric) alpha or (list) that represents the stage.structure. To construct it, the user must plot the Stratified.event.tree graph and use the labelled number of each node.

z

(numeric) variable.order

...

(not used)

Value

a Stratified.staged.tree S4 object

Note

The implementation admits providing the three arguments, or the first two, or even only the data.frame.
The default variable order is as in the data.frame and the default alpha is 1L.
To manualy create a stratified.event.tree from a stratified.event.tree:

1st

plot the stratified.event.tree - plot(set)

2nd

Looking the graph, you can create the stage structure, such as: stage.structure <- list(list(c(2,3)), list(c(4,7,12),c(5,8,9)))

3rd

Finally you can create your Stratified.event.tree: st.manual<- Stratified.staged.tree(set, stage.structure)

A call to Stratified.staged.tree( ) with no parameters will return an error message for missing argument.
A call to Stratified.staged.tree(x, ...), x not being a data.frame or a Event.tree, will return an error message.

Examples

sst <- Stratified.staged.tree(artificial.chds)

stt.manual <- Stratified.staged.tree(set.manual,
list(list(c(2,3)), list(c(4,7,12),c(5,8,9))))


[Package ceg version 0.1.0 Index]