Description Usage Format References See Also Examples
Example data used by Hanafi (2007) for the computation of latent variables with the estimation mode B.
1 |
A data frame containing 10 observations of 11 variables.
Hanafi, M. (2007), PLS Path modelling: computation of latent variables with the estimation mode B, Computational Statistics 22, 275-292.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | ### get the Data from Hanafi's Example
data(hanafi2007)
hanafi2007
### 1st Example: the 11 MVs relate to formative 3 LVs
Ex1mfrom <- names(hanafi2007)
Ex1mto <- paste("z", c(rep(1:3, each=3), 3, 3), sep="")
Ex1mm <- cbind(source=Ex1mfrom, target=Ex1mto)
Ex1sfrom <- paste("z", 1:2, sep="")
Ex1sto <- paste("z", 2:3, sep="")
Ex1sm <- cbind(source=Ex1sfrom, target=Ex1sto)
library(semPLS)
EX1 <- plsm(data=hanafi2007, strucmod=Ex1sm, measuremod=Ex1mm)
ex1A <- sempls(model=EX1, data=hanafi2007, E="A", maxit=100, tol=1e-7)
# for the centroid scheme criterion f is used:
matplot(ex1A$Hanafi[,"iteration"], 2*ex1A$Hanafi[,"f"],
type="b", lty=1, pch=3,
xlim=c(0, 29), ylim=c(0, 3.5),
main="Hanafi 2007: Example 1\ncentroid scheme",
ylab="Criterion f", xlab="Iteration")
legend(x=17, y=0.5, legend="Lohm{\"o}ller's procedure", lty=1, pch=3)
# check the evolution of outer weights
plot(ex1A, xlim=c(0, 30))
# Now the same using factorial scheme:
ex1B <- sempls(model=EX1, data=hanafi2007, E="B", maxit=100, tol=1e-7)
# for the factorial scheme criterion g is used:
matplot(ex1B$Hanafi[,"iteration"], 2*ex1B$Hanafi[,"g"],
type="b", lty=1, pch=3,
xlim=c(0, 29), ylim=c(0, 3),
main="Hanafi 2007: Example 1\nfactorial scheme",
ylab="Criterion g", xlab="Iteration")
legend(x=17, y=0.5, legend="Lohm{\"o}ller's procedure", lty=1, pch=3)
### 2nd Example: the 11 MVs relate to 5 formative LVs
# renaming of the variables
names(hanafi2007) <- paste("x", rep(1:5, c(2, 2, 2, 2, 3)), c(rep(1:2, 5), 3), sep="")
Ex2mfrom <- names(hanafi2007)
Ex2mto <- paste("z", c(rep(1:5, each=2), 5), sep="")
Ex2mm <- cbind(source=Ex2mfrom, target=Ex2mto)
Ex2sfrom <- paste("z", rep(1:4, 4:1), sep="")
Ex2sto <- paste("z", c(2:5, 3:5, 4:5, 5), sep="")
Ex2sm <- cbind(source=Ex2sfrom, target=Ex2sto)
EX2 <- plsm(data=hanafi2007, strucmod=Ex2sm, measuremod=Ex2mm)
# this time only for the centroid scheme with criterion f:
ex2A <- sempls(model=EX2, data=hanafi2007, E="A", maxit=100, tol=1e-7)
matplot(ex2A$Hanafi[,"iteration"], 2*ex2A$Hanafi[,"f"],
type="b", lty=1, pch=3,
xlim=c(0, 10), ylim=c(0, 12),
main="Hanafi 2007: Example 2\ncentroid scheme",
ylab="Criterion f", xlab="Iteration")
legend(x=6, y=1.5, legend="Lohm{\"o}ller's procedure", lty=1, pch=3)
# check the evolution of outer weights
plot(ex2A, xlim=c(0, 10))
|
Loading required package: lattice
x11 x12 x13 x21 x22 x23 x31 x32 x33 x34 x35
1 165 -43 142 -79 -73 140 159 -111 -47 -91 100
2 -11 70 10 -23 -23 -106 -108 103 -63 -42 -37
3 -29 145 105 17 76 -71 28 -18 15 -91 47
4 94 -197 -53 -55 13 -20 12 139 170 254 41
5 -13 -57 16 -18 -190 -41 -109 -22 -51 -81 56
6 -50 54 -214 -60 -4 19 -94 23 -183 55 10
7 -219 73 -111 255 -70 24 10 -172 112 -49 92
8 -30 -76 -10 -96 158 202 135 -2 -39 64 59
9 -7 -69 43 -37 143 -8 -120 141 115 0 -183
10 103 101 70 97 -30 -139 86 -79 -27 -18 -188
All 10 observations are valid.
Converged after 71 iterations.
Tolerance: 1e-07
Scheme: centroid
All 10 observations are valid.
Converged after 71 iterations.
Tolerance: 1e-07
Scheme: centroid
All 10 observations are valid.
Converged after 38 iterations.
Tolerance: 1e-07
Scheme: centroid
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.