Compute Orthogonal Basis for a Tree Object

DESCRIPTION:

Computes an orthogonal basis for a tree object.

USAGE:

basis.tree(tree, ortho = F) 

REQUIRED ARGUMENTS:

tree
fitted model object of class tree. This is assumed to be the result of some function that produces an object with the same named components as that returned by the tree function.

OPTIONAL ARGUMENTS:

ortho
Logical. If TRUE, basis vectors will be normalized to have unit length. If FALSE (default), basis vectors are orthogonal but not orthonormal.

VALUE:

One basis vector for each split, and one for the root node.

SEE ALSO:

.

EXAMPLES:

z.auto <- tree(Mileage ~ Weight, car.test.frame) 
x <- basis.tree(z.auto) 
z <- lm(y~x)    # represent tree as a fitted linear model object