circtree {circtree} | R Documentation |
Distributional trees based on maximum-likelihood estimation of parameters for a circular response employing the von Mises distribution.
circtree(formula, data, response_range = NULL, subset, na.action = na.pass, weights, offset, cluster, control = disttree_control(...), converged = NULL, scores = NULL, doFit = TRUE, ...)
formula |
a symbolic description of the model to be fit. This
should be of type |
data |
an optional data frame containing the variables in the model. |
response_range |
either a logical value indicating whether the response should be transformed to its original range (TRUE) or kept on the interval (-pi,pi] or a two-dimensional vector specifying a range of the circular response. |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
na.action |
a function which indicates what should happen when the data contain missing value. |
weights |
optional numeric vector of case weights. |
offset |
an optional vector of offset values. |
cluster |
an optional factor indicating independent clusters. Highly experimental, use at your own risk. |
control |
control arguments passed to |
converged |
an optional function for checking user-defined criteria before splits are implemented. |
scores |
an optional named list of scores to be attached to ordered factors. |
doFit |
a logical indicating if the tree shall be grown (TRUE) or not FALSE |
... |
arguments to be used to form the default |
Distributional regression trees for a circular response are an application of model-based recursive
partitioning and unbiased recursive partitioning based on the implementation in
disttree
using the infrastructure of extree_fit
.
An object of S3 class circtree
inheriting from class disttree
.
## example on parameter range: sdat.par <- circtree_simulate(response_range = c(-pi, pi)) ct.par <- circtree(y ~ x1 + x2, data = sdat.par) plot(ct.par) ## example on response range (0, 2pi): sdat.rad <- circtree_simulate(response_range = c(0, 2*pi)) ct.rad <- circtree(y ~ x1 + x2, data = sdat.rad) ## default: type = "response" plot(ct.rad, tp_args = list(response_range = FALSE)) plot(ct.rad, tp_args = list(response_range = TRUE)) plot(ct.rad, tp_args = list(response_range = c(0, 24))) ## example on response range (0, 360): sdat.deg <- circtree_simulate(response_range = c(0, 360)) ct.deg <- circtree(y ~ x1 + x2, data = sdat.deg) plot(ct.deg, tp_args = list(response_range = FALSE)) plot(ct.deg, tp_args = list(response_range = TRUE)) plot(ct.deg, tp_args = list(template = "geographics")) ## example on response range (0, 24): sdat.hour <- circtree_simulate(response_range = c(0, 24)) ct.hour <- circtree(y ~ x1 + x2, data = sdat.hour, response_range = c(0, 24)) plot(ct.hour, tp_args = list(response_range = FALSE)) plot(ct.hour, tp_args = list(template = "clock24")) plot(ct.hour, tp_args = list(template = "clock24", circlab = c("no", "mo", "mi", "ev")))