Last data update: 2014.03.03

R: Comparative plot between nodes from the Pathmox Segmentation...
plot.treemodelR Documentation

Comparative plot between nodes from the Pathmox Segmentation Trees: PLS-PM

Description

Plot method for objects of class "treemodel". Barplots of path coefficients of terminal nodes with respect to those of the global (root) model

Usage

## S3 method for class 'treemodel'
plot(x, comp.by = "nodes", nodes.names = NULL,
  ordered = TRUE, decreasing = FALSE, color = NULL, show.box = TRUE,
  border = NA, cex.names = 0.75, cex.axis = 0.75, short.labs = TRUE,
  short.min = NULL, cex.main = 1, ...)

Arguments

x

An object of class "treemodel" returned by pls.treemodel.

comp.by

One of "nodes" or "latents". This argument indicates the type of barplots comparison.

nodes.names

Optional vector of names for the terminal nodes (must be a vector of length equal to the number of terminal nodes).

ordered

A logical value indicating whether the barplots are shown in increasing ordered.

decreasing

A logical value indicating if the sort order should be increasing or decreasing.

color

Optional vector of colors for the bars. When color=NULL rainbow colors are used.

show.box

A logical value indicating whether a box is drawn around each barplot.

border

The color to be used for the border of the bars. Use border=NA to omit borders.

cex.names

Expansion factor for axis names (bar labels).

cex.axis

Expansion factor for numeric axis labels.

short.labs

Logical value indicating if the labels of the barplots should be abbreviated (TRUE by default).

short.min

Integer number indicating the minimum length of the abbreviations for the labels. Only used when short.labs=TRUE.

cex.main

Allows to fix the size of the main. Equal to 1 to default

...

Further arguments are ignored.

Details

This function aims to visualize the comparison between path coefficients of the terminal nodes against the path coefficients of the global model in the root node.
When comp.by="nodes" a graphic window is displayed for each endogenous latent variable of the PLS model, and barplots of nodes are shown.
When comp.by="latents" a graphic window is displayed for each endogenous relationship of the PLS model, and barplots of independent latent variables are shown.

Author(s)

Giuseppe Lamberti

References

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

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

Examples

## Not run: 
 ## 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)

 fib.comp=pls.treemodel(pls.fib,fib.pathmox)
 plot(fib.comp)

 
## End(Not run)

Results