找回密码
 注册
查看: 359|回复: 0

R语言 simsem包 SimData-class()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 09:27:36 | 显示全部楼层 |阅读模式
SimData-class(simsem)
SimData-class()所属R语言包:simsem

                                        Class "SimData"
                                         类“SIMDATA”

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

This class will save information for data simulation and can create data by run function.
这个类将信息保存的数据模拟和可以创建数据运行功能。


类对象----------Objects from the Class----------

Objects can be created by simData. Also, it can be called by new("SimData", ...).
对象可以创建simData。此外,它也被称为new("SimData", ...)。


插槽----------Slots----------




modelType: Model type (CFA, Path, or SEM)
modelType:型号(CFA,路径,或SEM)




n: Sample size
n:试样尺寸




param: Model specification that used in data generation. It must be in SimSet class.
param:型号规格中所使用的数据生成。它必须在SimSet类。




misspec: Model misspecification that used in data generation. It must be in SimMisspec class.
misspec中所使用的数据生成的模型误。它必须在SimMisspec类。




equalCon: Equality constraints in data generation. It must be in SimEqualCon class.
equalCon:平等在数据生成的约束。它必须在SimEqualCon类。




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).
maxDraw:随机绘制的参数和设定错误模型,在模型中,直到所有参数的最大数量有资格(没有负的误差方差,标准化系数大于1)。




sequential: If TRUE, use a sequential method to create data such that the data from factor are generated first and apply to a set of equations to obtain the data of indicators. If FALSE, create data directly from model-implied mean and covariance of indicators.
sequential:如果TRUE,使用顺序的方法来创建数据,使得数据从因子首先产生的,并适用于一组方程,得到的数据的指标。如果FALSE,直接从创建数据模型隐含的均值和方差指标。




facDist: A SimDataDist for a distribution of factors. Use when sequential is TRUE.
facDist:ASimDataDist的分布的因素。使用时sequential是TRUE。




errorDist: A SimDataDist for a distribution of measurement errors. Use when sequential is TRUE.
errorDist:ASimDataDist的测量误差的分布。使用时sequential是TRUE。




indDist: A SimDataDist for a distribution of indicators. Use when sequential is FALSE.
indDist:ASimDataDist指标的分配。使用时sequential是FALSE。




indLab: A vector of indicator names. If not specified, the variables names are y1, y2, ... .
indLab:的矢量指标名称。如果未指定,变量名是Y1,Y2,... 。




modelBoot: If TRUE, use a model-based bootstrap for data generation. See details for further information. This argument need a dataset in the realData argument.
modelBoot:如果TRUE,使用基于模型的数据生成的引导。详情请参阅有关详细信息,。这个论点需要realData参数的数据集。




realData: The real dataset that the model based bootstrap will follow the distribution.
realData:真正的数据集,基于模型的引导将按照分配。


方法----------Methods----------




run To create data from this class. N is the additional argument that users may change the sample size when creating data.
运行要创建这个类中的数据。 N是额外的参数,创建数据时,用户可能会改变样品的尺寸。




summary Summarize all attributes in the simData.
总结总结的所有属性在SIMDATA。


(作者)----------Author(s)----------



Sunthud Pornprasertmanit (University of Kansas; <a href="mailto:psunthud@ku.edu">psunthud@ku.edu</a>)




参见----------See Also----------

linkS4class{SimSet} for how to specify data generation model.
linkS4class{SimSet}如何指定数据生成模式。

linkS4class{SimMisspec} for how to specify misspecification in this data generation model.
linkS4class{SimMisspec}如何指定设定错误,在这样的数据生成模型。

linkS4class{SimEqualCon} for how to set equality constraints for data generation.
linkS4class{SimEqualCon}如何设置数据生成等式约束。

link{simResult} for the use of this class to run Monte Carlo simulation.
link{simResult}使用这个类来运行Monte Carlo模拟。

linkS4class{SimModelOut} for the output type after the run function with dataOnly=TRUE.
linkS4class{SimModelOut}后run与dataOnly=TRUE函数的输出类型。


实例----------Examples----------


showClass("SimData")
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(LY = LX, RPS = RPH, RTE = RTD)
SimData <- simData(CFA.Model, 200)
summary(SimData)
run(SimData)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-25 07:32 , Processed in 0.023417 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表