coef.treeda: Coefficients from treeda fit

Description Usage Arguments Value Examples

View source: R/treeda-functions.R

Description

Returns the coefficients from a treeda fit either in terms of the leaves only or in terms of the nodes and leaves.

Usage

1
2
## S3 method for class 'treeda'
coef(object, type = c("leaves", "nodes"), ...)

Arguments

object

An object of class treeda.

type

Should the coefficients be in the leaf space or the node space?

...

Not used.

Value

A Matrix object containing the coefficients.

Examples

1
2
3
4
5
6
7
data(treeda_example)
out.treeda = treeda(response = treeda_example$response,
    predictors = treeda_example$predictors,
    tree = treeda_example$tree,
    p = 1)
coef(out.treeda, type = "leaves")
coef(out.treeda, type = "nodes")

jfukuyama/treeDA documentation built on May 18, 2021, 8:52 a.m.