Learn R Programming

genpathmox (version 0.6)

plot.xtree.pls: Plot function for the Pathmox Segmentation Trees: PLS-PM

Description

The function plot.xtree.pls allows to drow PATHMOX tree for PLS-SEM

Usage

# S3 method for xtree.pls
plot(
  xtree,
  root.col = "grey",
  node.col = "orange",
  leaf.col = "green2",
  shadow.size = 0.003,
  node.shadow = "red",
  leaf.shadow = "darkgreen",
  cex = 0.7,
  seg.col = "blue3",
  lwd = 1,
  show.pval = TRUE,
  pval.col = "blue",
  main = NULL,
  cex.main = 1,
  ...
)

Arguments

xtree

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

root.col

Fill color of root node.

node.col

Fill color of child nodes.

leaf.col

Fill color of leaf.

shadow.size

Relative size of shadows.

node.shadow

Color of shadow of child nodes.

leaf.shadow

Color of shadow of leaf nodes.

cex

A numerical value indicating the magnification to be used for plotting text.

seg.col

The color to be used for the labels of the segmentation variables.

lwd

The line width, a positive number, defaulting to 1

show.pval

Logical value indicating whether the p-values should be plotted.

pval.col

The color to be used for the labels of the p-values.

main

A main title for the plot.

cex.main

The magnification to be used for the main title.

Further arguments passed on to plot.xtree.pls.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
 ## example of PLS-PM in bank customer satisfaction
 
data(csibank)

# select manifest variables
data.bank <-csibank[,6:32]

# define inner model matrix
Image 			  = rep(0,6)
Expectation	  = c(1,0,0,0,0,0)
Quality		    = c(0,1,0,0,0,0)
Value			    = c(0,1,1,0,0,0)
Satis			    = c(1,1,1,1,0,0)
Loyalty       = c(1,0,0,0,1,0)
inner.bank = rbind(Image,Expectation, Quality, Value, Satis,Loyalty)
colnames(inner.bank) = rownames(inner.bank)

# blocks of indicators (outer model)
outer.bank  = list(1:6,7:10,11:17,18:21,22:24,25:27)
modes.bank = rep("A", 6)


# re-ordering those segmentation variables with ordinal scale 
seg.bank= csibank[,1:5]

seg.bank$Age = factor(seg.bank$Age, ordered=TRUE)
seg.bank$Education = factor(seg.bank$Education, ordered=TRUE)


# Pathmox Analysis
bank.pathmox=pls.pathmox(data.bank, inner.bank, outer.bank, modes.bank,SVAR=seg.bank,signif=0.05,
                         deep=2,size=0.2,n.node=20)
plot(bank.pathmox)
 
 
# }

Run the code above in your browser using DataLab