simModel(simsem)
simModel()所属R语言包:simsem
Create a model object
创建一个模型对象
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function will take model specification from SimSet that contains free parameters, starting values, and fixed values. It will transform the code to a specified SEM package and ready to analyze data.
这个函数将型号规格SimSet包含参数的初始值和固定值。这将改变代码到指定的SEM包,并准备对数据进行分析。
用法----------Usage----------
simModel(object, ...)
参数----------Arguments----------
参数:object
SimSet that provides model specification
SimSet型号规格
参数:...
Other values that will be explained specifically for each class
其他值,将具体说明用于每个类别
值----------Value----------
SimModel that will be used for data analysis
SimModel,将用于数据分析
详细...----------Details in ...----------
start: SimRSet.c that saves all starting values in the model.
开始:SimRSet.c来保存所有的模型中的初始值。
equalCon: SimEqualCon.c that save constraints specified by users. The default is no constraint.
equalCon:SimEqualCon.c,除由用户指定的约束。在默认情况下是没有约束。
package: Desired analysis package
包所需的分析包
estimator: The default is ML estimator. Other alternatives are GLS, WLS, MLM, MLF, and MLR. Check the sem function help file in the lavaan package for further details
估计:默认情况下是ML估计。其他的替代品GLS,WLS,MLM,MLF和MLR。检查扫描电镜功能lavaan包帮助文件中有关进一步详情
auxiliary: The names or the index of the auxiliary variables in the data
辅助:在数据中的辅助变量的名称或索引
indLab: The names of the variable in the model. The exogenous indicators should be listed first (from x1) and then endogenous indicators should be listed next (from y1).
indLab:在模型中的变量的名称。外源性指标应列在第一位(从x1)和内源性指标应列出下(Y1)。
factorLab: The names of the factors in the model. The exogenous factors should be listed first (from k1) and then endogenous factors should be listed next (from y1).
factorLab的因素在模型中的名称。应列在第一位的外在因素(K1)和内源性因素应列出下(Y1)。
(作者)----------Author(s)----------
Sunthud Pornprasertmanit (University of Kansas; <a href="mailto:psunthud@ku.edu">psunthud@ku.edu</a>)
参见----------See Also----------
SimModel for the simResult
SimModel的simResult
SimSet for the target object containing model specification
SimSet为目标对象,其中包含型号规格
实例----------Examples----------
loading <- matrix(0, 6, 2)
loading[1:3, 1] <- NA
loading[4:6, 2] <- NA
loadingValues <- matrix(0, 6, 2)
loadingValues[1:3, 1] <- 0.7
loadingValues[4:6, 2] <- 0.7
LX <- simMatrix(loading, loadingValues)
latent.cor <- matrix(NA, 2, 2)
diag(latent.cor) <- 1
RPH <- symMatrix(latent.cor, 0.5)
error.cor <- matrix(0, 6, 6)
diag(error.cor) <- 1
RTD <- symMatrix(error.cor)
CFA.Model <- simSetCFA(LX = LX, RPH = RPH, RTD = RTD)
SimModel <- simModel(CFA.Model)
library(lavaan)
loading <- matrix(0, 9, 3)
loading[1:3, 1] <- NA
loading[4:6, 2] <- NA
loading[7:9, 3] <- NA
HS.Model <- simParamCFA(LX = loading)
SimModel <- simModel(HS.Model, indLab=paste("x", 1:9, sep=""))
out <- run(SimModel, HolzingerSwineford1939)
summary(out)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|