disttree {disttree}R Documentation

Distributional Regression Tree

Description

Trees based on maximum-likelihood estimation of parameters for distributions from the GAMLSS family (for generalized additive models for location, scale, and shape).

Usage

disttree(formula, data, na.action, cluster, family = NO(), bd = NULL,
         type.tree = "mob", decorrelate = "none", offset,
         censtype = "none", censpoint = NULL, weights = NULL,
         terminal_objects = FALSE, type.hessian = c("checklist", "analytic", "numeric"),
         control = partykit::mob_control(), ocontrol = list(), ...)

Arguments

formula

A symbolic description of the model to be fit. This should be of type y ~ x1 + x2 where y should be the response variable and x1 and x2 are used as partitioning variables.

data

An optional data frame containing the variables in the model.

na.action

A function which indicates what should happen when the data contain NAs.

cluster

An optional vector (typically numeric or factor) with a cluster ID to be employed for clustered covariances in the parameter stability tests.

family

specification of the response distribution. Either a gamlss.family object, a list generating function or a family list.

bd

binomial denominator: additional parameter needed for binomial gamlss.families

type.tree

Specification of the type of tree learner, either "mob" or "ctree".

decorrelate

Specification of the type of decorrelation for the empirical estimating functions (or scores) either "none" or "opg" (for the outer product of gradients) or "vcov" (for the variance-covariance matrix, assuming this is an estimate of the Fisher information).

offset

FIX ME.

censtype

Can either be 'none', 'left' or 'right' to set the type of censoring for censored response.

censpoint

Numeric value. Censoring point can be set for censored response.

weights

Optional numeric vector of case weights.

terminal_objects

Logical argument deciding whether a model object should be fit to the terminal node.

type.hessian

Can either be 'checklist', 'analytic' or 'numeric' to decide how the hessian matrix should be calculated in the fitting process in distfit. For 'checklist' it is checked whether a function 'hdist' is given in the family list. If so, 'type.hessian' is set to 'analytic', otherwise to 'numeric'.

control

Control arguments passed to mob or ctree.

ocontrol

List with control parameters passed to optim in distfit.

...

Further arguments passed to optim in distfit.

Details

Distributional regression trees are an application of model-based recursive partitioning and unbiased recursive partitioning (implemented in mob and ctree) to parametric model fits based on the GAMLSS family of distribtuions.

Value

An object of S3 class disttree inheriting from class modelparty or constparty.

See Also

mob, ctree, distfit

Examples

tr <- disttree(dist ~ speed, data = cars)
print(tr)

plot(tr)
plot(as.constparty(tr))

[Package disttree version 0.1-0 Index]