simResult(simsem)
simResult()所属R语言包:simsem
Create simResult.
创建simResult。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function will create simResult by different ways. One way is to create data and analyze data multiple times by specifying SimData and SimModel and save it in the SimResult.
这个函数将创建simResult的通过不同的方式。一种方法是创建数据和分析数据进行多次SimData和SimModel和它保存在SimResult。
用法----------Usage----------
simResult(nRep = NULL, objData = NULL, objModel = NULL,
objMissing = new("NullSimMissing"), seed = 123321, silent = FALSE,
multicore = FALSE, cluster = FALSE, numProc = NULL, n = NULL,
pmMCAR = NULL, pmMAR = NULL, objSet = NULL,
objFunction = new("NullSimFunction"))
参数----------Arguments----------
参数:nRep
Number of replications. Users can specify as NULL and specify n, pmMCAR, and pmMAR as a vector instead. By this, the number of replications will be calculated from the length of n, pmMCAR, and pmMAR.
复制数量。用户可以指定为NULL“,并指定n,pmMCAR和pmMAR:”作为一个向量,而不是。由此,复制数,将计算出从n,pmMCAR,和pmMAR的长度。
参数:objData
Data object used in data simulation.
数据对象的数据模拟。
参数:objModel
Model object used in analyzing the simulated data.
用于分析模拟数据模型对象。
参数:objMissing
Model object used in providing the information about missing values.
使用的模型对象提供的信息遗漏值的。
参数:seed
Seed number. This package will use this seed number to generate the L'Ecuyer (1999) method to make nonoverlapping seed values across replications from the nextRNGStream function.
种子数。这个包将使用这个种子数,产生LEcuyer(1999)的方法,使nextRNGStream功能之间不重叠的种子值重复。
参数:silent
TRUE if users do not wish to print number of replications during running the function.
TRUE,如果用户不希望,打印复制数量在运行过程中的功能。
参数:multicore
Use multiple processors within a computer. Specify as TRUE to use it.
使用中的计算机内的多个处理器。指定为TRUE使用。
参数:cluster
Not applicable now. Use for specify nodes in hpc in order to be parallelizable.
现在不适用。使用指定节点HPC为了并行化的。
参数:numProc
Number of processors for using multiple processors. If it is NULL, the package will find the maximum number of processors.
用于使用多个处理器的处理器数目。如果是NULL,包处理器的最大数量。
参数:n
Sample size. This argument is not necessary except the user wish to vary sample size across replications. The sample size here can be random distribution object (VirtualDist), or a vector of sample size in integers. For the random distribution object, if the resulting value has decimal, the value will be rounded.
样本大小。这种说法是没有必要的,除非用户希望改变整个复制的样本量。这里的样本大小可以是随机分布对象(VirtualDist),或一个矢量的样本大小整数。对于随机分布对象,如果结果值十进制,值将被四舍五入。
参数:pmMCAR
The percent completely missing at random. This argument is not necessary except the user wish to vary percent missing completely at random across replications. The pmMCAR here can be random distribution object (VirtualDist), or a vector of percent missing, which the values can be in between 0 and 1 only. The specification of objMissing is not needed (but is needed if users wish to specify complex missing value data generation or wish to use multiple imputation).
%完全随机缺失。这种说法是没有必要的,除非用户希望改变%,完全丢失随机整个复制。 pmMCAR在这里可以是随机分布对象(VirtualDist),或%缺失的向量,该值可以是仅0和1之间。不需要的规范objMissing(但如果用户希望指定复杂的缺失值数据生成或使用多重插补)是必要的。
参数:pmMAR
The percent missing at random. This argument is not necessary except the user wish to vary percent missing at random across replications. The pmMAR here can be random distribution object (VirtualDist), or a vector of percent missing, which the values can be in between 0 and 1 only. The specification of objMissing is not needed (but is needed if users wish to specify complex missing value data generation or wish to use multiple imputation).
%随机缺失。这种说法是没有必要的,除非用户希望改变%的失踪随机整个复制。 pmMAR在这里可以是随机分布对象(VirtualDist),或%缺失的向量,该值可以是仅0和1之间。不需要的规范objMissing(但如果用户希望指定复杂的缺失值数据生成或使用多重插补)是必要的。
参数:objSet
The SimSet object for data generation and analysis model. Users can specify this argument directly and not specify objData and objModel
SimSet对象的数据生成和分析模型。用户可以直接指定此参数,不指定objData和objModel
参数:objFunction
The function object that will be used for data transformation inside the simulation study. See the example from simFunction
的功能的对象,该对象将被用于内部的模拟研究的数据变换。例如,从simFunction
值----------Value----------
SimResult that saves analysis result from simulate data.
SimResult,节省了从模拟数据的分析结果。
(作者)----------Author(s)----------
Sunthud Pornprasertmanit (University of Kansas; <a href="mailto:psunthud@ku.edu">psunthud@ku.edu</a>);
Alex Schoemann (University of Kansas; <a href="mailto:schoemann@ku.edu">schoemann@ku.edu</a>);
Patrick Miller (University of Kansas; <a href="mailto:patr1ckm@ku.edu">patr1ckm@ku.edu</a>);
The L'Ecuyer seed number generation is adapted from the code provided by Paul Johnson in <a href="http://winstat.quant.ku.edu/svn/hpcexample/trunk/Ex66-ParallelSeedPrototype/">http://winstat.quant.ku.edu/svn/hpcexample/trunk/Ex66-ParallelSeedPrototype/</a>.
参考文献----------References----------
参见----------See Also----------
SimData for data model specification
SimData数据模型规范
SimModel for analysis model specification
SimModel分析模型规范
SimResult for the type of resulting object
SimResult生成的对象的类型
实例----------Examples----------
## Not run: [#不运行:]
loading <- matrix(0, 6, 1)
loading[1:6, 1] <- NA
LX <- simMatrix(loading, 0.7)
RPH <- symMatrix(diag(1))
RTD <- symMatrix(diag(6))
CFA.Model <- simSetCFA(LY = LX, RPS = RPH, RTE = RTD)
SimData <- simData(CFA.Model, 500)
SimModel <- simModel(CFA.Model)
# We make the examples running only 5 replications to save time.[我们的例子只有5次重复,以节省时间。]
# In reality, more replications are needed.[在现实中,需要更多的复制。]
Output <- simResult(5, SimData, SimModel)
summary(Output)
# Specify Sample Size by n[指定样本大小由n]
loading <- matrix(0, 6, 1)
loading[1:6, 1] <- NA
LX <- simMatrix(loading, 0.7)
RPH <- symMatrix(diag(1))
RTD <- symMatrix(diag(6))
CFA.Model <- simSetCFA(LY = LX, RPS = RPH, RTE = RTD)
SimData <- simData(CFA.Model, 500)
SimModel <- simModel(CFA.Model)
# We make the examples running only 5 replications to save time.[我们的例子只有5次重复,以节省时间。]
# In reality, more replications are needed.[在现实中,需要更多的复制。]
Output <- simResult(NULL, SimData, SimModel, n=seq(50, 100, 10))
summary(Output)
# Specify both sample size and percent missing completely at random[中指定两个样本的大小和百分比完全随机缺失]
Output <- simResult(NULL, SimData, SimModel, n=seq(50, 100, 10), pmMCAR=c(0, 0.1, 0.2))
summary(Output)
# Use distribution object on sample size and percent completely at random[使用分布对象完全随机样本的大小和百分比]
n <- simUnif(100, 500)
pmMCAR <- simUnif(0, 0.1)
Output <- simResult(5, SimData, SimModel, n=n, pmMCAR=pmMCAR)
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|