# Options # Surpress scientific notations, digits and lines options(scipen=999, digits=10, max.print=99999999) # PLS pat modeling # Increase Number of lines in output options(max.print=99999999) options(digits=9) library(plspm) # Inner Model PEU = c(0,0,0,0) PU = c(0,0,0,0) ATT = c(1,1,0,0) INT = c(0,0,1,0) inner = rbind(PEU, PU, ATT, INT) # Plot Inner Model innerplot(inner) # Blocks Outer Model outer = list(1:3, 4:6, 7:9, 10:12) # Modes (reflective indicators) mode = rep("A", 4) PLS.1 = plspm(Data.01.PPT, inner, outer, modes = mode, scaled = TRUE, boot.val=TRUE, br=1000) summary(PLS.1) # Plot Inner Model innerplot(PLS.1) # Plot Outer Loadings outerplot(PLS.1, what = "loadings") # Plot Outer Weights outerplot(PLS.1, what = "weights") # Hierarchical Model # Inner Model G = c(0,0,0,0,0) PEU = c(1,0,0,0,0) PU = c(1,0,0,0,0) ATT = c(1,0,0,0,0) INT = c(1,0,0,0,0) inner.HM<-rbind(G,PEU,PU,ATT,INT) # Plot Inner Model innerplot(inner.HM) # Blocks Outer Model outer.HM = list(1:12, 1:3, 4:6, 7:9, 10:12) # Modes (reflective indicators) mode.HM = rep("A", 5) PLS.2 = plspm(Data.01.PPT, inner.HM, outer.HM, modes = mode.HM, scheme="path", scaled = TRUE) summary(PLS.2) # Plots innerplot(PLS.2) outerplot(PLS.2, what="loadings") # Consistent PLS # matrixpls library(matrixpls) TAM.Model<-' PEU =~ q1 + q2 + q3 PU =~ q4 + q5 + q6 ATT =~ q7 + q8 + q9 BI =~ q10 + q11 + q12 ATT ~ PEU + PU BI ~ ATT ' R.TAM<-cor(Data.01.PPT[,1:12]) # Consistent PLS (PLSc) TAM.output.01<-matrixpls(R.TAM, TAM.Model, disattenuate = TRUE, parametersReflective = estimator.plscLoadings) summary(TAM.output.01) # PLS TAM.output.02<-matrixpls(R.TAM, TAM.Model) summary(TAM.output.02) cbind(TAM.output.01, TAM.output.02) # Consistent PLS (PLSc) bootstrapping TAM.boot.01<-matrixpls.boot(Data.01.PPT[,1:12], model = TAM.Model, disattenuate = TRUE, parametersReflective = estimator.plscLoadings, R = 1000) print(TAM.boot.01) summary(TAM.boot.01) # PLS bootsrapping TAM.boot.02<-matrixpls.boot(Data.01.PPT[,1:12], model = TAM.Model, R = 1000) print(TAM.boot.02) summary(TAM.boot.02)