runFitParam(simsem)
runFitParam()所属R语言包:simsem
Build a parameter result object that the data-generation parameters are from the result of analyzing real data
构建一个参数结果的对象,该对象的数据生成的参数是从真实的数据分析的结果
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function will analyze real data and use the result of the analysis to find the range of parameters used in data simulation.
这个函数将真实的数据进行分析,并使用分析结果,找到数据的仿真中使用的参数的范围内。
用法----------Usage----------
runFitParam(model, nRep = 1000, misspec = new("NullSimMisspec"),
maxDraw = 100, seed = 123321, usedStd = TRUE, ...)
参数----------Arguments----------
参数:model
Model object used in analyzing the real and simulated data.
在分析真实和模拟数据模型对象。
参数:nRep
Number of replications.
复制数量。
参数:misspec
Model misspecification matrices that are created by simMisspecCFA, simMisspecPath, or simMisspecSEM.
模型误设的矩阵所建立的simMisspecCFA,simMisspecPath或simMisspecSEM。
参数:maxDraw
The maximum number of random drawn parameters and misspecification model until all parameters in the model are eligible (no negative error variance, standardized coefficients over 1).
随机绘制的参数和设定错误模型,在模型中,直到所有参数的最大数量有资格(没有负的误差方差,标准化系数大于1)。
参数:seed
Seed number
种子数
参数:usedStd
The standardized parameters are used for data generation if usedStd=TRUE. If usedStd=FALSE, unstandardized parameters are used.
标准化参数数据生成用于如果usedStd=TRUE。如果usedStd=FALSE,使用非标准的参数。
参数:...
The only additional argument is data, which is the real data that will be used in the analysis. The data argument is used when the model is linkS4class{SimModel}
唯一的额外的参数是data,这是真实的数据将用于分析。参数的数据时,使用是model linkS4class{SimModel}
Details
详细信息----------Details----------
This function will use the obtained parameter estimates as the real population parameters in a simulation study, put a trivial model misspecification in the real parameters, and report the real and misspecified parameters in the SimResultParam object.
此功能将使用真正的人口参数的模拟研究得到的参数估计值,把一个简单的模型误,真正的参数,并报告的真实和误设参数在SimResultParam对象。
值----------Value----------
SimResultParam that saves the parameters and misspecification used in each replication.
SimResultParam保存每个复制中使用的参数和设定错误。
(作者)----------Author(s)----------
Sunthud Pornprasertmanit (University of Kansas; <a href="mailto:psunthud@ku.edu">psunthud@ku.edu</a>)
参见----------See Also----------
SimModel for analysis model specification
SimModel分析模型规范
SimResult for the type of resulting object
SimResult生成的对象的类型
runFit for data simulation based on real data
runFit的数据模拟真实数据的基础上
实例----------Examples----------
library(lavaan)
loading <- matrix(0, 9, 3)
loading[1:3, 1] <- NA
loading[4:6, 2] <- NA
loading[7:9, 3] <- NA
model <- simParamCFA(LY=loading)
SimModel <- simModel(model, indLab=paste("x", 1:9, sep=""))
u2 <- simUnif(-0.2, 0.2)
loading.trivial <- matrix(NA, 9, 3)
loading.trivial[is.na(loading)] <- 0
LY.trivial <- simMatrix(loading.trivial, "u2")
mis <- simMisspecCFA(LY = LY.trivial)
Output <- runFitParam(SimModel, data=HolzingerSwineford1939, nRep=5, misspec=mis)
summary(Output)
out <- run(SimModel, HolzingerSwineford1939)
Output2 <- runFitParam(out, nRep=5, misspec=mis)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|