coef.treeda {treeDA} | R Documentation |
Coefficients from treeda fit
Description
Returns the coefficients from a treeda fit either in terms of the leaves only or in terms of the nodes and leaves.
Usage
## S3 method for class 'treeda'
coef(object, type = c("leaves", "nodes"), ...)
Arguments
object |
An object of class |
type |
Should the coefficients be in the leaf space or the node space? |
... |
Not used. |
Value
A Matrix
object containing the coefficients.
Examples
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")
[Package treeDA version 0.0.5 Index]