Learn R Programming

genpathmox (version 0.2)

pls.pathmox: PATHMOX-PLS: Extended Segmentation Trees in Partial Least Squares Path Modeling

Description

The function pathmox.pls calculates a binary segmentation tree in the context PLS-PM following the PATHMOX algorithm. This function extends the pathmox algorithm introduced by Sanchez in 2009 including the two new test: the F-block test (to detect the responsible latent endogenous equations of the difference), the F-coefficient test (to detect the path coefficients responsible of the difference).The F-tests used in the split process are implemented following the classic lest square estimation. An implementation of the tests following the LAD regression also are proposed to overcome the parametric hypothesis of the F-test.

Usage

pls.pathmox(xpls, SVAR, signif, deep, method = "lm", size, X = NULL,
  tree = TRUE, n.node = 30, ...)

Arguments

xpls
An object of class "plspm" returned by plspm.
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".
size
A numeric value indicating the minimum size of elements inside a node.
X
Optional dataset (matrix or data frame) used when argument dataset=NULL inside pls.
tree
A logical value indicating if the tree should be displayed (TRUE by default).
n.node
It is the minimum number of individuals to consider a candidate partition (30 by default).
...
Further arguments passed on to pls.pathmox.

Value

  • An object of class "xtree.pls". Basically a list with the following results:
  • MOXData frame with the results of the segmentation tree
  • rootList of elements contanined in the root node
  • terminalList of elements contanined in terminal nodes
  • nodesList of elements contanined in all nodes: terminal and intermediate
  • candidatesList of data frames containing the candidate splits of each node partition
  • Fg.rData frame containing the results of the F-global test for each node partition
  • Fb.rList of data frames containing the results of the F-block test for each node partition
  • Fc.rA list of data frames containing the results of the F-coefficients test for each node partition
  • modelInformations about the internal paramenters

Details

The argument xpls is object of class "plspm" returned by plspm.

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 used in pls.

The argument signif represent the p-value level takes as reference to stop the tree partitions.

The argument deep represent the depth level of the tree takes as reference to stop the tree partitions.

The argument method is a string contaning the criterion used to calculate the tests; if method="lm" the classic least square approach is used to perform the tests; if method="lad" the LAD (least absolute deviation regression) is used.

The argument size is defined as a decimal value (i.e. proportion of elements inside a node).

The argument n.node is the minimum number of individuals to consider a candidate partition. If the candidate split produces a partition where the number of individuals is less then n.node, the partition is not considered.

When the object pls does not contain a data matrix (i.e. pls$data=NULL), the user must provide the data matrix or data frame in X.

References

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

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

Examples

Run this code
## example of PLS-PM in alumni satisfaction

 data(fibtele)

 # select manifest variables
 data.fib <-fibtele[,12:35]

 # define inner model matrix
 Image 			= rep(0,5)
	 Qual.spec	= rep(0,5)
	 Qual.gen		= rep(0,5)
	 Value			= c(1,1,1,0,0)
	 Satis			= c(1,1,1,1,0)
 inner.fib <- rbind(Image,Qual.spec, Qual.gen, Value, Satis)
 colnames(inner.fib) <- rownames(inner.fib)

 # blocks of indicators (outer model)
 outer.fib <- list(1:8,9:11,12:16,17:20,21:24)
 modes.fib  = rep("A", 5)

 # apply plspm
 pls.fib <- plspm(data.fib, inner.fib, outer.fib, modes.fib)


 # re-ordering those segmentation variables with ordinal scale
  seg.fib= fibtele[,2:11]

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

 # Pathmox Analysis
 fib.pathmox=pls.pathmox(pls.fib,seg.fib,signif=0.05,
					deep=2,size=0.2,n.node=20)

Run the code above in your browser using DataLab