distextree {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

distextree(formula, data, subset, na.action = na.pass, weights, offset,
           cluster, family = NO(), control =
           distextree_control(...), converged = NULL, scores =
           NULL, doFit = TRUE, ...)

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.

subset

A sorted integer vector describing a subset.

weights

optional numeric vector of case weights.

family

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

na.action

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

offset

FIX ME.

cluster

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

control

Control arguments passed to extree_fit via distextree_control.

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

...

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 extree_fit) to parametric model fits based on the GAMLSS family of distribtuions.

Value

An object of S3 class disttree inheriting from class constparty.

See Also

mob, ctree, extree_fit, distfit

Examples

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

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

[Package disttree version 0.1-0 Index]