if (FALSE) {
 ## typical example of PLS-PM in customer satisfaction analysis
 ## model with six LVs and reflective indicators
 ## example of rebus analysis with simulated data
 # load data
 data(simdata)
 # Calculate plspm
 sim_path = matrix(c(0,0,0,0,0,0,1,1,0), 3, 3, byrow=TRUE)
 dimnames(sim_path) = list(c("Price", "Quality", "Satisfaction"),
                            c("Price", "Quality", "Satisfaction"))
 sim_blocks = list(c(1,2,3,4,5), c(6,7,8,9,10), c(11,12,13))
 sim_mod = c("A", "A", "A")  # reflective indicators
 sim_global = plspm(simdata, sim_path,
                    sim_blocks, modes=sim_mod)
 sim_global
 # Cluster analysis on residuals of global model
 sim_clus = res.clus(sim_global)
 # Iterative steps of REBUS algorithm on 2 classes
 rebus_sim = it.reb(sim_global, sim_clus, nk=2,
                    stop.crit=0.005, iter.max=100)
 # apply rebus.test
 sim_permu = rebus.test(sim_global, rebus_sim)
 # inspect sim.rebus
 sim_permu
 sim_permu$test_1_2
 # or equivalently
 sim_permu[[1]]
 }
Run the code above in your browser using DataLab