plotPowerFitNested(simsem)
plotPowerFitNested()所属R语言包:simsem
Plot power of rejecting a nested model in a nested model comparison by each fit index
图权力拒绝一个嵌套模型在一个嵌套的模型比较各拟合指数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function will plot sampling distributions of the differences in fit indices between parent and nested models. Two sampling distributions will be compared: nested model is FALSE (alternative model) and nested model is TRUE (null model).
此功能将绘制抽样分布的父母和嵌套模型的拟合指数之间的差异。将比较两个抽样分布:,嵌套模型FALSE(另一种模式)和嵌套模型是TRUE(空模型)。
用法----------Usage----------
plotPowerFitNested(altNested, altParent, nullNested = NULL,
nullParent = NULL, cutoff = NULL, usedFit = NULL, alpha = 0.05,
contN = TRUE, contMCAR = TRUE, contMAR = TRUE, useContour = TRUE,
logistic = TRUE)
参数----------Arguments----------
参数:altNested
SimResult that saves the simulation result of the nested model when the nested model is FALSE.
SimResult,节省的嵌套模型的模拟结果,当嵌套的模式是FALSE。
参数:altParent
SimResult that saves the simulation result of the parent model when the nested model is FALSE.
SimResult,节省了父模型的模拟结果,当嵌套的模式是FALSE。
参数:nullNested
SimResult that saves the simulation result of the nested model when the nested model is TRUE. This argument may not be specified if the cutoff is specified.
SimResult,节省的嵌套模型的模拟结果,当嵌套的模式是TRUE。此参数可以不指定,如果cutoff指定。
参数:nullParent
SimResult that saves the simulation result of the parent model when the nested model is TRUE. This argument may not be specified if the cutoff is specified.
SimResult,节省了父模型的模拟结果,当嵌套的模式是TRUE。此参数可以不指定,如果cutoff指定。
参数:cutoff
A vector of priori cutoffs for the differences in fit indices.
一个先验的截止时间为向量的拟合指数的差异。
参数:usedFit
Vector of names of fit indices that researchers wish to plot.
矢量,研究人员希望绘制的拟合指数的名称。
参数:alpha
A priori alpha level
先验α水平
参数:contN
Include the varying sample size in the power plot if available
包括不同样本大小的功率变化的曲线,如果有
参数:contMCAR
Include the varying MCAR (missing completely at random percentage) in the power plot if available
包括不同的MCAR(完全丢失在随机的百分比)在功率变化的曲线,如果有的话
参数:contMAR
Include the varying MAR (missing at random percentage) in the power plot if available
包括在功率变化的曲线,如果有不同的MAR(失踪在随机的百分比)
参数:useContour
If there are two of sample size, percent completely at random, and percent missing at random are varying, the plotCutoff function will provide 3D graph. Contour graph is a default. However, if this is specified as FALSE, perspective plot is used.
如果有两个样本量,%完全随机的,百分之随机缺失不同的,plotCutoff:功能将提供3D图形。等高线图是默认的。但是,如果这是指定作为FALSE,使用立体图。
参数:logistic
If logistic is TRUE and the varying parameter exists (e.g., sample size or percent missing), the plot based on logistic regression predicting the significance by the varying parameters is preferred. If FALSE, the overlaying scatterplot with a line of cutoff is plotted.
如果logisticTRUE和不同的参数(例如,样本大小或缺少%),图的基础上logistic回归分析预测的变参数的意义是首选。如果FALSE,散点图绘制线的截止覆盖。
值----------Value----------
NONE. Only plot the fit indices distributions.
NONE。仅绘制的拟合指数分布。
(作者)----------Author(s)----------
Sunthud Pornprasertmanit (University of Kansas; <a href="mailto:psunthud@ku.edu">psunthud@ku.edu</a>)
参见----------See Also----------
SimResult for simResult that used in this function.
SimResultsimResult中使用此功能。
getCutoffNested to find the cutoffs of the differences in fit indices
getCutoffNested找到的拟合指数临界值的差异,在
plotCutoffNested to visualize the cutoffs of the differences in fit indices
plotCutoffNested可视化的临界值的拟合指数的差异
getPowerFitNested to find the power in rejecting the nested model by the difference in fit indices cutoffs
getPowerFitNested找到的权力,拒绝嵌套模型的拟合指数临界值的差异
实例----------Examples----------
## Not run: [#不运行:]
u2 <- simUnif(-0.2, 0.2)
n1 <- simNorm(0, 0.1)
u79 <- simUnif(0.7, 0.9)
loading.null <- matrix(0, 6, 1)
loading.null[1:6, 1] <- NA
LX.NULL <- simMatrix(loading.null, 0.7)
RPH.NULL <- symMatrix(diag(1))
RTD <- symMatrix(diag(6))
CFA.Model.NULL <- simSetCFA(LY = LX.NULL, RPS = RPH.NULL, RTE = RTD)
error.cor.mis <- matrix(NA, 6, 6)
diag(error.cor.mis) <- 1
RTD.Mis <- symMatrix(error.cor.mis, "rnorm(1,0,0.1)")
CFA.Model.NULL.Mis <- simMisspecCFA(RTE = RTD.Mis)
loading.alt <- matrix(0, 6, 2)
loading.alt[1:3, 1] <- NA
loading.alt[4:6, 2] <- NA
LX.ALT <- simMatrix(loading.alt, 0.7)
latent.cor.alt <- matrix(NA, 2, 2)
diag(latent.cor.alt) <- 1
RPH.ALT <- symMatrix(latent.cor.alt, 0.7)
CFA.Model.ALT <- simSetCFA(LY = LX.ALT, RPS = RPH.ALT, RTE = RTD)
# loading.alt.mis <- matrix(NA, 6, 2)[< - 矩阵loading.alt.mis(NA,6,2)]
# loading.alt.mis[is.na(loading.alt)] <- 0[loading.alt.mis is.na(loading.alt)] < - 0]
# LX.alt.mis <- simMatrix(loading.alt.mis, "runif(1,-.2,.2)")[LX.alt.mis < - simMatrix(loading.alt.mis,“runif(1 - 0.2,0.2)”)]
# CFA.Model.alt.mis <- simMisspecCFA(LY = LX.alt.mis, RTE=RTD.Mis)[CFA.Model.alt.mis < - simMisspecCFA(LY = LX.alt.mis,RTE“=”RTD.Mis“)]
SimData.NULL <- simData(CFA.Model.NULL, 500)
SimData.ALT <- simData(CFA.Model.ALT, 500)
SimModel.NULL <- simModel(CFA.Model.NULL)
SimModel.ALT <- simModel(CFA.Model.ALT)
Output.NULL.NULL <- simResult(10, SimData.NULL, SimModel.NULL)
Output.ALT.NULL <- simResult(10, SimData.ALT, SimModel.NULL)
Output.NULL.ALT <- simResult(10, SimData.NULL, SimModel.ALT)
Output.ALT.ALT <- simResult(10, SimData.ALT, SimModel.ALT)
plotPowerFitNested(Output.ALT.NULL, Output.ALT.ALT, nullNested=Output.NULL.NULL, nullParent=Output.NULL.ALT)
plotPowerFitNested(Output.ALT.NULL, Output.ALT.ALT, nullNested=Output.NULL.NULL, nullParent=Output.NULL.ALT, usedFit="CFI")
Output.NULL.NULL2 <- simResult(NULL, SimData.NULL, SimModel.NULL, n=seq(50, 500, 50))
Output.ALT.NULL2 <- simResult(NULL, SimData.ALT, SimModel.NULL, n=seq(50, 500, 50))
Output.NULL.ALT2 <- simResult(NULL, SimData.NULL, SimModel.ALT, n=seq(50, 500, 50))
Output.ALT.ALT2 <- simResult(NULL, SimData.ALT, SimModel.ALT, n=seq(50, 500, 50))
plotPowerFitNested(Output.ALT.NULL2, Output.ALT.ALT2, nullNested=Output.NULL.NULL2, nullParent=Output.NULL.ALT2)
plotPowerFitNested(Output.ALT.NULL2, Output.ALT.ALT2, nullNested=Output.NULL.NULL2, nullParent=Output.NULL.ALT2, logistic=FALSE)
plotPowerFitNested(Output.ALT.NULL2, Output.ALT.ALT2, cutoff=c(CFI=-0.1), logistic=FALSE)
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|