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

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

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

                                         Find power of model parameters
                                         模型参数的力量

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

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

A function to find the power of  parameters in a model when none, one, or more of the simulations parameters vary randomly across replications.
的功能时,一个或更多的模拟参数的随机整个复制到模型中的参数的力量。


用法----------Usage----------


getPower(simResult, alpha = 0.05, contParam = NULL, powerParam = NULL,
        nVal = NULL, pmMCARval = NULL, pmMARval = NULL, paramVal = NULL)



参数----------Arguments----------

参数:simResult
SimResult that may include at least one randomly varying parameter (e.g. sample size, percent missing, model parameters)  
SimResult,可能会包括至少一个随机变化的参数(例如,样本大小,百分比丢失,模型参数)


参数:alpha
Alpha level to use for power analysis.  
阿尔法层次使用功耗分析。


参数:contParam
Vector of parameters names that vary over replications.  
向量随复制的参数名称。


参数:powerParam
Vector of parameters names that the user wishes to find power for. This can be a vector of names (e.g., "LY1_1", "LY2_2"), or the name of a matrix (e.g. "PS"), if the name of a matrix is used power for all parameters in that matrix will be returned. If parameters are not specified, power for all parameters in the model will be returned.  
向量的参数的名称,用户希望找到电源。这可以是一个矢量的名称(例如,“LY1_1”中,“LY2_2”),或者名称的矩阵(例如,“PS”),如果该名称的一个矩阵,矩阵中的所有参数是使用功率将被退回。如果没有指定参数,功率模型中的所有参数将被退回。


参数:nVal
The sample size values that users wish to find power from.  
样本大小值,用户希望找到电源。


参数:pmMCARval
The percent completely missing at random values that users wish to find power from.  
%完全缺少的随机值,用户希望找到电源。


参数:pmMARval
The percent missing at random values that users wish to find power from.  
缺少的随机值,用户希望找到电源的百分比。


参数:paramVal
A list of varying parameter values that users wish to find power from.  
不同的参数值,用户希望找到电源的列表。


Details

详细信息----------Details----------

A common use of simulations is to conduct power analyses, especially when using SEM (Muthen & Muthen, 2002). Here, researchers could select values for each parameter and a sample size and run a simulation to determine power in those conditions (the proportion of generated datasets in which a particular parameter of interest is significantly different from zero). To evaluate power at multiple sample sizes, one simulation for each sample size must be run. This function not only calculate power for each sample size but also calculate power for multiple sample sizes varying continuously. By continuously varying sample size across replications, only a single simulation is needed. In this simulation, the sample size for each replication varies randomly across plausible sample sizes (e.g., sample sizes between 200 and 500). For each replication, the sample size and significance of each parameter (0 = not significant, 1 = significant) are recorded. When the simulation is complete, parameter significance is regressed on sample size using logistic regression. For a given sample size, the predicted probability from the logistic regression equation is the power to detect an effect at that sample size. This approach can be extended to other randomly varying simulation parameters such as the percentage of missing data, and model parameters.
模拟一个常见的用途是进行动力分析,尤其是当使用SEM的(Muthen Muthen,2002年)。在这里,研究人员可以选择每个参数的值和样本大小,并运行一个模拟,以确定在这些条件下的功率(生成的数据集,其中一个特定的感兴趣的参数的比例显着不同于零)。评估功率在多个样品尺寸,必须运行一个仿真用于每个样品大小。这个功能不仅计算每个样品的功率大小,但也算功率为多个样本量连续变化。通过不断改变跨重复样本大小,只有一个单一的模拟是必要的。在这个模拟中,每个复制的样本大小随机变化在合理的样本量(例如,样本大小介于200和500之间)。对于每个复制,样本的大小和每个参数的意义(0 =不显著,1 =显著)的记录。当仿真完成后,参数的意义是回归的样本量,采用logistic回归分析。对于一个给定的样本量,从Logistic回归方程的预测概率是功率检测,样本大小的影响。这种方法可以被扩展到其他随机变化的仿真参数,如缺失数据的百分比,和模型参数。


值----------Value----------

Data frame containing columns representing values of the randomly varying simulation parameters, and power for model parameters of interest.
数据框包含的列代表的随机变化的模拟参数的值,模型参数和功率的兴趣。


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



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




参考文献----------References----------



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

SimResult to see how to create a simResult object with randomly varying parameters.
SimResult看到如何创建一个simResult的对象与随机变化的参数。


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


## Not run: [#不运行:]
# 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 will use only 5 replications to save time.[我们将只使用5次重复,以节省时间。]
# In reality, more replications are needed.[在现实中,需要更多的复制。]

# Specify both sample size and percent missing completely at random[中指定两个样本的大小和百分比完全随机缺失]
Output <- simResult(NULL, SimData, SimModel, n=seq(100, 200, 20), pmMCAR=c(0, 0.1, 0.2))
summary(Output)

getPower(Output)

getPower(Output, nVal=c(100, 200), pmMCARval=c(0, 0.1, 0.2))

## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-24 23:01 , Processed in 0.037431 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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