Learn R Programming

SDModels (version 1.0.4)

fromList.SDTree: SDTree fromList method

Description

Converts the tree in an SDTree object from class list to class Node Glur2023Data.tree:StructureSDModels.

Usage

# S3 method for SDTree
fromList(object, ...)

Value

an SDTree object with the tree in Node format

Arguments

object

an SDTree object with the tree in list format

...

Further arguments passed to or from other methods.

Author

Markus Ulmer

References

See Also

toList

Examples

Run this code
set.seed(1)
n <- 10
X <- matrix(rnorm(n * 5), nrow = n)
y <- sign(X[, 1]) * 3 + rnorm(n)
model <- SDTree(x = X, y = y, Q_type = 'no_deconfounding', cp = 0.5)
fromList(toList(model))

Run the code above in your browser using DataLab