Learn R Programming

genpathmox (version 0.5)

reg.treemodel: Regression results of terminal nodes from the Pathmox Segmentation Trees

Description

Calculates basic regression results for the terminal nodes of Pathmox Segmentation Trees: liner regression and LAD trees

Usage

reg.treemodel(
  xtree.reg,
  terminal = TRUE,
  intercept = FALSE,
  label = FALSE,
  label.nodes = NULL,
  ...
)

Arguments

xtree.reg

An object of class "xtree.reg" returned by reg.pathmox.

terminal

is string, if equal to TRUE, just the terminal nodes are considered for the output reults. when it is equal to FALSE,the regression results are generated for all nodes of the tree

intercept

if equal to TRUE also the intercept is considered in the estimation

label

is a boolean. tI is false for defect. If it is TRUE, label.nodes has to be fix.

label.nodes

is a vector with the name of the nodes. It is null for defect.

Further arguments passed on to reg.treemodel.

Value

An object of class "regtreemodel". Basically a list with the following results:

inner

Matrix of the inner relationship between latent variables of the PLS-PM model

method

A string containing the used method ("lm" or "lad"

coefficients

Matrix coefficients for each terminal node

Std.

Matrix of estandard deviation of coefficients for each terminal node

pval.coef

Matrix of p-value significance for each terminal node

r2

Matrix of r-squared coefficients for each terminal node

Details

The argument xtree.reg is an object of class "xtree.reg" returned by reg.pathmox.

References

Aluja, T. Lamberti, G. Sanchez, G. (2013). Modeling with heterogeneity. Meetings of Italian Statistical Society, Advances in Latent Variables - Methods, Models and Applications. Brescia.

Lamberti, G. (2014) Modeling with Heterogeneity. PhD Dissertation.

Sanchez, G. (2009) PATHMOX Approach: Segmentation Trees in Partial Least Squares Path Modeling. PhD Dissertation.

See Also

pls.pathmox

Examples

Run this code
# NOT RUN {
#example of LM in alumni satisfaction
 
data(fibtelereg)

#identify the segmentation variables  
segvar= fibtelereg[,2:11]

#select the variables
data.fib= fibtelereg[,12:18]          

segvar$Age 		= factor(segvar$Age, ordered=T)
segvar$Salary 	= factor(segvar$Salary, 
	levels=c("<18k","25k","35k","45k",">45k"), ordered=T)
segvar$Accgrade = factor(segvar$Accgrade, 
	levels=c("accnote<7","7-8accnote","accnote>8"), ordered=T)
segvar$Grade 	= factor(segvar$Grade, 
	levels=c("<6.5note","6.5-7note","7-7.5note",">7.5note"), ordered=T)

#regression PATHMOX
fib.reg.pathmox=reg.pathmox(Satisfact~.,data=data.fib,segvar,
			signif=0.05,deep=2,method="lm",size=0.15)

#terminal nodes comparison
fib.node.comp=reg.treemodel(fib.reg.pathmox) 

# }
# NOT RUN {
data(fibtelereg)

#identify the segmentation variables  
segvar= fibtelereg[1:50,3:4]

#select the variables
data.fib=fibtelereg[1:50,12:18]          

fib.reg.pathmox=reg.pathmox(Satisfact~.,data=data.fib,segvar,
	signif=0.05,deep=1,method="lm",size=0.15)

fib.node.comp=reg.treemodel(fib.reg.pathmox) 
	
# }

Run the code above in your browser using DataLab