hanafi2007(semPLS)
hanafi2007()所属R语言包:semPLS
Hanafi (2007): Example Data
哈纳菲(2007年):实施例的数据
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Example data used by Hanafi (2007) for the computation of latent variables with the estimation mode B.
使用的示例数据计算潜变量的估计模式B.哈纳菲(2007)
用法----------Usage----------
data(hanafi2007)
格式----------Format----------
A data frame containing 10 observations of 11 variables.
一个数据框包含10个观察的11个变量。
(作者)----------Author(s)----------
Armin Monecke <a href="mailto:armin.monecke@stat.uni-muenchen.de">armin.monecke@stat.uni-muenchen.de</a>
参考文献----------References----------
with the estimation mode B, Computational Statistics 22, 275-292.
参见----------See Also----------
plsm, sempls
plsm,sempls
实例----------Examples----------
### get the Data from Hanafi's Example[##哈纳菲的示例数据]
data(hanafi2007)
hanafi2007
### 1st Example: the 11 MVs relate to formative 3 LVs[##第一个例子:11的MV形成3 LV的]
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:[的重心方案标准f的使用:]
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:[标准的阶乘计划g的使用:]
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[##第二个例子:11的MV涉及到5形成的LV]
# 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:[这时候才质心计划与标准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))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|