Title: | Graphical Extension with Accuracy in Parameter Estimation (GAIPE) |
---|---|
Description: | Implements graphical extension with accuracy in parameter estimation (AIPE) on RMSEA for sample size planning in structural equation modeling based on Lin, T.-Z. & Weng, L.-J. (2014) <doi: 10.1080/10705511.2014.915380>. And, it can also implement AIPE on RMSEA and power analysis on RMSEA. |
Authors: | Tzu-Yao Lin |
Maintainer: | Yao Lin <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.1 |
Built: | 2024-12-15 07:20:53 UTC |
Source: | CRAN |
Implements graphical extension with accuracy in parameter estimation (AIPE) on RMSEA for sample size planning in structural equation modeling based on Lin, T.-Z. & Weng, L.-J. (2014) <doi: 10.1080/10705511.2014.915380>.
Package: | GAIPE |
Type: | Package |
Version: | 1.1 |
Date: | 2022-05-24 |
License: | GPL (>= 2) |
Tzu-Yao Lin Maintainer: Yao Lin <[email protected]>
Lin, T.-Z. & Weng, L.-J. (2014) Graphical Extension of Sample Size Planning With AIPE on RMSEA Using R. Structural Equation Modeling, 21, 482-490. doi: 10.1080/10705511.2014.915380
Performs sample size planning by AIPE approach for RMSEA.
AIPE.RMSEA(rmsea, df, width, clevel = 0.95)
AIPE.RMSEA(rmsea, df, width, clevel = 0.95)
rmsea |
expected RMSEA. |
df |
model degrees of freedom. |
width |
desired confidence width. |
clevel |
confidence level (e.g., .90, .95, etc.). |
Return the necessary sample size that satisfies the desired width of a confidence interval.
Tzu-Yao Lin
Kelley, K., & Lai, K. (2011). Accuracy in parameter estimation for the root mean square error of approximation: Sample size planning for narrow confidence intervals. Multivariate Behavioral Research, 46, 1-32. doi: 10.1080/00273171.2011.543027
AIPE.RMSEA(rmsea=.05,df=30,width=.02,clevel=.95)
AIPE.RMSEA(rmsea=.05,df=30,width=.02,clevel=.95)
Computes the confidence interval for RMSEA.
CI.RMSEA(rmsea,df,N,clevel=.95)
CI.RMSEA(rmsea,df,N,clevel=.95)
rmsea |
expected or observed RMSEA. |
df |
model degrees of freedom. |
N |
sample size. |
clevel |
confidence level (e.g., .90, .95, etc.). |
Return the upper and lower bound as well as the expected or observed value of the RMSEA.
Tzu-Yao Lin
Browne, M. W., & Cudeck, R. (1992). Alternative ways of assessing model fit. Sociological Methods and Research, 21(2), 230-258. doi: 10.1177/0049124192021002005
CI.RMSEA(rmsea=.05,df=30,N=200,clevel=.95)
CI.RMSEA(rmsea=.05,df=30,N=200,clevel=.95)
Draws the graph for sample size planning by GAIPE framework on RMSEA.
GAIPE.RMSEA(rmsea, df, width = NULL, clevel = 0.95, N = c(100, 1800, 15), PA_method = c("exact.fit", "close.fit", "not.close.fit"), H0rmsea = NULL, alpha = 0.05, power = c(0.8, 0.9, 0.95))
GAIPE.RMSEA(rmsea, df, width = NULL, clevel = 0.95, N = c(100, 1800, 15), PA_method = c("exact.fit", "close.fit", "not.close.fit"), H0rmsea = NULL, alpha = 0.05, power = c(0.8, 0.9, 0.95))
rmsea |
vector of the expected RMSEA values. |
df |
model degrees of freedom. |
width |
vector of desired confidence interval widths to be highlighted in the graph. |
clevel |
confidence level (e.g., .90, .95, etc.). |
N |
vector of specifying the range and the increment of sample size for drawing confidence intervals. Note that N[1:2] represents the range whereas N[3] represents the increment. |
PA_method |
a character string specifying the desired hypothesis test for power analysis, can be one of "exact.fit", "close.fit", or "not.close.fit". |
H0rmsea |
RMSEA for null hypothesis. |
alpha |
type I error rate for power analysis. |
power |
vector of specifying the power values for which horizontal lines are to be added in the graph. |
If user wants to implement the power analysis based on RMSEA in GAIPE, the PA_method and H0rmsea have to be specified. In such a case, the first value of rmsea is the RMSEA for the alternative hypothesis.
Tzu-Yao Lin
Lin, T.-Z. & Weng, L.-J. (2014) Graphical Extension of Sample Size Planning With AIPE on RMSEA Using R. Structural Equation Modeling, 21, 482-490. doi:10.1080/10705511.2014.915380
# Drawing the graphs in Lin & Weng (2014) # # FIGURE 2 # GAIPE.RMSEA(rmsea=.05,df=30,width=c(.03,.04)) # FIGURE 3 # GAIPE.RMSEA(rmsea=c(.05,.08),df=30,width=c(.03,.04)) # FIGURE 4 # GAIPE.RMSEA(rmsea=.025,df=30,width=c(.03,.04),PA_method="not.close.fit",H0rmsea=0.05) # FIGURE 5 # GAIPE.RMSEA(rmsea=.05,df=30,width=c(.03,.04),PA_method="exact.fit",H0rmsea=0)
# Drawing the graphs in Lin & Weng (2014) # # FIGURE 2 # GAIPE.RMSEA(rmsea=.05,df=30,width=c(.03,.04)) # FIGURE 3 # GAIPE.RMSEA(rmsea=c(.05,.08),df=30,width=c(.03,.04)) # FIGURE 4 # GAIPE.RMSEA(rmsea=.025,df=30,width=c(.03,.04),PA_method="not.close.fit",H0rmsea=0.05) # FIGURE 5 # GAIPE.RMSEA(rmsea=.05,df=30,width=c(.03,.04),PA_method="exact.fit",H0rmsea=0)
Performs sample size planning by power analysis on RMSEA.
PA.RMSEA(df, method = c("exact.fit", "close.fit", "not.close.fit"), H0rmsea, HArmsea, power = 0.8, alpha = 0.05)
PA.RMSEA(df, method = c("exact.fit", "close.fit", "not.close.fit"), H0rmsea, HArmsea, power = 0.8, alpha = 0.05)
df |
model degrees of freedom. |
method |
a character string specifying the hypothesis test for power analysis, must be one of "exact.fit", "close.fit", or "not.close.fit"(default). |
H0rmsea |
RMSEA for the null hypothesis. |
HArmsea |
RMSEA for the alternative hypothesis. |
power |
desired power value. |
alpha |
Type I error rate. |
Return the necessary sample size that achieves the desired power.
Tzu-Yao Lin
Hancock, G. R., & Freeman, M. J. (2001). Power and sample size for the root mean square error of approximation test of not close fit in structural equation modeling. Educational and Psychological Measurement, 61(5), 741-758. doi: 10.1177/00131640121971491
MacCallum, R. C., Browne, M. W., & Sugawara, H. M. (1996). Power analysis and determination of sample size for covariance structure modeling. Psychological Methods, 1(2), 130-149. doi: 10.1037/1082-989X.1.2.130
PA.RMSEA(df=30,method="not.close.fit",H0rmsea=.05,HArmsea=.02,power=.8,alpha=.05) # Reproducing Table 8 in Hancock and Freeman (2001) # # DF=c(seq(5,100,5),seq(110,200,10),225,250) # POWER=c(seq(.5,.99,.05),.99) # out=matrix(NA,length(DF),length(POWER)) # for(i in 1:length(DF)){ # for(j in 1:length(POWER)){ # out[i,j]=PA.RMSEA(df=DF[i],method="not.close.fit", # H0rmsea=.05,HArmsea=.02,power=POWER[j],alpha=.05) # } # } # colnames(out)=paste("Pi=",POWER,"",sep="") # rownames(out)=paste("df=",DF,"",sep="") # out
PA.RMSEA(df=30,method="not.close.fit",H0rmsea=.05,HArmsea=.02,power=.8,alpha=.05) # Reproducing Table 8 in Hancock and Freeman (2001) # # DF=c(seq(5,100,5),seq(110,200,10),225,250) # POWER=c(seq(.5,.99,.05),.99) # out=matrix(NA,length(DF),length(POWER)) # for(i in 1:length(DF)){ # for(j in 1:length(POWER)){ # out[i,j]=PA.RMSEA(df=DF[i],method="not.close.fit", # H0rmsea=.05,HArmsea=.02,power=POWER[j],alpha=.05) # } # } # colnames(out)=paste("Pi=",POWER,"",sep="") # rownames(out)=paste("df=",DF,"",sep="") # out