R: PATHMOX-REG: Segmentation Trees in linaer and LAD regression...
reg.pathmox
R Documentation
PATHMOX-REG: Segmentation Trees in
linaer and LAD regression model
Description
The function reg.pathmox calculates a binary segmentation tree in the context
of linear regression following the PATHMOX algorithm. This function generalizes the Pathmox
algorithm introduced by Sanchez in 2009 to the context of linear and LAD regression.
Usage
reg.pathmox(formula, SVAR, signif, deep, method, size, tree = TRUE,
data = NULL, ...)
Arguments
formula
An object of class "formula".
SVAR
A data frame of factors contaning the segmentation variables.
signif
A numeric value indicating the significance threshold of the
F-statistic. Must be a decimal number between 0 and 1.
deep
An integer indicating the depth level of the tree. Must be an
integer greater than 1.
method
A string indicating the criterion used to calculate the
the test can be equal to "lm" or "lad"
node.
size
A numeric value indicating the minimum size of elements inside a
node.
tree
A logical value indicating if the tree should be displayed
(TRUE by default).
data
an optional data frame.
...
Further arguments passed on to reg.pathmox.
Details
The argument formula is an object of class "formula" (or one that can be coerced to that class):
a symbolic description of the model to be fitted.
The argument SVAR must be a data frame containing segmentation
variables as factors. The number of rows in
SVAR must be the same as the number of rows in the data
The argument signif represent the p-value level takes as reference
to stop the tree partitions.
The argument deep represent the p-value level takes as reference
to stop the tree partitions.
The argument method is a string contaning the criterion used to calculate the
the test; if method="lm" the classic least square approach is used to perform the test;
if method="lad" the lad (least absolute deviation) is used.
The argument size has defined as a decimal value (i.e. proportion
of elements inside a node).
Value
An object of class "xtree.reg". Basically a list with the
following results:
MOX
Data frame with the results of the segmentation tree
root
element of contaning in the root node
terminal
element of contaning in the terminal nodes
nodes
element of contaning in all nodes terminal and intermediate
candidates
List of data frames containing the candidate
splits of each node partition
Fg.r
Data frame containing the results of the F-global test
for each node partition
Fc.r
A list of Data frames containing the results of the F-coefficients test
for each node partition
model
Information about the internal paramenters
Author(s)
Giuseppe Lamberti
References
Lamberti, G. (2014) Modeling with Heterogeneity. PhD Dissertation.
Sanchez, G. (2009) PATHMOX Approach: Segmentation Trees in
Partial Least Squares Path Modeling. PhD Dissertation.