if (FALSE) {
## example with customer satisfaction analysis
## group comparison based on the segmentation variable "gender"
# load data satisfaction
data(satisfaction)
# define inner model matrix
IMAG = c(0,0,0,0,0,0)
EXPE = c(1,0,0,0,0,0)
QUAL = c(0,1,0,0,0,0)
VAL = c(0,1,1,0,0,0)
SAT = c(1,1,1,1,0,0)
LOY = c(1,0,0,0,1,0)
sat_path = rbind(IMAG, EXPE, QUAL, VAL, SAT, LOY)
# define outer model list
sat_blocks = list(1:5, 6:10, 11:15, 16:19, 20:23, 24:27)
# define vector of reflective modes
sat_mod = rep("A", 6)
# apply plspm
satpls = plspm(satisfaction, sat_path, sat_blocks,
modes = sat_mod, scaled = FALSE)
# permutation test with 100 permutations
group_perm = plspm.groups(satpls, satisfaction$gender,
method="permutation", reps=100)
group_perm
}
Run the code above in your browser using DataLab