The common factor model is often used in psychological research to model a correlation or covariance matrix in terms of a small number of latent factors. For instance, a p × p correlation matrix, Ω, can be represented as
Ω = ΛΦΛ′ + Ψ2,
where Λ is a p × m matrix of factor-pattern coefficients, Φ is a m × m matrix of correlations between latent factors, and Ψ is a p × p diagonal matrix of unique factor-pattern coefficients.
Though this model is often useful, it is implausible that a simple common factor model will perfectly fit a population correlation matrix for any set of real variables. Therefore, population correlation matrices that have a degree of misfit with the model-implied correlation matrix are more representative of empirical data. A few methods have been proposed to generate population correlation matrices with model error (i.e., that do not perfectly fit a particular factor model). Though these methods differ, they all involve finding a symmetric, positive semidefinite population correlation matrix, Σ, such that
Σ − Ω = E where E is a non-null error matrix.
The noisemaker package includes functions that allow users to generate population correlation matrices with user-specified fit statistics, given a particular factor model. This vignette will demonstrate how to generate Σ matrices with user-specified root-mean-square error of approximation (RMSEA) and/or comparative fit index (CFI) values using (a) the Tucker, Koopman, and Linn (1969) method, (b) the Cudeck and Browne (1996) method, and (c) the Wu and Browne (2015) method. In the following sections, I will give examples and further details regarding how to generate population correlation matrices with model error using each of these methods.
For the purposes of this example, we will use a factor model with
three latent factors and nine items. We can create this model using the
fungible::simFA()
function.
# Specify the factor model
Lambda <- matrix(c(.5, .5, .5, 0, 0, 0, 0, 0, 0,
0, 0, 0, .6, .6, .6, 0, 0, 0,
0, 0, 0, 0, 0, 0, .7, .7, .7),
ncol = 3, byrow = FALSE)
Phi <- matrix(c( 1, .3, .3,
.3, 1, .3,
.3, .3, 1),
ncol = 3, byrow = TRUE)
mod <- fungible::simFA(
Model = list(NFac = 3,
NItemPerFac = 3,
Model = "oblique"),
Loadings = list(FacPattern = Lambda),
Phi = list(PhiType = "user",
UserPhi = Phi),
Seed = 42
)
Let’s take a quick look at the factor-pattern and factor correlation matrices:
# factor-pattern matrix
mod$loadings
#> F1 F2 F3
#> V1 0.5 0.0 0.0
#> V2 0.5 0.0 0.0
#> V3 0.5 0.0 0.0
#> V4 0.0 0.6 0.0
#> V5 0.0 0.6 0.0
#> V6 0.0 0.6 0.0
#> V7 0.0 0.0 0.7
#> V8 0.0 0.0 0.7
#> V9 0.0 0.0 0.7
# factor correlation matrix
mod$Phi
#> F1 F2 F3
#> F1 1.0 0.3 0.3
#> F2 0.3 1.0 0.3
#> F3 0.3 0.3 1.0
The model-implied correlation matrix corresponding to this model is:
mod$Rpop
#> V1 V2 V3 V4 V5 V6 V7 V8 V9
#> V1 1.000 0.250 0.250 0.090 0.090 0.090 0.105 0.105 0.105
#> V2 0.250 1.000 0.250 0.090 0.090 0.090 0.105 0.105 0.105
#> V3 0.250 0.250 1.000 0.090 0.090 0.090 0.105 0.105 0.105
#> V4 0.090 0.090 0.090 1.000 0.360 0.360 0.126 0.126 0.126
#> V5 0.090 0.090 0.090 0.360 1.000 0.360 0.126 0.126 0.126
#> V6 0.090 0.090 0.090 0.360 0.360 1.000 0.126 0.126 0.126
#> V7 0.105 0.105 0.105 0.126 0.126 0.126 1.000 0.490 0.490
#> V8 0.105 0.105 0.105 0.126 0.126 0.126 0.490 1.000 0.490
#> V9 0.105 0.105 0.105 0.126 0.126 0.126 0.490 0.490 1.000
In the TKL model error method, the population correlation matrix and
the model-implied correlation matrix differ due to the effects of a
large number of minor common factors such that Σ = ΛΦΛ′ + Ψ2 + WW′.
Here, W denotes a
p × q matrix of
factor loadings for p items
and q minor common factors.
The TKL method uses two user-specified parameters, νe and ϵ, to determine the distribution of
the minor factor loadings. In noisemaker()
, these
parameters are denoted by v
and eps
. The
v
parameter indicates the proportion of the unique variance
that was reapportioned to the minor common factors. The eps
parameter indicates how equally the minor factor variance was
distributed among the minor factors; values close to zero indicate that
all of the minor common factors accounted for roughly the same amount of
variance, whereas values close to one indicate that most of the variance
in the minor common factors was accounted for by the first two or three
minor factors.
Traditionally, practitioners have selected νe and ϵ values based primarily on
intuition. For instance, a practitioner might think that minor common
factors account for 10% of the unique variance and therefor set νe = 0.1. Then, ϵ is typically set to a value that
gives a “reasonable” root-mean-square error of approximation (RMSEA)
value. However, this method involves a lot of trial and error and can
impractical when a simulation study involves many factor models.
Moreover, there are no published guidelines that give an empirical basis
for “reasonable” values of νe and ϵ. The noisemaker()
function makes it much easier to use the TKL method. In particular, the
function allows users to select a target RMSEA value, a target
comparative fit index (CFI) value, or both, and uses an optimization
procedure to select values of νe and ϵ such that the solution has RMSEA
and/or CFI values that are close to the target values. In the next
sections, I will demonstrate how to use the TKL method with the
noisemaker()
function.
In this section, we’ll use the model we specified earlier to generate
a population correlation matrix with model error using the
noisemaker()
function and the TKL method. First, we’ll try
to find a Σ matrix such that
the resulting RMSEA value is close to 0.05.
set.seed(42)
TKL_m1 <- noisemaker(mod, method = "TKL", target_rmsea = 0.05)
TKL_m1
#> $Sigma
#> V1 V2 V3 V4 V5 V6 V7
#> V1 1.00000000 0.26322783 0.24433333 0.10942514 0.12264138 0.07724166 0.09837750
#> V2 0.26322783 1.00000000 0.22814855 0.09495953 0.06704508 0.05985994 0.12348914
#> V3 0.24433333 0.22814855 1.00000000 0.03026166 0.08481796 0.05248391 0.08681114
#> V4 0.10942514 0.09495953 0.03026166 1.00000000 0.34629961 0.40535572 0.13463467
#> V5 0.12264138 0.06704508 0.08481796 0.34629961 1.00000000 0.36766792 0.10427625
#> V6 0.07724166 0.05985994 0.05248391 0.40535572 0.36766792 1.00000000 0.09114444
#> V7 0.09837750 0.12348914 0.08681114 0.13463467 0.10427625 0.09114444 1.00000000
#> V8 0.08201345 0.09902769 0.12088329 0.09455277 0.12311562 0.08485998 0.50701447
#> V9 0.07552670 0.14381668 0.06647497 0.12727816 0.13348559 0.12363447 0.49567492
#> V8 V9
#> V1 0.08201345 0.07552670
#> V2 0.09902769 0.14381668
#> V3 0.12088329 0.06647497
#> V4 0.09455277 0.12727816
#> V5 0.12311562 0.13348559
#> V6 0.08485998 0.12363447
#> V7 0.50701447 0.49567492
#> V8 1.00000000 0.50363420
#> V9 0.50363420 1.00000000
#>
#> $rmsea
#> [1] 0.04999997
#>
#> $cfi
#> [1] 0.9776875
#>
#> $fn_value
#> [1] 4.590157e-13
#>
#> $m
#> [1] NA
#>
#> $v
#> [1] 0.1443807
#>
#> $eps
#> [1] 0.07344736
#>
#> $W
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 0.15639903 -0.156733186 0.083442969 -0.06289109 -0.0001961925
#> [2,] -0.10139061 -0.004389662 0.005326135 -0.20353669 0.0564781463
#> [3,] 0.13773584 0.119525197 -0.069285020 0.02459620 0.1577030319
#> [4,] -0.05725022 -0.187821042 0.036831595 -0.04919117 -0.1376999570
#> [5,] 0.04334662 -0.031291826 0.017693985 0.16334352 -0.0699192882
#> [6,] -0.04783388 -0.174923717 -0.022579067 0.10115536 -0.0366716733
#> [7,] -0.02420506 0.116099496 0.150689129 -0.10047269 -0.1065191085
#> [8,] 0.06900881 0.158985229 -0.057429214 0.00989021 -0.0698989674
#> [9,] -0.16346522 0.038857716 -0.050672460 -0.05921567 -0.0718299120
#> [,6] [,7] [,8] [,9] [,10]
#> [1,] 0.018009265 0.09674969 0.11452769 0.096790392 -0.059946846
#> [2,] -0.020405339 0.05086141 0.16600210 0.005621225 -0.028494194
#> [3,] 0.092117269 0.02935291 -0.09146668 0.097523763 -0.024524365
#> [4,] 0.089210515 -0.01869189 0.02787963 -0.087422266 -0.007553526
#> [5,] -0.080170347 0.04258549 0.10993882 0.106106953 -0.016534326
#> [6,] 0.006053840 -0.05555294 -0.01832632 -0.059931052 0.152155613
#> [7,] 0.002911743 -0.01535457 -0.01111499 -0.013048529 -0.060618819
#> [8,] -0.049907504 0.08767078 -0.02257847 -0.076151176 -0.026382467
#> [9,] -0.085508582 0.03506413 0.04394179 0.009116942 0.022027495
#> [,11] [,12] [,13] [,14] [,15]
#> [1,] 0.03737874 -0.052663353 0.0433071396 -0.033499393 -2.951808e-02
#> [2,] -0.04753358 0.030665855 -0.0034379672 0.049672343 6.565930e-03
#> [3,] -0.03063414 0.017244491 -0.0804547134 0.001696896 -6.158519e-02
#> [4,] 0.05419508 0.048938136 -0.0511943215 -0.030319184 3.517818e-02
#> [5,] -0.01827361 -0.098181331 -0.0415464188 -0.003444910 -2.249409e-02
#> [6,] 0.06173156 0.006027953 -0.0337155679 0.044257687 1.038553e-02
#> [7,] -0.01180178 0.050815816 -0.0007454487 -0.013716517 1.523419e-03
#> [8,] -0.09289180 0.039539777 0.0339202493 -0.036190548 -1.045254e-05
#> [9,] -0.04962743 -0.045101422 -0.0218150035 0.007104605 7.796847e-02
#> [,16] [,17] [,18] [,19] [,20]
#> [1,] 0.034599926 0.0031427815 0.008187627 0.022841629 0.001176333
#> [2,] -0.046400945 -0.0560737000 -0.021975817 -0.049235313 0.004319074
#> [3,] -0.001545112 -0.0001975428 0.017668189 -0.020894565 0.014675875
#> [4,] -0.002211521 0.0219526149 -0.021735326 0.015754314 -0.009108404
#> [5,] -0.032640406 0.0015537913 0.081676175 0.001495786 0.041524427
#> [6,] -0.052627473 0.0346530230 -0.005403460 0.014084647 0.017639354
#> [7,] -0.017454612 -0.0037557089 -0.011340424 0.054142586 -0.025345546
#> [8,] 0.023613894 -0.0021583678 -0.005743858 -0.026196138 0.040975740
#> [9,] -0.016622214 0.0178446792 0.029565828 -0.067113480 0.035443062
#> [,21] [,22] [,23] [,24] [,25]
#> [1,] 0.009133954 0.004189558 -0.0282046550 -0.0074003064 0.009043810
#> [2,] -0.047071520 0.030568056 0.0447411537 0.0272740328 -0.004391320
#> [3,] -0.001701355 -0.030183188 0.0275064376 -0.0005705579 -0.015292058
#> [4,] 0.022660622 -0.014561310 -0.0004881464 0.0041344394 0.019610439
#> [5,] 0.023883853 0.001267154 0.0177410982 -0.0220161921 -0.005882766
#> [6,] -0.006629907 -0.032759488 -0.0289749871 -0.0201538863 0.024274947
#> [7,] -0.051023274 -0.006711299 -0.0177839614 0.0150032958 -0.016735929
#> [8,] 0.001675385 0.022222092 0.0011571922 0.0275092964 -0.009440539
#> [9,] 0.015643478 0.024493306 -0.0280534362 0.0270853633 -0.005412638
#> [,26] [,27] [,28] [,29] [,30]
#> [1,] 0.023997696 -0.0097225874 0.001797132 0.002649281 -0.006995614
#> [2,] -0.003767837 -0.0029819486 -0.029822488 -0.004765539 0.004719013
#> [3,] -0.027619032 -0.0239481184 0.006165593 0.004323563 0.004672736
#> [4,] 0.005605039 0.0274296577 0.014614463 -0.014959277 -0.002991254
#> [5,] -0.007050199 0.0020028447 0.035462589 -0.015302636 -0.019752585
#> [6,] -0.012380634 -0.0018490556 -0.028046104 0.020492367 0.012254196
#> [7,] -0.013784498 0.0059263180 -0.012750504 0.004144918 0.005271214
#> [8,] 0.008038734 0.0006505652 -0.011371239 0.008754712 -0.011566946
#> [9,] -0.003240071 -0.0022787328 -0.016848592 0.026884466 -0.021882088
#> [,31] [,32] [,33] [,34] [,35]
#> [1,] -1.936473e-02 -0.003729630 -4.457020e-03 0.0098278410 -0.0009595175
#> [2,] 2.002950e-02 0.006481186 -1.260294e-02 -0.0045359822 0.0104984704
#> [3,] 1.270671e-02 0.019501569 -9.791387e-05 -0.0050628632 -0.0050869422
#> [4,] -1.496401e-03 -0.009128523 -6.818660e-03 0.0055013988 -0.0003837982
#> [5,] -1.984637e-02 0.005769766 -6.273054e-03 -0.0115089675 -0.0008692226
#> [6,] 1.041860e-02 0.001274560 1.791179e-02 -0.0005245429 -0.0106005621
#> [7,] 4.258320e-03 0.007312811 -1.328000e-03 -0.0108765575 -0.0028883428
#> [8,] -8.144823e-05 -0.002728363 -1.179153e-02 0.0118978236 -0.0002781080
#> [9,] 1.925735e-03 0.009856170 1.781513e-03 -0.0027676377 -0.0038784076
#> [,36] [,37] [,38] [,39] [,40]
#> [1,] -1.534294e-02 -9.563939e-03 0.0007752232 0.0072392460 -0.0026594912
#> [2,] -9.915615e-03 1.029615e-03 -0.0001744046 0.0067281561 0.0038806056
#> [3,] 1.801288e-03 -1.388643e-02 0.0009309692 -0.0080071977 0.0102877642
#> [4,] 3.847019e-03 -9.233840e-03 -0.0028244746 0.0099653299 -0.0055485321
#> [5,] -4.609990e-03 1.080702e-03 -0.0040487312 -0.0049607772 -0.0059338979
#> [6,] 6.957988e-07 -1.021765e-02 -0.0157789746 0.0009286726 -0.0092293177
#> [7,] 6.757786e-03 -1.016324e-05 -0.0019753777 -0.0020214050 -0.0064724203
#> [8,] 1.260064e-02 -3.472564e-03 -0.0038515466 -0.0008517039 0.0005158809
#> [9,] -9.526042e-03 -4.937043e-03 0.0201404345 0.0012997944 0.0041801346
#> [,41] [,42] [,43] [,44] [,45]
#> [1,] 0.0004576705 -0.004571982 -0.0032311126 0.0011383824 -0.0030946732
#> [2,] -0.0006684013 -0.002780715 0.0061823782 0.0029873643 0.0058843902
#> [3,] -0.0081837702 0.003688698 0.0019756618 0.0004896380 -0.0021788961
#> [4,] 0.0028324738 0.003294193 0.0041263487 -0.0110191162 0.0022364940
#> [5,] -0.0013869192 0.002744619 0.0050487453 0.0014473995 0.0015154692
#> [6,] -0.0013809147 -0.006201371 0.0046762272 -0.0022072294 -0.0043651660
#> [7,] 0.0038358415 -0.004187879 -0.0036803731 0.0006055371 0.0047728671
#> [8,] 0.0049110708 0.008376241 -0.0004627063 0.0027658333 0.0028317025
#> [9,] 0.0082544254 0.001416997 0.0031739539 0.0066018856 0.0003922633
#> [,46] [,47] [,48] [,49] [,50]
#> [1,] -0.0030070174 0.001506515 0.0040050225 0.0036680139 -0.0014707888
#> [2,] -0.0091148293 -0.002238827 -0.0009938960 0.0068672528 0.0010104493
#> [3,] 0.0001690282 0.001974654 -0.0071558182 -0.0051695051 0.0021825782
#> [4,] 0.0006510756 0.002064078 -0.0004664736 -0.0007008946 0.0009417102
#> [5,] -0.0015748466 0.004183271 0.0045484385 -0.0004625643 -0.0003411601
#> [6,] 0.0039120712 -0.002911246 0.0083953301 0.0026102227 0.0057482930
#> [7,] -0.0020395125 0.001313080 -0.0010371714 -0.0006345759 -0.0001957992
#> [8,] -0.0055840600 -0.006492581 -0.0009013699 -0.0086235799 0.0060711016
#> [9,] 0.0017525368 -0.002943081 -0.0061290686 -0.0078604068 -0.0001871576
Taking a look at the output, the first element is the population correlation matrix with model error Σ that was generated. Next, the output tells us the RMSEA value, which is quite close to the target value of 0.05. The other elements of the output are the CFI value and the values of the two TKL parameters.
In addition to allowing us to optimize the TKL parameters to get a
Σ matrix with an RMSEA value
close to a target value, the noisemaker()
function also
allows us to optimize for target RMSEA and CFI values simultaneously.
The only change that is needed is to specify the desired CFI value in
the target_cfi
argument.
TKL_m2 <- noisemaker(mod, method = "TKL",
target_rmsea = 0.05,
target_cfi = 0.95)
TKL_m2
#> $Sigma
#> V1 V2 V3 V4 V5 V6 V7
#> V1 1.00000000 0.27576203 0.19820880 0.09511087 0.11917747 0.13648892 0.06590779
#> V2 0.27576203 1.00000000 0.21554725 0.11985582 0.15014978 0.13477484 0.07893813
#> V3 0.19820880 0.21554725 1.00000000 0.09928186 0.05551119 0.05465386 0.13605899
#> V4 0.09511087 0.11985582 0.09928186 1.00000000 0.39291942 0.39490983 0.10922887
#> V5 0.11917747 0.15014978 0.05551119 0.39291942 1.00000000 0.39972068 0.09850817
#> V6 0.13648892 0.13477484 0.05465386 0.39490983 0.39972068 1.00000000 0.08385823
#> V7 0.06590779 0.07893813 0.13605899 0.10922887 0.09850817 0.08385823 1.00000000
#> V8 0.07742104 0.08566856 0.14381282 0.15767224 0.11593647 0.11780048 0.50006953
#> V9 0.13641909 0.10545688 0.06578842 0.09054794 0.12984596 0.13124941 0.47423504
#> V8 V9
#> V1 0.07742104 0.13641909
#> V2 0.08566856 0.10545688
#> V3 0.14381282 0.06578842
#> V4 0.15767224 0.09054794
#> V5 0.11593647 0.12984596
#> V6 0.11780048 0.13124941
#> V7 0.50006953 0.47423504
#> V8 1.00000000 0.46055063
#> V9 0.46055063 1.00000000
#>
#> $rmsea
#> [1] 0.06428914
#>
#> $cfi
#> [1] 0.9629046
#>
#> $fn_value
#> [1] 0.07414145
#>
#> $m
#> [1] NA
#>
#> $v
#> [1] 0.09635756
#>
#> $eps
#> [1] 0.2459823
#>
#> $W
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 0.04883094 0.04959597 0.22195831 -0.074891604 -0.047199139
#> [2,] 0.21725889 0.02547983 0.09890282 0.108322989 0.012841338
#> [3,] -0.06958958 0.02444847 -0.21397173 0.026435331 0.050974127
#> [4,] 0.17716198 0.14633088 -0.07069218 -0.037936522 0.012462938
#> [5,] 0.23159770 -0.01227642 0.08320514 0.006181672 0.005543341
#> [6,] 0.12721094 0.14861480 0.14658419 -0.009100623 -0.000567365
#> [7,] -0.08177685 -0.05472691 -0.14533419 0.014233476 -0.009661123
#> [8,] 0.02009782 0.07934421 -0.15423850 -0.086926116 0.091914859
#> [9,] -0.05253318 -0.09434174 0.18057453 -0.042547992 0.035537561
#> [,6] [,7] [,8] [,9] [,10]
#> [1,] -0.072085431 -0.035208304 -0.0005226599 -1.985384e-02 -0.049793555
#> [2,] 0.024580302 -0.037013037 0.0194586842 -6.030940e-03 -0.013608286
#> [3,] -0.026528547 -0.026829533 -0.1186594114 3.303421e-02 -0.002300721
#> [4,] -0.037486690 0.001263746 -0.0215958737 -1.261916e-02 0.008285419
#> [5,] 0.008717888 -0.019159890 0.0041045413 -1.848080e-02 -0.007894026
#> [6,] -0.010630458 -0.018962454 -0.0066043359 1.323168e-03 0.034167223
#> [7,] 0.070564125 -0.075331317 0.0430629548 -6.254372e-05 -0.066180468
#> [8,] -0.009893624 0.038925179 -0.0290023196 -2.851427e-04 -0.003872053
#> [9,] 0.035055601 0.016099358 0.0121440681 8.449310e-03 -0.002475650
#> [,11] [,12] [,13] [,14] [,15]
#> [1,] -0.005256838 -0.029419412 0.0010933200 -0.0076904899 0.0017974715
#> [2,] -0.004868276 -0.009784380 -0.0019580513 -0.0004826642 0.0053763940
#> [3,] 0.016778593 0.002176682 0.0268445087 -0.0024764158 -0.0079228052
#> [4,] 0.010738746 -0.006393573 0.0012108489 0.0023758225 -0.0004998471
#> [5,] 0.002527586 0.002620070 0.0004633727 -0.0026670260 -0.0016795667
#> [6,] -0.009051993 0.004386249 0.0042468972 -0.0041270146 0.0023549269
#> [7,] 0.032650965 0.003202741 -0.0006659613 0.0064153159 -0.0020046040
#> [8,] 0.012502750 -0.001881597 0.0003429086 -0.0031197993 0.0007160136
#> [9,] 0.001607487 -0.007405634 -0.0043867312 -0.0020356909 0.0008090386
#> [,16] [,17] [,18] [,19] [,20]
#> [1,] 2.507450e-03 -0.0060971876 -0.0027542607 -1.168687e-03 4.468489e-04
#> [2,] -5.014611e-05 -0.0006730254 -0.0026528562 -4.226789e-04 1.204378e-03
#> [3,] -4.915143e-04 0.0008123396 -0.0078985891 1.959628e-03 1.323163e-03
#> [4,] 2.319767e-04 -0.0034350849 0.0007404108 -8.540397e-05 -6.941217e-04
#> [5,] 9.149876e-04 0.0002693428 -0.0003724732 -3.448704e-04 -2.769739e-04
#> [6,] -8.433382e-04 0.0006226456 -0.0003063445 8.140839e-04 -4.715989e-04
#> [7,] -2.378969e-03 0.0046493396 0.0007842060 2.755420e-05 2.179387e-04
#> [8,] -2.609382e-03 0.0003745866 -0.0007999081 -1.185042e-03 -3.848201e-06
#> [9,] -1.678773e-03 0.0002708782 -0.0016025139 1.284689e-03 2.084667e-04
#> [,21] [,22] [,23] [,24] [,25]
#> [1,] -0.0004925248 -0.0009221022 -1.260168e-03 -1.551551e-04 7.984238e-05
#> [2,] 0.0008766515 -0.0005375413 -1.056204e-04 -9.761418e-05 5.721818e-07
#> [3,] -0.0005675742 0.0007137525 1.428366e-04 -5.654323e-04 -6.452088e-04
#> [4,] -0.0003003590 -0.0001001693 8.167410e-05 -2.534667e-04 1.858869e-04
#> [5,] -0.0003500565 -0.0000584876 6.691423e-05 7.878744e-05 -5.742314e-05
#> [6,] 0.0001566248 0.0006215217 -2.711870e-04 -1.647133e-04 1.848584e-04
#> [7,] 0.0017022409 -0.0000511060 -2.149576e-04 -6.849251e-04 -1.782323e-04
#> [8,] -0.0002617035 -0.0002976839 -4.214265e-04 -1.600392e-04 -1.366423e-04
#> [9,] 0.0001117023 0.0002407204 -1.543391e-04 -1.466852e-04 -4.312082e-06
#> [,26] [,27] [,28] [,29] [,30]
#> [1,] 1.769228e-04 2.334864e-04 -1.548562e-04 7.016901e-05 1.109077e-04
#> [2,] 7.617420e-05 6.279047e-06 4.988417e-05 -1.069170e-04 -3.330212e-05
#> [3,] -6.369212e-05 2.010867e-04 2.714215e-04 -2.127017e-04 -9.203834e-05
#> [4,] -1.446773e-04 1.398530e-04 -1.013394e-04 -1.537143e-04 1.972238e-05
#> [5,] 4.721249e-05 1.462873e-05 -2.520581e-05 2.602715e-05 -2.156265e-05
#> [6,] -1.064533e-04 9.430488e-05 -1.930001e-05 1.250356e-05 -1.687445e-05
#> [7,] -3.541495e-04 4.494541e-05 -2.074387e-04 5.606683e-05 7.342584e-05
#> [8,] 1.065908e-04 -2.042186e-04 7.070408e-05 6.488589e-05 -3.321221e-05
#> [9,] -1.283655e-04 1.758836e-06 -3.547102e-05 -1.873490e-06 -6.489532e-05
#> [,31] [,32] [,33] [,34] [,35]
#> [1,] 3.787819e-05 -2.963825e-05 2.949236e-05 -5.586484e-05 -4.533941e-08
#> [2,] -1.641320e-05 2.728433e-05 -1.103309e-05 1.670007e-05 -1.573059e-07
#> [3,] 4.036404e-05 2.375853e-05 -9.731749e-05 -9.509643e-06 4.384724e-06
#> [4,] 1.065650e-05 4.511057e-06 -3.071845e-05 5.242695e-06 5.602300e-06
#> [5,] -4.813389e-06 1.343783e-05 2.481481e-06 7.537261e-06 -7.262610e-07
#> [6,] 1.317912e-05 1.595585e-05 3.579002e-05 1.014102e-05 -2.274416e-06
#> [7,] 3.960342e-05 -3.257660e-05 1.071704e-05 -1.952465e-05 3.573430e-06
#> [8,] -1.007421e-05 1.301332e-05 2.807414e-05 2.927953e-05 -6.120980e-06
#> [9,] 2.974933e-05 -1.707214e-05 1.210079e-05 -1.765698e-05 1.261178e-05
#> [,36] [,37] [,38] [,39] [,40]
#> [1,] 7.840116e-07 -1.736259e-06 8.048217e-06 5.507124e-06 2.430665e-06
#> [2,] -4.020654e-06 -6.492058e-06 4.142536e-07 2.973112e-06 4.131049e-06
#> [3,] -3.780114e-05 -3.253397e-05 -1.940590e-05 2.808141e-06 5.367063e-06
#> [4,] -8.919040e-06 -1.168663e-06 -8.056830e-06 4.516741e-06 -1.424929e-06
#> [5,] 1.762902e-06 3.419673e-06 1.334478e-06 -2.837444e-06 1.143640e-07
#> [6,] -1.007193e-05 9.767533e-06 -2.878614e-07 2.693960e-06 3.069251e-06
#> [7,] 1.762016e-05 3.302537e-08 -5.455974e-06 -1.137974e-05 -8.481294e-06
#> [8,] -1.433030e-05 -6.473877e-07 -1.882306e-06 2.681536e-06 1.117311e-06
#> [9,] -1.197310e-06 4.491251e-06 -2.361139e-06 2.376977e-07 -3.134822e-07
#> [,41] [,42] [,43] [,44] [,45]
#> [1,] 5.792083e-07 -3.245064e-06 -7.237992e-07 -1.866784e-06 -1.293852e-08
#> [2,] -1.455780e-07 -1.026005e-06 1.964271e-06 8.077472e-07 7.495794e-07
#> [3,] -3.740018e-06 1.480464e-06 -1.153097e-07 2.534819e-06 1.568119e-06
#> [4,] 2.343276e-06 -2.465740e-06 1.562298e-06 -3.045230e-07 -1.365794e-09
#> [5,] -1.159561e-06 -1.438788e-06 -2.005626e-07 -5.118112e-07 4.649171e-08
#> [6,] -3.841762e-07 -1.422579e-06 5.784675e-07 -6.339557e-08 -3.914911e-07
#> [7,] -1.424726e-06 -1.074583e-06 5.222103e-07 3.936665e-06 -2.623197e-07
#> [8,] 1.380370e-06 2.423246e-06 4.762330e-06 2.270039e-06 -8.629958e-07
#> [9,] 2.423006e-06 -3.116882e-07 7.889323e-07 -1.111470e-06 -4.712030e-07
#> [,46] [,47] [,48] [,49] [,50]
#> [1,] -1.550326e-07 -1.261854e-06 3.432907e-07 -4.036559e-07 2.941120e-08
#> [2,] -6.323179e-08 -5.959859e-07 -7.685256e-07 -2.369225e-07 -5.660815e-08
#> [3,] -9.314282e-08 -1.432333e-06 1.052991e-07 -1.962334e-08 6.761504e-07
#> [4,] 5.076951e-07 2.408518e-07 -9.325619e-08 2.352972e-07 9.678996e-08
#> [5,] -1.584857e-07 -4.734490e-08 -7.197429e-08 8.291353e-08 2.470958e-07
#> [6,] 2.771445e-07 8.334953e-08 -6.610287e-08 -3.757556e-07 -1.053450e-07
#> [7,] 8.970999e-07 -1.173497e-06 1.786756e-07 -2.997346e-07 2.627970e-07
#> [8,] -7.519426e-07 -2.553284e-07 1.424633e-07 -2.454656e-09 4.287704e-07
#> [9,] 4.455499e-08 1.558296e-07 -4.712944e-08 -2.296809e-07 3.574760e-08
Notice that both the RMSEA and CFI values are slightly off from the target values. Some combinations of RMSEA and CFI are not possible for a particular model. In that case, the function tries its best to find a solution that gives RMSEA and CFI values that are as close as possible to the target values, weighting both indices equally. If we were more concerned about getting an RMSEA value that is close to the target value, we could weight RMSEA more heavily than CFI:
TKL_m3 <- noisemaker(mod, method = "TKL",
target_rmsea = 0.05,
target_cfi = 0.95,
tkl_ctrl = list(weights = c(rmsea = 4, cfi = 1)))
TKL_m3
#> $Sigma
#> V1 V2 V3 V4 V5 V6 V7
#> V1 1.00000000 0.26862122 0.21283413 0.09733115 0.10654562 0.09100907 0.08366247
#> V2 0.26862122 1.00000000 0.25752820 0.06436485 0.07420102 0.08897118 0.04412692
#> V3 0.21283413 0.25752820 1.00000000 0.02318507 0.06619354 0.11130992 0.08515436
#> V4 0.09733115 0.06436485 0.02318507 1.00000000 0.36263633 0.37141847 0.15980380
#> V5 0.10654562 0.07420102 0.06619354 0.36263633 1.00000000 0.31780582 0.13685173
#> V6 0.09100907 0.08897118 0.11130992 0.37141847 0.31780582 1.00000000 0.12827396
#> V7 0.08366247 0.04412692 0.08515436 0.15980380 0.13685173 0.12827396 1.00000000
#> V8 0.14022821 0.12077692 0.06747023 0.15219809 0.13208788 0.10702007 0.46974718
#> V9 0.10844116 0.08428759 0.13028240 0.09432692 0.13009804 0.10196879 0.48822014
#> V8 V9
#> V1 0.14022821 0.10844116
#> V2 0.12077692 0.08428759
#> V3 0.06747023 0.13028240
#> V4 0.15219809 0.09432692
#> V5 0.13208788 0.13009804
#> V6 0.10702007 0.10196879
#> V7 0.46974718 0.48822014
#> V8 1.00000000 0.48005220
#> V9 0.48005220 1.00000000
#>
#> $rmsea
#> [1] 0.05544071
#>
#> $cfi
#> [1] 0.9705813
#>
#> $fn_value
#> [1] 0.04335947
#>
#> $m
#> [1] NA
#>
#> $v
#> [1] 0.1296012
#>
#> $eps
#> [1] 0.09068834
#>
#> $W
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] -0.23595181 -0.029155007 -0.08674512 -0.03871423 0.11288546 -0.038095844
#> [2,] -0.14039970 0.104730859 0.13027202 -0.02820394 0.08571111 0.110858674
#> [3,] 0.11486134 -0.077179842 0.16369062 0.18112367 0.08009294 0.044521374
#> [4,] -0.04411684 0.008402416 -0.14037857 -0.12828223 -0.13472406 -0.008737743
#> [5,] -0.05820066 0.096457074 -0.13402165 0.08048270 -0.00204900 -0.009727164
#> [6,] -0.01886364 -0.181259227 0.06329557 -0.03055323 -0.03617960 0.060731354
#> [7,] 0.09665133 -0.084241812 -0.10622364 -0.01164678 -0.12641213 -0.018691459
#> [8,] -0.07227898 0.115068684 -0.08415632 -0.06761009 0.07319691 0.006858287
#> [9,] 0.05857065 -0.042131945 -0.04531486 0.10146945 0.10383009 -0.125919418
#> [,7] [,8] [,9] [,10] [,11]
#> [1,] -0.003482851 0.016256508 -0.085239318 -0.044873198 0.04483809
#> [2,] 0.028796411 -0.068769453 0.016326603 -0.015380674 -0.09981646
#> [3,] -0.008958740 -0.002080111 0.001666892 -0.001340965 -0.01380778
#> [4,] 0.038510990 0.106361358 0.065983746 -0.014193196 0.01869868
#> [5,] -0.013567354 -0.083492614 0.019570301 0.064325794 0.10992922
#> [6,] 0.088433549 0.097928582 0.048221272 0.010425047 -0.03078860
#> [7,] 0.012941751 -0.015679939 0.002573587 -0.006042424 0.07888660
#> [8,] 0.057609775 0.112144707 -0.056296013 -0.037693061 -0.02462411
#> [9,] -0.082471960 -0.053327999 0.016659907 -0.067785403 -0.04903484
#> [,12] [,13] [,14] [,15] [,16]
#> [1,] 0.052270347 0.0047652421 0.0172913458 0.010788795 0.020239597
#> [2,] -0.015173485 -0.0262761313 -0.0717450179 0.024137816 0.012902321
#> [3,] 0.001602749 0.0322031402 0.0003137366 -0.010280077 0.036459949
#> [4,] -0.056391068 -0.0444758651 0.0157518388 0.031869800 -0.001498703
#> [5,] -0.019621642 -0.0002593995 0.0554347195 -0.093274884 -0.008415623
#> [6,] 0.080229679 -0.0223533519 -0.0042705173 -0.027544796 0.069690694
#> [7,] -0.019664442 -0.0234853123 0.0624241001 -0.004229122 -0.065715077
#> [8,] -0.060327495 0.0541560164 -0.0120403157 0.006347347 0.013823671
#> [9,] 0.001811795 0.0413780998 -0.0017842727 0.013216860 0.011377649
#> [,17] [,18] [,19] [,20] [,21]
#> [1,] 0.006574365 0.0142513546 -0.015687097 0.004153572 -0.0267560164
#> [2,] 0.013576656 0.0065195926 -0.045470469 0.012075843 -0.0195736988
#> [3,] 0.026955894 0.0410597382 -0.012563655 0.042257113 -0.0121020573
#> [4,] 0.021089254 -0.0180070114 -0.008133418 -0.018890843 0.0105690698
#> [5,] -0.076323753 -0.0350496755 -0.008406716 0.034844980 0.0103866578
#> [6,] 0.048854666 0.0086853028 -0.048182714 0.014274344 0.0002699021
#> [7,] 0.013383474 0.0117646656 0.010714212 -0.034100490 0.0036167020
#> [8,] -0.018340186 -0.0218276283 0.019843725 -0.006698021 -0.0063340830
#> [9,] -0.029967030 0.0008949147 0.017553810 -0.012721574 0.0005556028
#> [,22] [,23] [,24] [,25] [,26]
#> [1,] 0.0032073841 0.025550818 0.006177367 -0.001367755 0.013499145
#> [2,] -0.0324343551 -0.008357889 -0.025952678 -0.001614120 0.020565722
#> [3,] -0.0425800575 -0.003749280 0.016808046 0.002608105 -0.006910275
#> [4,] 0.0091256685 0.013576883 0.005271881 0.016861267 -0.002413011
#> [5,] -0.0195211104 0.011019897 0.015366656 -0.006629253 -0.009160288
#> [6,] 0.0007377195 0.010757180 -0.008698215 -0.010504311 -0.006853833
#> [7,] 0.0324237631 0.043696429 -0.027788578 0.010868877 0.007230498
#> [8,] 0.0069402682 0.003019522 -0.008009728 0.005718466 -0.012285961
#> [9,] -0.0047985308 0.028955210 -0.012532520 0.002963050 -0.002174888
#> [,27] [,28] [,29] [,30] [,31]
#> [1,] 0.003537188 -0.0007890453 0.001685053 -0.0050309638 -0.0008428695
#> [2,] 0.014444936 0.0075454041 0.004263813 -0.0041346853 -0.0192121473
#> [3,] 0.001778350 0.0044941310 0.012428052 -0.0083995696 -0.0105604921
#> [4,] -0.009964094 -0.0008396966 0.002348205 -0.0091145189 -0.0051178256
#> [5,] 0.009746281 -0.0094594537 -0.001390487 0.0087220748 0.0035393640
#> [6,] -0.007962511 0.0112009332 0.023512699 -0.0108237766 -0.0021278339
#> [7,] 0.005980151 0.0094508494 -0.006098991 0.0006228215 -0.0047644099
#> [8,] 0.020797073 -0.0081857971 -0.010308318 -0.0053089752 -0.0071784990
#> [9,] -0.014742547 0.0064889225 -0.004597424 -0.0082689747 0.0010918260
#> [,32] [,33] [,34] [,35] [,36]
#> [1,] -0.008490014 -0.0046871200 1.610778e-03 -0.004047376 3.033316e-04
#> [2,] 0.004724829 0.0117836175 1.609484e-03 -0.005814272 1.542606e-03
#> [3,] -0.004413048 -0.0022454101 2.575943e-03 -0.007005635 3.502420e-04
#> [4,] 0.007859258 -0.0003207657 2.171585e-05 -0.010717622 -1.962025e-03
#> [5,] 0.001999805 0.0005566635 3.864229e-03 0.003798089 -6.720897e-04
#> [6,] -0.005358123 -0.0027685614 2.421547e-03 0.003371046 7.524260e-03
#> [7,] 0.001182795 -0.0163754685 3.255335e-03 -0.001328657 -8.627374e-05
#> [8,] 0.001990046 -0.0021984130 3.168247e-03 -0.004204371 -6.964236e-03
#> [9,] 0.005891474 0.0002430765 8.876326e-03 -0.003944555 -3.729823e-03
#> [,37] [,38] [,39] [,40] [,41]
#> [1,] 0.004111784 -0.0015034383 -0.0025011873 0.001331302 0.0003766385
#> [2,] 0.010389741 0.0030539531 -0.0026386747 -0.003961867 0.0127635317
#> [3,] -0.002255048 -0.0059407806 0.0006276243 0.005817946 0.0028752923
#> [4,] 0.001310923 -0.0037669768 -0.0081718725 -0.003468251 0.0024192257
#> [5,] -0.003965735 -0.0071452496 -0.0032907831 -0.001528843 0.0024511320
#> [6,] 0.003116518 0.0003240906 0.0027884664 0.007382291 -0.0017420727
#> [7,] -0.004733518 -0.0008216778 -0.0010818387 0.001727538 -0.0011102314
#> [8,] -0.004930120 0.0062972215 -0.0011263122 0.003505483 0.0034801278
#> [9,] 0.001159732 -0.0001525715 0.0028871883 0.001138202 0.0028968057
#> [,42] [,43] [,44] [,45] [,46]
#> [1,] 1.057583e-03 -0.001431964 0.0016795152 0.001853313 -1.436966e-03
#> [2,] -6.005699e-05 0.004284837 0.0025802398 0.004482081 2.817188e-03
#> [3,] -9.628237e-03 -0.002763071 0.0003857475 -0.002507337 6.797740e-06
#> [4,] 1.596001e-03 -0.003078368 -0.0015407219 -0.001817679 -1.775488e-03
#> [5,] -1.141601e-03 0.001591523 -0.0017520401 -0.002006257 1.108604e-03
#> [6,] 2.651317e-03 0.004136998 0.0008847882 0.001043647 -3.918477e-03
#> [7,] -1.708714e-03 0.004794055 0.0037937484 0.001711143 -4.602688e-04
#> [8,] -4.880664e-03 0.001446662 0.0042118492 0.002714483 2.271767e-03
#> [9,] 3.108767e-03 0.001633721 -0.0039760657 0.002439156 -5.831713e-04
#> [,47] [,48] [,49] [,50]
#> [1,] 0.0007140320 0.0004296215 0.0010826680 -0.0026113729
#> [2,] -0.0012541313 0.0012474019 -0.0016342849 0.0001255411
#> [3,] 0.0003189359 0.0015240522 -0.0001826089 0.0001470047
#> [4,] -0.0024891632 -0.0011222909 0.0002067831 0.0002093210
#> [5,] 0.0009123700 -0.0004095611 0.0004083105 -0.0021247355
#> [6,] 0.0015813397 -0.0019715153 -0.0009363010 0.0002653162
#> [7,] -0.0014837409 0.0013014645 0.0020721848 0.0002390579
#> [8,] -0.0039650023 0.0005868817 -0.0009389637 0.0017565918
#> [9,] -0.0023634624 0.0012895675 -0.0020716215 0.0006108966
Note that weights are scaled within the function to sum to one, so the size of the weights relative to one another is what matters. We can see that weighting the RMSEA value more than the CFI value caused the RMSEA value to be closer to the target value and the CFI value to be further from the target value. We could have chosen to weight the CFI value instead:
TKL_m4 <- noisemaker(mod, method = "TKL",
target_rmsea = 0.05,
target_cfi = 0.95,
tkl_ctrl = list(weights = c(rmsea = 1, cfi = 4)))
TKL_m4
#> $Sigma
#> V1 V2 V3 V4 V5 V6 V7
#> V1 1.00000000 0.28483335 0.21026877 0.09857145 0.13270816 0.16631035 0.05880126
#> V2 0.28483335 1.00000000 0.26692635 0.10176426 0.11956441 0.09528821 0.08041670
#> V3 0.21026877 0.26692635 1.00000000 0.08556588 0.05908964 0.04239617 0.15354472
#> V4 0.09857145 0.10176426 0.08556588 1.00000000 0.38640608 0.36964432 0.14091721
#> V5 0.13270816 0.11956441 0.05908964 0.38640608 1.00000000 0.35254316 0.10517728
#> V6 0.16631035 0.09528821 0.04239617 0.36964432 0.35254316 1.00000000 0.10769711
#> V7 0.05880126 0.08041670 0.15354472 0.14091721 0.10517728 0.10769711 1.00000000
#> V8 0.09366299 0.12251543 0.09811507 0.12011159 0.18027190 0.12441720 0.47852244
#> V9 0.15477836 0.07630786 0.07651503 0.12123237 0.11557836 0.17774551 0.49243127
#> V8 V9
#> V1 0.09366299 0.15477836
#> V2 0.12251543 0.07630786
#> V3 0.09811507 0.07651503
#> V4 0.12011159 0.12123237
#> V5 0.18027190 0.11557836
#> V6 0.12441720 0.17774551
#> V7 0.47852244 0.49243127
#> V8 1.00000000 0.46019851
#> V9 0.46019851 1.00000000
#>
#> $rmsea
#> [1] 0.07125063
#>
#> $cfi
#> [1] 0.9543326
#>
#> $fn_value
#> [1] 0.04213395
#>
#> $m
#> [1] NA
#>
#> $v
#> [1] 0.2695082
#>
#> $eps
#> [1] 0
#>
#> $W
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] -7.468408e-03 -0.073081584 -0.015751421 -0.02598904 -0.041458551
#> [2,] 2.307966e-05 0.042015281 0.034302801 -0.07965560 0.046176354
#> [3,] -5.349675e-02 0.090277027 0.085768427 -0.14183987 0.070419473
#> [4,] -7.976476e-02 -0.028951643 0.142166894 0.03361089 0.139809554
#> [5,] -2.851223e-02 -0.065481560 0.003234452 -0.02152061 -0.052303740
#> [6,] -4.004740e-02 -0.072639640 -0.047789537 0.09795611 0.004356784
#> [7,] -3.609853e-02 0.041225010 -0.058057743 -0.05975796 0.050093218
#> [8,] -1.223773e-01 0.001675039 -0.029041483 -0.02595667 -0.026657405
#> [9,] -6.718377e-03 -0.085698002 -0.019188355 0.03632128 0.026762016
#> [,6] [,7] [,8] [,9] [,10]
#> [1,] 0.0006668273 -0.05008407 -0.05276296 -0.045571215 0.021934372
#> [2,] 0.0853914684 0.01047982 -0.02625665 -0.034544887 -0.028018410
#> [3,] -0.0563561677 -0.06188905 -0.06988091 0.009334323 -0.094970901
#> [4,] 0.0142440999 -0.01924571 0.04673944 0.153902204 0.007486317
#> [5,] -0.0412978784 -0.04852736 0.05712947 -0.057949522 -0.065323143
#> [6,] -0.0620689072 0.02236864 -0.01852091 -0.122986896 0.036834744
#> [7,] 0.0584065287 -0.04530143 -0.07930698 -0.006444826 0.041369204
#> [8,] -0.0302474193 -0.04483545 0.03157288 -0.044595497 0.016792259
#> [9,] 0.0729190449 -0.04327465 -0.03846018 -0.097736459 -0.046703926
#> [,11] [,12] [,13] [,14] [,15]
#> [1,] 0.065168425 0.088794426 0.070649045 0.055161255 -0.126641795
#> [2,] -0.024851966 -0.068684871 0.058061163 -0.086919369 -0.018249146
#> [3,] -0.008554319 0.091818055 0.020536805 -0.095150350 0.021180384
#> [4,] -0.064469196 -0.005607196 0.024879708 0.002255707 -0.014344437
#> [5,] -0.051720658 -0.099057567 0.075696312 0.018020518 -0.058648379
#> [6,] 0.027913833 0.073699049 0.062849527 0.067639475 -0.006970332
#> [7,] -0.016019854 0.004521427 -0.003292798 -0.002009959 0.071649331
#> [8,] 0.034978138 0.051386581 0.019373462 0.022337571 -0.071647191
#> [9,] 0.037449488 0.087239255 0.076146672 0.058002242 0.063652409
#> [,16] [,17] [,18] [,19] [,20]
#> [1,] 0.093827167 -0.025262206 0.0931081090 0.14094208 0.004905348
#> [2,] 0.004084289 0.034529601 0.0150778564 -0.06911078 0.027052117
#> [3,] -0.053243183 -0.033680641 0.1078260674 -0.04485381 -0.008717821
#> [4,] 0.037299828 0.031493589 -0.0005216164 0.04206910 0.027925923
#> [5,] 0.004157236 0.033755690 -0.0514809856 0.10307933 -0.015299171
#> [6,] 0.204402993 -0.015927511 -0.0028858725 0.06994543 -0.018152985
#> [7,] -0.103411344 -0.002328876 0.0042780506 -0.02503555 -0.013601917
#> [8,] -0.010778049 0.126548198 -0.0828719900 -0.03603963 0.033948996
#> [9,] 0.066751246 0.069644771 -0.0077155658 0.07631988 0.036939122
#> [,21] [,22] [,23] [,24] [,25]
#> [1,] -0.073053282 0.087619200 -0.102574831 0.02673151 -0.08159759
#> [2,] -0.098708246 0.131360329 0.002060492 0.05338683 0.04603773
#> [3,] 0.045696526 -0.062422187 0.122638292 -0.02972751 0.10205390
#> [4,] 0.005618942 0.046941696 0.054697476 -0.01127961 -0.05149705
#> [5,] -0.008284353 0.008141488 -0.011666228 0.04293017 -0.05563369
#> [6,] -0.095571153 0.040008705 0.030411279 -0.01605599 -0.06115649
#> [7,] -0.030484336 0.028193310 0.095545913 -0.05147415 -0.02452357
#> [8,] 0.010213336 -0.001090018 0.010076382 -0.07320513 0.03537094
#> [9,] -0.021879307 0.019716589 -0.025602825 0.12136242 0.03204262
#> [,26] [,27] [,28] [,29] [,30]
#> [1,] 0.06044509 0.085039159 -0.1018074696 -0.009701554 0.037962930
#> [2,] 0.16137234 0.027750842 -0.0669598762 -0.029544687 0.007140742
#> [3,] -0.02066114 0.077341826 0.0321707796 0.062678083 0.042550022
#> [4,] 0.09593036 -0.002943973 0.0012288714 -0.069856018 -0.009033383
#> [5,] -0.01491173 0.093123192 -0.0893102726 -0.164510187 -0.078635282
#> [6,] 0.05265905 -0.004315610 0.0341087162 0.044502610 0.019822715
#> [7,] -0.05294989 0.049125638 0.0420936700 0.002414404 -0.121927799
#> [8,] 0.01464720 -0.018320741 -0.0071540877 -0.005764862 -0.052404868
#> [9,] -0.03435655 -0.048453550 -0.0007372173 -0.017600891 -0.002678721
#> [,31] [,32] [,33] [,34] [,35]
#> [1,] -0.0207957188 0.060450489 -0.12724034 -0.036292412 0.012918968
#> [2,] -0.1655345928 -0.099051508 0.01614864 -0.009545701 0.061921826
#> [3,] 0.0299500508 -0.031623429 0.09584462 -0.062594505 0.063562785
#> [4,] -0.0334045524 0.171291126 0.03627542 0.054332666 0.074447067
#> [5,] -0.0361041612 0.032142750 0.05758509 -0.050043317 0.077799628
#> [6,] 0.0002165226 -0.005180024 -0.03155556 0.019413834 0.016844265
#> [7,] 0.0718646494 0.052391794 0.01597160 0.046592746 0.009194099
#> [8,] 0.0157001393 -0.012955426 0.05879044 -0.062817293 -0.050767170
#> [9,] 0.0378713699 0.027974724 -0.05979745 0.046019241 -0.054455408
#> [,36] [,37] [,38] [,39] [,40]
#> [1,] -0.026197701 -0.016877803 -0.03046911 -0.04022272 0.0004141723
#> [2,] -0.161143612 0.074868804 -0.02143118 -0.07449280 0.0083010087
#> [3,] -0.005894129 0.099402582 0.08534328 -0.03841104 -0.0094910243
#> [4,] 0.045975617 -0.042001374 -0.01681961 -0.06902186 0.0488432840
#> [5,] -0.056301732 0.001291697 -0.03293720 0.03355524 0.0078071051
#> [6,] -0.073130580 -0.018485514 -0.03781774 -0.08850279 -0.0443659208
#> [7,] 0.067220161 0.099423501 0.02393904 -0.05237701 0.0754768753
#> [8,] -0.051258199 0.031391828 -0.01697488 0.00144632 -0.0156177916
#> [9,] 0.040840523 -0.080109075 -0.02446421 -0.07718233 0.0274739790
#> [,41] [,42] [,43] [,44] [,45]
#> [1,] 0.06024646 -0.066328217 0.024563806 -0.037813464 -0.107019865
#> [2,] 0.08375862 -0.019895741 0.034615221 -0.002885300 -0.003211088
#> [3,] -0.08872317 -0.069090735 0.003463784 0.012677320 -0.025035465
#> [4,] 0.05826579 -0.026493843 -0.046283200 -0.034829960 -0.008363300
#> [5,] 0.04896696 0.033165048 -0.003667728 -0.016744834 0.069000335
#> [6,] 0.05370947 0.013709130 -0.054935847 0.061819835 -0.071574521
#> [7,] -0.04864679 0.048087936 0.004999197 -0.009675023 -0.014210927
#> [8,] 0.12800500 0.025929494 -0.018486659 0.013367066 0.135676571
#> [9,] -0.11671339 0.005038408 -0.005323779 0.016625431 -0.066507904
#> [,46] [,47] [,48] [,49] [,50]
#> [1,] 0.0387767538 0.057006047 0.0033162957 -0.0548256286 -0.061486394
#> [2,] -0.0001166266 0.069724631 -0.0162056168 -0.0095966219 -0.004348628
#> [3,] 0.0259415163 -0.044423463 -0.0008379317 -0.0317665226 -0.034129312
#> [4,] -0.0323973451 -0.064725617 0.0251408671 0.0073563687 0.027231135
#> [5,] -0.0604319379 -0.044413616 0.0218237813 -0.1180315507 -0.094935242
#> [6,] 0.0443703387 -0.067044614 -0.0246112470 0.0090405862 0.087765921
#> [7,] 0.0407415950 -0.095344684 0.0615672298 0.0008330454 0.072050241
#> [8,] -0.0921254433 0.016504963 -0.0019412360 -0.0850523546 -0.044787401
#> [9,] 0.0394688353 -0.006528407 -0.0061096052 0.0124158245 -0.030137144
In addition to generating population correlation matrices with particular RMSEA and CFI values, we might also want to ensure that minor factors are clearly distinct from major factors. After all, if minor factors have many moderate or large factor loadings, they can’t justifiably be called minor factors anymore and would likely be of theoretical interest.
The noisemaker()
function allows us to limit the number
of factor loadings for each minor factor that exceed a user-specified
threshold. For instance, perhaps we consider a factor with more than two
factor loadings greater than or equal to .3 (in absolute value) to be of
theoretical interest (i.e., not a minor factor). The factor loading
threshold can be set using the WmaxLoading
argument in the
tkl_ctrl
list. The maximum number of loadings greater (in
absolute value) than the threshold for any minor factor can be set using
the NWmaxLoading
argument in the tkl_ctrl
list. For example:
TKL_m5 <- noisemaker(mod, method = "TKL",
target_rmsea = 0.05,
target_cfi = 0.95,
tkl_ctrl = list(WmaxLoading = 0.3,
NWmaxLoading = 2))
TKL_m5
#> $Sigma
#> V1 V2 V3 V4 V5 V6 V7
#> V1 1.00000000 0.30198850 0.33811241 0.08988974 0.02688668 0.1308194 0.13262580
#> V2 0.30198850 1.00000000 0.30418246 0.09733466 0.09777602 0.1641290 0.10968412
#> V3 0.33811241 0.30418246 1.00000000 0.13833097 0.05433709 0.1271550 0.10855636
#> V4 0.08988974 0.09733466 0.13833097 1.00000000 0.38319969 0.3307456 0.08924264
#> V5 0.02688668 0.09777602 0.05433709 0.38319969 1.00000000 0.3297888 0.13714186
#> V6 0.13081939 0.16412900 0.12715503 0.33074562 0.32978879 1.0000000 0.13518541
#> V7 0.13262580 0.10968412 0.10855636 0.08924264 0.13714186 0.1351854 1.00000000
#> V8 0.08032391 0.11532716 0.10887450 0.12351578 0.08945259 0.1417993 0.50840262
#> V9 0.12707157 0.11365518 0.14145068 0.11204900 0.11651128 0.1632565 0.51008926
#> V8 V9
#> V1 0.08032391 0.1270716
#> V2 0.11532716 0.1136552
#> V3 0.10887450 0.1414507
#> V4 0.12351578 0.1120490
#> V5 0.08945259 0.1165113
#> V6 0.14179929 0.1632565
#> V7 0.50840262 0.5100893
#> V8 1.00000000 0.5049611
#> V9 0.50496115 1.0000000
#>
#> $rmsea
#> [1] 0.06497509
#>
#> $cfi
#> [1] 0.9650698
#>
#> $fn_value
#> [1] 0.09027057
#>
#> $m
#> [1] NA
#>
#> $v
#> [1] 0.3723792
#>
#> $eps
#> [1] 0
#>
#> $W
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] -0.11290601 -0.034182292 -0.039693904 -0.120121611 -0.018656043
#> [2,] 0.02384837 0.086257809 -0.066049522 0.115908352 0.056263366
#> [3,] -0.03914306 0.021832397 -0.149245536 0.039400309 0.062715203
#> [4,] 0.10548084 -0.002597967 -0.044839161 -0.025981077 0.002376464
#> [5,] 0.02862958 -0.073897614 0.048733483 0.149965658 -0.015961796
#> [6,] -0.07213398 -0.065836986 -0.077555902 -0.002828674 0.018545042
#> [7,] -0.08417027 0.029653726 -0.074608521 0.121882214 -0.102427383
#> [8,] 0.01568066 -0.022698758 -0.029975055 0.001694033 -0.025694969
#> [9,] -0.01916772 0.069059157 0.009934948 0.034551040 0.113158338
#> [,6] [,7] [,8] [,9] [,10]
#> [1,] -0.07659000 0.0545752991 -0.19547839 0.2007129512 0.02289533
#> [2,] 0.06653723 0.0061161689 0.04631253 -0.0190884459 0.09617308
#> [3,] -0.11085387 -0.0276091362 0.01176992 0.0110487480 0.12209909
#> [4,] 0.16063491 0.0006729721 -0.06151636 -0.0149059316 0.03459386
#> [5,] 0.10884996 -0.0637402580 0.09135532 -0.0430645454 -0.04934808
#> [6,] 0.03657360 0.0127866944 -0.08886458 0.0596399868 -0.04102437
#> [7,] -0.08699965 0.0122478915 -0.11440640 -0.0339479430 -0.03934411
#> [8,] 0.02910212 -0.0048993983 -0.04691317 0.0001619108 0.04120578
#> [9,] -0.10383488 -0.0001780358 -0.07393955 -0.0175981357 -0.01471900
#> [,11] [,12] [,13] [,14] [,15]
#> [1,] 0.0656297715 0.04402985 -0.17199211 0.008251593 0.05521498
#> [2,] 0.1314625216 0.12632626 -0.11770208 -0.100909185 0.03032964
#> [3,] 0.0925429501 -0.08561153 -0.10600560 0.005672689 -0.03820858
#> [4,] -0.0995300856 -0.07779835 -0.09199638 -0.047633337 -0.02504917
#> [5,] 0.0318129662 0.07157427 0.13934187 -0.007071042 0.04084166
#> [6,] 0.0008687602 0.06274884 0.07145891 -0.083037572 0.05175146
#> [7,] 0.0056046625 0.05598853 -0.00705331 -0.010576101 0.03067500
#> [8,] -0.0124548334 0.03317514 0.06703282 0.103770188 0.02242027
#> [9,] -0.0790173786 -0.02941097 0.14117874 0.113947340 -0.11120676
#> [,16] [,17] [,18] [,19] [,20]
#> [1,] -0.009856373 -0.04380659 -0.128868380 -0.159829758 0.10268293
#> [2,] -0.054443395 -0.04092618 -0.008049485 -0.001731306 0.08470026
#> [3,] -0.049225674 0.01404259 -0.133052925 0.032927052 0.04604937
#> [4,] -0.022158006 0.03889879 -0.075936351 0.056913262 -0.01246552
#> [5,] -0.059107004 -0.02820776 -0.041509309 0.068482614 0.05774334
#> [6,] -0.006709029 -0.02388680 -0.041300345 0.043293284 -0.04363278
#> [7,] -0.082105429 0.03333717 0.059648563 -0.055311679 -0.05651081
#> [8,] 0.025650572 -0.05937482 -0.004466891 0.060833690 -0.15220188
#> [9,] -0.029294639 -0.01003089 -0.058505060 0.003950322 0.01206567
#> [,21] [,22] [,23] [,24] [,25]
#> [1,] -0.045484985 0.03770115 0.041856515 -0.02855487 -0.05397983
#> [2,] -0.010977786 -0.06532895 0.068150998 -0.02914095 -0.02775441
#> [3,] -0.177791170 0.07648635 -0.059746579 -0.03366000 0.04579652
#> [4,] -0.082049276 0.08114404 0.003066938 -0.04070391 0.02772780
#> [5,] -0.005847888 0.05916551 0.156539271 -0.03753204 -0.08080342
#> [6,] 0.058778352 -0.19477780 -0.032499628 -0.06829400 0.08428764
#> [7,] 0.013648802 0.00925488 0.047644807 -0.03621628 0.08308170
#> [8,] 0.043800737 0.10380040 -0.047693440 -0.02267642 0.10128636
#> [9,] -0.064435355 -0.01069548 0.066512314 0.01208982 -0.07639058
#> [,26] [,27] [,28] [,29] [,30]
#> [1,] 0.058339505 -0.006755446 0.02528340 0.01793088 -0.051454579
#> [2,] 0.049423733 0.063542487 -0.01082899 -0.08383243 -0.090288884
#> [3,] 0.094079578 0.100787584 -0.05476848 0.02284004 0.064358000
#> [4,] 0.120126797 0.107326061 -0.05636511 0.01250465 -0.041585868
#> [5,] 0.098644297 0.024869020 0.03696616 0.01679381 -0.008864592
#> [6,] 0.055540754 -0.015091560 -0.11334796 -0.01955632 0.041292572
#> [7,] -0.002345741 0.029309934 0.04814328 -0.11098242 0.034425926
#> [8,] -0.006234190 -0.017627695 0.03068467 -0.13704789 -0.026867927
#> [9,] -0.025775550 -0.062613785 -0.05431909 -0.08064921 -0.033750922
#> [,31] [,32] [,33] [,34] [,35]
#> [1,] -0.126907724 0.028770732 0.034320217 -0.028851625 -0.007631349
#> [2,] -0.109641610 0.025789882 0.028433243 0.006606924 -0.065746533
#> [3,] -0.133873339 0.039667191 -0.048264153 -0.049507984 -0.101259690
#> [4,] 0.101959256 0.111584002 -0.006037681 0.057868378 -0.086107953
#> [5,] 0.041441164 0.064439193 -0.008955327 -0.114141036 -0.035419387
#> [6,] -0.165391445 0.023814299 0.078781712 0.010829779 -0.031849409
#> [7,] 0.030052311 -0.039313293 0.015393270 0.001677893 0.091340312
#> [8,] 0.004359401 0.024384865 0.019846675 0.072110176 -0.087805577
#> [9,] -0.015998660 0.008834564 0.146313969 -0.014013763 0.023795605
#> [,36] [,37] [,38] [,39] [,40]
#> [1,] -0.014424210 -0.061953272 -0.076120655 -0.025005785 -0.005825526
#> [2,] -0.127264962 0.051302843 -0.049109692 -0.003333468 -0.096599503
#> [3,] 0.040070202 -0.065989946 -0.118150089 -0.044725154 0.085253139
#> [4,] -0.140535500 0.040264185 0.009930278 0.015504887 0.007051443
#> [5,] -0.027829120 -0.014659844 0.100687478 0.006275206 0.098186085
#> [6,] 0.003879238 0.026993936 0.013572248 -0.149163638 0.069692715
#> [7,] -0.045171921 -0.066864773 0.033921085 0.054852575 0.091012240
#> [8,] -0.095875169 -0.064811413 -0.101295555 0.010543009 -0.091235121
#> [9,] -0.024899077 -0.006502899 -0.096094227 -0.060674538 0.036184132
#> [,41] [,42] [,43] [,44] [,45]
#> [1,] 0.023612957 0.053819780 0.03265040 0.029638576 0.022658824
#> [2,] 0.001620586 0.056691081 0.09011917 0.123142631 0.060879565
#> [3,] -0.045614656 0.003659586 -0.03620795 -0.003247166 0.134423893
#> [4,] -0.018778958 0.054969691 -0.03326767 -0.052697193 0.101290772
#> [5,] 0.121016488 0.019167329 -0.01553250 -0.131759417 -0.083828387
#> [6,] -0.006825422 -0.044528475 0.07461254 0.079292670 0.140668699
#> [7,] -0.024740755 0.116107615 -0.03055127 -0.057146003 0.008962221
#> [8,] -0.059987731 -0.127234310 -0.01198647 0.059509469 -0.026407561
#> [9,] -0.030939587 0.052787395 0.04971554 0.007485105 0.115849658
#> [,46] [,47] [,48] [,49] [,50]
#> [1,] 0.06489690 0.065052782 -0.017278922 0.030351422 0.07991724
#> [2,] -0.03881112 -0.129961471 -0.067005181 -0.090891960 0.14758648
#> [3,] 0.01035919 0.013220669 0.090587622 -0.064264383 0.01979246
#> [4,] 0.10429088 -0.013825649 0.001338282 0.136015304 -0.07582920
#> [5,] -0.02229282 -0.043576484 0.050790075 0.047188112 0.03366711
#> [6,] -0.05623319 -0.039453792 -0.026743379 -0.046984624 0.07739137
#> [7,] -0.03528126 0.107831325 0.011257511 -0.045410948 0.12139185
#> [8,] -0.07176411 0.029403355 0.070584461 -0.062880464 0.05540455
#> [9,] 0.01577404 -0.009027972 0.042186295 0.009269373 0.08854274
Nothing in the output is substantially different from the previous examples, but a penalty is added to the objective function to try to enforce solutions such that no minor factor has more than two factor loadings greater than 0.3 in absolute value. These restrictions can make optimization more difficult, particularly when target RMSEA values are relatively high. Moreover, the penalty provides no guarantee that the constraints on the minor factor loadings will be satisfied. In general, the constraints are likely to be violated when only a (relatively large) target RMSEA value is specified and when the input (error-free) population matrix has many factors, many items per factor, and relatively low factor loadings. On the other hand, the default constraints are much less likely to be violated if a reasonably large target CFI value is specified (e.g., CFI > .90).
v
and eps
By default, the tkl()
function uses a bounded
optimization procedure to ensure that the values of v
and
eps
fall between 0 and 1. Actually, the default lower
boundary for v
is 0.001 so that the optimization procedure
produces a solution with at least some model error, but otherwise it is
assumed that the user has no a priori knowledge of reasonable
values of v
and eps
. However,
noisemaker()
allows the user to set custom bounds on
v
and eps
in case they do have prior knowledge
of reasonable parameter values. For instance, a user might consider it
unlikely that the minor common factors would account for more than 20%
of the unique variance. In that case, they could set the upper-bound of
v
:
TKL_m6 <- noisemaker(mod, method = "TKL",
target_rmsea = 0.05,
target_cfi = 0.95,
tkl_ctrl = list(v_bounds = c(0, .2),
eps_bounds = c(0, 1)))
TKL_m6
#> $Sigma
#> V1 V2 V3 V4 V5 V6 V7
#> V1 1.00000000 0.30475277 0.27216745 0.04274508 0.03410750 0.10987486 0.11181353
#> V2 0.30475277 1.00000000 0.24209300 0.07744705 0.03315241 0.10621574 0.09298799
#> V3 0.27216745 0.24209300 1.00000000 0.12003973 0.08062471 0.11474994 0.14946324
#> V4 0.04274508 0.07744705 0.12003973 1.00000000 0.35019217 0.36139584 0.14584604
#> V5 0.03410750 0.03315241 0.08062471 0.35019217 1.00000000 0.35403121 0.14184262
#> V6 0.10987486 0.10621574 0.11474994 0.36139584 0.35403121 1.00000000 0.16183743
#> V7 0.11181353 0.09298799 0.14946324 0.14584604 0.14184262 0.16183743 1.00000000
#> V8 0.05913435 0.07096606 0.06228696 0.15599582 0.14958265 0.07507202 0.46803141
#> V9 0.06754831 0.04301273 0.13994697 0.13180909 0.17093535 0.11423506 0.50822208
#> V8 V9
#> V1 0.05913435 0.06754831
#> V2 0.07096606 0.04301273
#> V3 0.06228696 0.13994697
#> V4 0.15599582 0.13180909
#> V5 0.14958265 0.17093535
#> V6 0.07507202 0.11423506
#> V7 0.46803141 0.50822208
#> V8 1.00000000 0.49443925
#> V9 0.49443925 1.00000000
#>
#> $rmsea
#> [1] 0.06447525
#>
#> $cfi
#> [1] 0.9628491
#>
#> $fn_value
#> [1] 0.0749263
#>
#> $m
#> [1] NA
#>
#> $v
#> [1] 0.2
#>
#> $eps
#> [1] 0.05415514
#>
#> $W
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] -0.15433660 0.02946464 -0.21477804 0.131844178 0.094133250
#> [2,] -0.06945117 -0.07926110 -0.06521713 0.048589216 0.030529310
#> [3,] -0.05118745 0.06497132 -0.07884902 0.117900197 -0.187610636
#> [4,] -0.01754176 0.08136351 0.03846052 -0.206979551 -0.120028897
#> [5,] 0.16504638 0.02591515 0.18173538 0.059307200 0.029928988
#> [6,] -0.09188649 0.20133325 0.03333598 0.098468145 0.003964936
#> [7,] 0.04933283 0.20917767 -0.03584977 0.042534807 -0.143232106
#> [8,] 0.06779621 -0.08058614 0.07117458 -0.081305608 0.051874952
#> [9,] 0.02671015 0.04190445 0.07570703 -0.004460811 -0.037601100
#> [,6] [,7] [,8] [,9] [,10]
#> [1,] 0.069890102 -0.03080900 -0.01938888 0.01540748 -0.023310233
#> [2,] 0.235670598 -0.06545252 0.03654885 0.06424699 0.010287266
#> [3,] -0.088504956 0.02428374 0.15484070 0.05582622 0.067468600
#> [4,] -0.041553660 -0.05506407 -0.02032930 0.08669555 0.115126586
#> [5,] -0.083101762 0.06184983 -0.00133322 -0.11742779 -0.014074075
#> [6,] 0.133394797 -0.03598911 0.01766448 -0.08383649 -0.023914681
#> [7,] 0.009239604 0.05876027 -0.03866514 -0.07252748 0.012083374
#> [8,] -0.151730445 -0.01440272 -0.18663273 0.02079875 0.063103707
#> [9,] -0.183534752 -0.07731370 0.11295802 -0.09591918 0.007793953
#> [,11] [,12] [,13] [,14] [,15]
#> [1,] -0.008904468 -0.016414408 0.004926935 0.057017876 0.063963652
#> [2,] -0.033978417 0.039541143 -0.041420277 0.125839469 0.033149571
#> [3,] 0.038708238 0.045064686 -0.025570800 0.041791593 0.029500562
#> [4,] 0.018195394 0.013832198 0.049592758 -0.025356033 0.013700491
#> [5,] 0.143751111 0.028092581 0.063090374 -0.014099810 0.001469722
#> [6,] -0.008531096 -0.034129710 0.003308390 -0.073032011 -0.041024064
#> [7,] 0.006131603 0.010017340 0.012064859 0.048255665 0.097979207
#> [8,] -0.049851705 0.029007597 0.010258709 0.001930309 -0.031307589
#> [9,] 0.056154747 -0.006413724 0.010681166 -0.003091859 0.085914322
#> [,16] [,17] [,18] [,19] [,20]
#> [1,] -0.01863674 -0.0252206319 0.103052844 0.032991742 0.002802110
#> [2,] 0.02594079 0.1247810257 -0.065537549 0.066644922 0.008516382
#> [3,] -0.12652043 -0.0002120989 0.012573205 -0.072878567 -0.095706057
#> [4,] -0.10024828 0.0680538781 -0.053597866 0.001907791 -0.015211187
#> [5,] -0.01712478 0.0316164216 0.054930973 -0.021811010 0.011296599
#> [6,] -0.08960218 0.0311414607 -0.075918566 0.001222964 -0.108718071
#> [7,] 0.00472198 0.0202992372 -0.033071407 -0.004546141 0.012248630
#> [8,] 0.01756193 0.0096763890 -0.040749179 -0.037178074 -0.008537261
#> [9,] 0.04235219 -0.0323032220 0.002153668 -0.073199197 0.016964991
#> [,21] [,22] [,23] [,24] [,25]
#> [1,] 0.047015795 -0.073566532 -0.000167080 -0.043003531 0.02937206
#> [2,] 0.086542816 0.013660017 -0.003418471 0.018768978 -0.05086231
#> [3,] 0.029782028 0.005662719 0.013841866 -0.032178857 0.02549747
#> [4,] 0.081882839 -0.029650247 0.021548243 -0.013004174 0.01196659
#> [5,] 0.039201987 -0.021954134 -0.000465492 -0.027174876 -0.03283844
#> [6,] 0.012123275 0.018024915 0.013615853 0.021458822 0.01046088
#> [7,] 0.008001434 -0.010587127 0.022559771 -0.003849316 0.02250807
#> [8,] 0.054615960 -0.006962974 0.017204301 0.011932166 -0.02252696
#> [9,] -0.036712231 0.017387514 0.042464995 0.018932729 0.01507441
#> [,26] [,27] [,28] [,29] [,30]
#> [1,] -0.0563836206 0.0777097499 0.014946115 -0.0009142863 0.0173048197
#> [2,] -0.0349452398 0.0163879471 -0.041719191 -0.0246960205 0.0366921229
#> [3,] -0.0005613224 -0.0001704557 -0.063121875 0.0284486043 0.0148471574
#> [4,] 0.0046227397 -0.0553531796 -0.010110722 -0.0102145590 0.0006534677
#> [5,] -0.0124255039 -0.0058888248 -0.003784531 -0.0019601903 0.0138754044
#> [6,] 0.0329608446 0.0213530185 -0.003669499 -0.0006511610 0.0076486707
#> [7,] -0.0486958381 0.0175475686 -0.029703758 -0.0011496332 -0.0119950311
#> [8,] -0.0217183691 0.0091964437 -0.013013540 0.0100675600 0.0164257130
#> [9,] 0.0440061287 0.0365919906 -0.044651045 0.0209392219 0.0036109512
#> [,31] [,32] [,33] [,34] [,35]
#> [1,] 1.370980e-02 0.028184352 -0.011479300 0.001126885 -0.030623542
#> [2,] 2.298229e-02 0.007439780 0.008100770 -0.010783125 -0.017429557
#> [3,] 6.682096e-03 0.016042785 0.008006946 -0.001517539 0.002426600
#> [4,] -6.761072e-03 0.028433513 0.003569620 0.003188263 0.005087195
#> [5,] -2.572504e-02 0.027719552 -0.017402361 -0.001526889 -0.001041521
#> [6,] -3.550851e-02 -0.009471479 0.007500148 -0.006252863 -0.012910969
#> [7,] 3.629684e-02 -0.006961661 0.006874972 -0.007196133 0.008577102
#> [8,] 6.420916e-05 -0.005042713 -0.004105626 0.000466937 0.017221514
#> [9,] 1.159411e-02 0.021630568 0.010287067 -0.003527634 -0.009987711
#> [,36] [,37] [,38] [,39] [,40]
#> [1,] 0.0294842413 0.0005253239 0.0357324290 -0.0037400342 0.0050067917
#> [2,] -0.0216298896 -0.0188116633 -0.0076875074 0.0119023717 -0.0230699827
#> [3,] 0.0237575634 -0.0077208233 0.0136029006 -0.0016839731 0.0029081617
#> [4,] 0.0144458968 0.0159949693 0.0006018675 -0.0062694386 -0.0016295198
#> [5,] -0.0280521236 -0.0125799696 -0.0020980946 -0.0005932783 0.0002176906
#> [6,] 0.0050485930 -0.0085293093 -0.0051012367 0.0180658674 0.0112674459
#> [7,] 0.0109434599 0.0101201333 -0.0098219994 -0.0106429856 0.0158336833
#> [8,] -0.0097141602 0.0044260630 0.0147268697 -0.0032266805 -0.0024750764
#> [9,] -0.0001677036 -0.0089236660 0.0088043253 -0.0140466464 -0.0075184223
#> [,41] [,42] [,43] [,44] [,45]
#> [1,] 0.017684306 -1.078717e-04 -0.003594698 -0.019887766 0.0028070362
#> [2,] -0.008432719 1.250367e-03 0.014577426 -0.005268823 -0.0119576219
#> [3,] -0.005532296 2.704429e-02 0.014883127 -0.006300272 0.0008766833
#> [4,] -0.005132293 1.825130e-02 -0.014064429 0.013046633 -0.0090966477
#> [5,] 0.001734512 9.966103e-05 0.009021933 0.003918047 0.0031511766
#> [6,] -0.028846556 -3.621923e-03 -0.007977276 -0.005937313 -0.0003595646
#> [7,] -0.004324764 1.801528e-02 0.002052778 0.001994530 0.0119656512
#> [8,] 0.006568925 7.900486e-04 0.008317732 0.001054382 0.0023583112
#> [9,] 0.003711216 4.534519e-03 0.005261654 0.003316788 -0.0038483062
#> [,46] [,47] [,48] [,49] [,50]
#> [1,] -0.0055897788 0.011220938 -0.009714616 -0.0153546599 -0.0013561350
#> [2,] 0.0130526607 -0.007366174 -0.007368385 -0.0181989044 0.0054570244
#> [3,] -0.0006897546 0.015160266 0.003342576 -0.0007316266 -0.0082729044
#> [4,] -0.0069388793 -0.005094186 0.002310457 0.0071996194 0.0282455444
#> [5,] -0.0078554402 0.007456500 -0.014995819 0.0010780666 0.0018038259
#> [6,] 0.0117615791 0.011766855 0.004347669 0.0078415464 -0.0038792050
#> [7,] 0.0059348762 0.009856133 -0.009034391 0.0026710095 -0.0009071442
#> [8,] 0.0104040602 0.008344472 -0.007709444 0.0024489567 0.0030509692
#> [9,] -0.0055823132 -0.002448707 0.013921622 0.0128099208 0.0045731772
In contrast with the TKL method, the CB method is agnostic regarding how model error arises. Whereas the TKL method assumes that model error results from the influence of a large number of minor common factors, the CB method works by finding an error matrix E such that Σ = Ω(γ) + E, where Ω(γ) is a covariance structure model with a parameter vector γ such that Ω = Ω(γ0) for a particular parameter vector γ0. The CB method finds an E matrix such that three criteria are satisfied:
The objective function value is directly related to RMSEA by $\textrm{RMSEA} = \sqrt{F_m / df}$, where
Fm denotes
the objective function value and df denotes the model
degrees of freedom. Therefore, the CB method allows the user to generate
a Σ matrix with a particular
RMSEA value, which has made it popular for use in Monte Carlo simulation
studies. In the following example, I will demonstrate how to easily
generate Σ matrices using the
CB model error method and the noisemaker()
function.
We will use the same model we specified earlier to demonstrate how to
use the CB method and the noisemaker()
function to generate
a Σ matrix with a specified
RMSEA value.
CB_m1 <- noisemaker(mod, method = "CB", target_rmsea = 0.05)
CB_m1
#> $Sigma
#> V1 V2 V3 V4 V5 V6 V7
#> V1 1.00000000 0.24014436 0.26445813 0.08398151 0.03382039 0.12724758 0.09040253
#> V2 0.24014436 1.00000000 0.24539750 0.08460617 0.15368426 0.10707571 0.10328737
#> V3 0.26445813 0.24539750 1.00000000 0.09116845 0.07821993 0.05019601 0.09665439
#> V4 0.08398151 0.08460617 0.09116845 1.00000000 0.36893672 0.35675451 0.11434382
#> V5 0.03382039 0.15368426 0.07821993 0.36893672 1.00000000 0.35430877 0.11374916
#> V6 0.12724758 0.10707571 0.05019601 0.35675451 0.35430877 1.00000000 0.17446914
#> V7 0.09040253 0.10328737 0.09665439 0.11434382 0.11374916 0.17446914 1.00000000
#> V8 0.09456482 0.12770208 0.11782964 0.10294136 0.11014756 0.11280439 0.49198275
#> V9 0.12295933 0.10907719 0.08252264 0.11777167 0.12826406 0.15950884 0.48786634
#> V8 V9
#> V1 0.09456482 0.12295933
#> V2 0.12770208 0.10907719
#> V3 0.11782964 0.08252264
#> V4 0.10294136 0.11777167
#> V5 0.11014756 0.12826406
#> V6 0.11280439 0.15950884
#> V7 0.49198275 0.48786634
#> V8 1.00000000 0.49015091
#> V9 0.49015091 1.00000000
#>
#> $rmsea
#> [1] 0.05000006
#>
#> $cfi
#> [1] 0.977085
#>
#> $fn_value
#> [1] NA
#>
#> $m
#> [1] NA
#>
#> $v
#> [1] NA
#>
#> $eps
#> [1] NA
#>
#> $W
#> [1] NA
It is important to know that not all target RMSEA values will lead to
acceptable solutions. If the target RMSEA value is too large, Σ might become indefinite and the
noisemaker()
function will give an error:
CB_m1 <- noisemaker(mod, method = "CB", target_rmsea = 0.5)
#> Error: Sigma is indefinite.
#> ℹ The minimum eigenvalue is -0.18
Another notable aspect of the CB method is that it attempts to find solutions such that if the (major factor) model is applied to the generated population correlation matrix with model error (Σ) using maximum likelihood, the vector of population parameters, γ, will minimize the objective function.1 In practice, the CB method sometimes produces solution matrices that do not satisfy this requirement, particularly when major common factor loadings are relatively weak and the target RMSEA value is large.
In contrast to the TKL and CB methods, the WB method works by specifying a distribution for the population correlation matrix with model error, Σ. In particular, in the WB method Σ follows the inverse-Wishart distribution
(Σ|Ω, m) ∼ IWp(mΩ, m),
where m > p − 1 is a user-specified precision parameter. There is a useful relationship between m and RMSEA such that 1/m = ε2 + op(ε2) (where ε denotes RMSEA). Put another way, 1/m ≈ ε2 when m is large and ε is small. We can take advantage of this by choosing a target RMSEA value and then solving for m. For instance, if our target RMSEA value is 0.05, we get m = 0.05−2 = 400. Unfortunately, this approximation does not work particularly well when the target RMSEA value is large, particularly when the number of items (p) is also large.
The noisemaker()
function uses a somewhat ad
hoc solution to this problem; Given a particular model, the
get_wb_mod()
function uses the WB method to sample
n
correlation matrices from inverse Wishart distributions
using m values corresponding
to a reasonable range of target RMSEA values (e.g., 0.02 to 0.1). For
each target RMSEA value, the observed RMSEA value is calculated for each
simulated correlation matrix and the median observed RMSEA value is
calculated. Next, these data are used to fit the regression model
ε̂T = b0 + b1εobs + b2εobs2. The fitted model can then be used by plugging in the target RMSEA value to find an adjusted value that will lead to solutions with RMSEA values close to the desired level.
To demonstrate how this works, let’s use the model we specified
previously to generate a population correlation matrix using the WB
method and the noisemaker()
function. First, we’ll use the
get_wb_mod()
function to get a fitted model.
wb_mod <- get_wb_mod(
mod, # simFA() model specification
n = 50, # Number of matrices to simulate at each target RMSEA value
values = 10, # Number of target RMSEA values to test
lower = 0.01, # 'lower' and 'upper' are the endpoints of the RMSEA sequence
upper = 0.095
)
summary(wb_mod)
#>
#> Call:
#> stats::lm(formula = rmsea_values ~ poly(rmsea_medians, 2))
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> -0.0016987 -0.0010960 0.0002503 0.0008664 0.0018224
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 0.0525000 0.0004389 119.606 7.53e-13 ***
#> poly(rmsea_medians, 2)1 0.0856555 0.0013880 61.709 7.71e-11 ***
#> poly(rmsea_medians, 2)2 -0.0029049 0.0013880 -2.093 0.0747 .
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> Residual standard error: 0.001388 on 7 degrees of freedom
#> Multiple R-squared: 0.9982, Adjusted R-squared: 0.9976
#> F-statistic: 1906 on 2 and 7 DF, p-value: 2.635e-10
Now that we have a wb_mod
, let’s use it to simulate a
correlation matrix using the WB method.
noisemaker(mod, method = "WB", target_rmsea = 0.05, wb_mod = wb_mod)
#> $Sigma
#> V1 V2 V3 V4 V5 V6 V7
#> V1 1.0000000 0.25630017 0.27450464 0.12459890 0.10436564 0.12873469 0.1711865
#> V2 0.2563002 1.00000000 0.27950146 0.06011744 0.05387993 0.07943530 0.1104476
#> V3 0.2745046 0.27950146 1.00000000 0.10188466 0.09163268 0.05788158 0.1161640
#> V4 0.1245989 0.06011744 0.10188466 1.00000000 0.36226215 0.34305741 0.1142572
#> V5 0.1043656 0.05387993 0.09163268 0.36226215 1.00000000 0.36798687 0.1395108
#> V6 0.1287347 0.07943530 0.05788158 0.34305741 0.36798687 1.00000000 0.1391329
#> V7 0.1711865 0.11044758 0.11616403 0.11425718 0.13951080 0.13913286 1.0000000
#> V8 0.1302481 0.13658367 0.10804468 0.13196089 0.11684152 0.14117239 0.4823468
#> V9 0.1325976 0.15637306 0.13464741 0.14391781 0.11969401 0.12691267 0.5022176
#> V8 V9
#> V1 0.1302481 0.1325976
#> V2 0.1365837 0.1563731
#> V3 0.1080447 0.1346474
#> V4 0.1319609 0.1439178
#> V5 0.1168415 0.1196940
#> V6 0.1411724 0.1269127
#> V7 0.4823468 0.5022176
#> V8 1.0000000 0.5350151
#> V9 0.5350151 1.0000000
#>
#> $rmsea
#> [1] 0.04716415
#>
#> $cfi
#> [1] 0.9808255
#>
#> $fn_value
#> [1] NA
#>
#> $m
#> 1
#> 1186.501
#>
#> $v
#> [1] NA
#>
#> $eps
#> [1] NA
#>
#> $W
#> [1] NA
The observed RMSEA value isn’t exactly 0.05, but it’s relatively close. An important aspect of the WB method is that we’re only controlling the distribution from which the correlation matrices are sampled and therefore have less fine-grained control of RMSEA compared to the CB or TKL methods.
Another important note about the WB method is that if you don’t
provide a wb_mod
model to the noisemaker()
function when the “WB” method is specified, a model will be fitted when
the function is called. This is convenient when you want to simulate
only one correlation matrix, but will be much slower than providing a
wb_mod
if you’re planning to simulate many correlation
matrices using the same population factor model.
The same is also true when using ordinary least squares if the CB method is altered somewhat; see Cudeck and Browne (1992) for details.↩︎