parcelAllocation
which can be used with only one SEM in isolation. The PAVranking
function repeatedly generates a specified number of random item-to-parcel allocations, and then fits two models to each allocation. Output includes summary information about the distribution of model selection results (including plots) and the distribution of results for each model individually, across allocations within-sample. Note that this function can be used when selecting among more than two competing structural models as well (see instructions below involving seed
).
PAVranking(nPerPar, facPlc, nAlloc=100, parceloutput = 0, syntaxA, syntaxB, dataset, names = NULL, leaveout=0, seed=NA, ...)
lavaan
parcelAllocation
which was, in turn, based on the SAS macro ParcelAlloc
(Sterba & MacCallum, 2010). The PAVranking
function produces results discussed in Sterba and Rights (2016) relevant to the assessment of parcel-allocation variability in model selection and model ranking. Specifically, the PAVranking
function first uses a modified version of parcelAllocation to generate a given number (nAlloc
) of item-to-parcel allocations. Then, PAVranking
provides the following new developments: specifying more than one SEM and producing results for Model A and Model B separately that summarize parcel allocation variability in estimates, standard errors, and fit indices. PAVranking
also newly produces results summarizing parcel allocation variability in model selection index values and model ranking between Models A and B. Additionally, PAVranking
newly allows for nonconverged solutions and outputs the proportion of allocations that converged as well as the proportion of proper solutions (results are summarized for converged and proper allocations only). For further details on the benefits of the random allocation of items to parcels, see Sterba (2011) and Sterba and MacCallum (2010).
NOTE: This function requires the lavaan
package. Missing data code needs to be NA
. If function returns "Error in plot.new() : figure margins too large,"
user may need to increase size of the plot window and rerun.
Sterba, S. K. (2011). Implications of parcel-allocation variability for comparing fit of item-solutions and parcel-solutions. Structural Equation Modeling: A Multidisciplinary Journal, 18(4), 554-577.
Sterba, S. K., & MacCallum, R. C. (2010). Variability in parameter estimates and model fit across repeated allocations of items to parcels. Multivariate Behavioral Research, 45(2), 322-358.
"Sterba, S. K., & Rights, J. D. (2016). Effects of parceling on model selection: Parcel-allocation variability in model ranking. Psychological Methods. http://dx.doi.org/10.1037/met0000067
parcelAllocation
, poolMAlloc
## Not run:
# ## Lavaan syntax for Model A: a 2 Uncorrelated
# ## factor CFA model to be fit to parceled data
#
# parmodelA <- '
# f1 =~ NA*p1f1 + p2f1 + p3f1
# f2 =~ NA*p1f2 + p2f2 + p3f2
# p1f1 ~ 1
# p2f1 ~ 1
# p3f1 ~ 1
# p1f2 ~ 1
# p2f2 ~ 1
# p3f2 ~ 1
# p1f1 ~~ p1f1
# p2f1 ~~ p2f1
# p3f1 ~~ p3f1
# p1f2 ~~ p1f2
# p2f2 ~~ p2f2
# p3f2 ~~ p3f2
# f1 ~~ 1*f1
# f2 ~~ 1*f2
# f1 ~~ 0*f2
# '
#
# ## Lavaan syntax for Model B: a 2 Correlated
# ## factor CFA model to be fit to parceled data
#
# parmodelB <- '
# f1 =~ NA*p1f1 + p2f1 + p3f1
# f2 =~ NA*p1f2 + p2f2 + p3f2
# p1f1 ~ 1
# p2f1 ~ 1
# p3f1 ~ 1
# p1f2 ~ 1
# p2f2 ~ 1
# p3f2 ~ 1
# p1f1 ~~ p1f1
# p2f1 ~~ p2f1
# p3f1 ~~ p3f1
# p1f2 ~~ p1f2
# p2f2 ~~ p2f2
# p3f2 ~~ p3f2
# f1 ~~ 1*f1
# f2 ~~ 1*f2
# f1 ~~ f2
# '
#
# ##specify items for each factor
# f1name <- colnames(simParcel)[1:9]
# f2name <- colnames(simParcel)[10:18]
#
# ##run function
# PAVranking(nPerPar=list(c(3,3,3),c(3,3,3)),
# facPlc=list(f1name,f2name), nAlloc=100,
# parceloutput=0, syntaxA=parmodelA,
# syntaxB=parmodelB, dataset = simParcel,
# names=list("p1f1","p2f1","p3f1","p1f2","p2f2","p3f2"),
# leaveout=0)
# ## End(Not run)
Run the code above in your browser using DataLab