Description Usage Arguments Warning Examples
Takes a fitted GAM tree and plots the smooth functions fitted in each of the terminal nodes of the tree.
1 2 3 4 5 6 7 8 9 10 11 12 |
x |
object of class |
which |
character. The default ( |
which_terms |
character; |
residuals |
Only used when |
dim |
numeric vector of length two. Specifies how many rows and columns
of plots should be fit on a single page.
|
ylim |
|
treeplot_ctrl |
list of (named) arguments to be passed to
|
gamplot_ctrl |
list of (named) arguments to be passed to
|
... |
further arguments, currently not used. |
The plotted terms by default also represent confidence bands. These should be taken with a big grain of salt, because they do NOT account for the searching of the tree structure; they assume the tree structure was known in advance. They should be interpreted as overly optimistic and with caution.
1 2 3 4 5 6 7 8 | gt1 <- gamtree(Pn ~ s(PAR, k = 5L) | Species, data = eco,
cluster = eco$specimen)
plot(gt1, which = "tree") # default is which = 'both'
plot(gt1, which = "terms", gamplot_ctrl = list(shade = TRUE))
gt2 <- gamtree(Pn ~ s(PAR, k = 5L) | s(cluster_id, bs = "re") + noise | Species,
data = eco, cluster = eco$specimen)
plot(gt2, which = "tree") # default is which = 'both'
plot(gt2, which = "terms", gamplot_ctrl = list(shade = TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.