Skip to content

Support for extended “xtarget” rotation (loadings + factor correlations) in efa() #421

@brianmsm

Description

@brianmsm

I would like to request that lavaan’s exploratory factor analysis blocks support extended target rotation, allowing the simultaneous specification of target values for both factor loadings and factor correlations, as implemented in Zhang, Hattori, & Trichtinger (2019).

It would be extremely helpful if lavaan could expose that same algorithm (or a compatible interface) so that users can:

  • specify a Target matrix for loadings and a PhiTarget matrix for correlations
  • choose between orthogonal vs. oblique rotation of that combined criterion

Below is a minimal reprex showing the current behavior (which is as expected) and an alternative way I am using now to do it from lavaan with the help of Marco Jimenez's bifactor package:

#> #remotes::install_github("marcosjnez/bifactor")
library(lavaan)
#> This is lavaan 0.6-19
#> lavaan is FREE software! Please report any bugs.

# ─── 1. A 30×30 covariance matrix (simulate example) ───────────────────
cov_matrix <- matrix(
  c(
    1.081, 0.536, 0.685, 0.721, 0.679, 0.593, 0.53, 0.593, 0.522, 0.508, 0.486,
    0.505, 0.611, 0.549, 0.551, 0.237, 0.178, 0.196, 0.148, 0.181, 0.196, 0.203,
    0.181, 0.191, 0.235, 0.18, 0.205, -0.05, 0.121, 0.137, 0.536, 0.937, 0.493,
    0.531, 0.446, 0.477, 0.463, 0.507, 0.382, 0.377, 0.419, 0.445, 0.508, 0.467,
    0.389, 0.105, 0.032, 0.095, 0.039, 0.067, 0.107, 0.093, 0.088, 0.139, 0.125,
    0.038, 0.141, 0.043, 0.04, 0.124, 0.685, 0.493, 1.017, 0.568, 0.569, 0.459,
    0.402, 0.45, 0.45, 0.36, 0.387, 0.445, 0.533, 0.49, 0.424, 0.176, 0.149,
    0.136, 0.057, 0.101, 0.224, 0.25, 0.158, 0.232, 0.291, 0.171, 0.208, -0.014,
    0.143, 0.167, 0.721, 0.531, 0.568, 1.047, 0.593, 0.527, 0.524, 0.532, 0.409,
    0.419, 0.384, 0.479, 0.561, 0.488, 0.48, 0.195, 0.184, 0.173, 0.179, 0.187,
    0.189, 0.165, 0.249, 0.135, 0.216, 0.185, 0.178, 0.019, 0.118, 0.143, 0.679,
    0.446, 0.569, 0.593, 0.987, 0.485, 0.399, 0.455, 0.378, 0.361, 0.398, 0.411,
    0.514, 0.426, 0.377, 0.255, 0.135, 0.099, 0.178, 0.176, 0.273, 0.22, 0.143,
    0.167, 0.207, 0.195, 0.16, -0.014, 0.161, 0.203, 0.593, 0.477, 0.459, 0.527,
    0.485, 1.063, 0.551, 0.629, 0.58, 0.576, 0.385, 0.403, 0.492, 0.357, 0.432,
    0.147, 0.146, 0.137, 0.145, 0.161, 0.145, 0.171, 0.183, 0.189, 0.232, 0.183,
    0.203, -0.023, 0.155, 0.148, 0.53, 0.463, 0.402, 0.524, 0.399, 0.551, 1.079,
    0.644, 0.464, 0.499, 0.436, 0.454, 0.549, 0.437, 0.409, 0.151, 0.178, 0.143,
    0.175, 0.17, 0.145, 0.155, 0.159, 0.211, 0.219, 0.211, 0.23, 0.03, 0.166,
    0.103, 0.593, 0.507, 0.45, 0.532, 0.455, 0.629, 0.644, 0.958, 0.595, 0.52,
    0.423, 0.411, 0.559, 0.427, 0.455, 0.194, 0.184, 0.138, 0.18, 0.127, 0.153,
    0.134, 0.185, 0.219, 0.205, 0.143, 0.221, 0.001, 0.068, 0.145, 0.522, 0.382,
    0.45, 0.409, 0.378, 0.58, 0.464, 0.595, 1.007, 0.482, 0.4, 0.358, 0.488,
    0.437, 0.442, 0.118, 0.119, 0.049, 0.035, 0.041, 0.1, 0.134, 0.106, 0.09,
    0.145, -0.009, 0.081, -0.129, -0.063, 0.067, 0.508, 0.377, 0.36, 0.419, 0.361,
    0.576, 0.499, 0.52, 0.482, 0.913, 0.355, 0.353, 0.384, 0.355, 0.344, 0.13,
    0.167, 0.116, 0.135, 0.102, 0.156, 0.113, 0.124, 0.166, 0.146, 0.14, 0.167,
    0.051, 0.036, 0.109, 0.486, 0.419, 0.387, 0.384, 0.398, 0.385, 0.436, 0.423,
    0.4, 0.355, 0.87, 0.601, 0.549, 0.541, 0.446, 0.129, 0.124, 0.056, 0.102,
    0.088, 0.08, 0.142, 0.1, 0.08, 0.133, 0.068, 0.08, 0.004, 0.141, 0.132, 0.505,
    0.445, 0.445, 0.479, 0.411, 0.403, 0.454, 0.411, 0.358, 0.353, 0.601, 0.964,
    0.575, 0.606, 0.431, 0.124, 0.089, 0.097, 0.138, 0.057, 0.081, 0.123, 0.162,
    0.101, 0.119, 0.159, 0.164, 0.036, 0.138, 0.15, 0.611, 0.508, 0.533, 0.561,
    0.514, 0.492, 0.549, 0.559, 0.488, 0.384, 0.549, 0.575, 0.923, 0.596, 0.509,
    0.083, 0.156, 0.062, 0.11, 0.099, 0.184, 0.122, 0.142, 0.122, 0.163, 0.135,
    0.099, -0.03, 0.053, 0.113, 0.549, 0.467, 0.49, 0.488, 0.426, 0.357, 0.437,
    0.427, 0.437, 0.355, 0.541, 0.606, 0.596, 0.893, 0.455, 0.111, 0.075, 0.123,
    0.13, 0.049, 0.071, 0.192, 0.139, 0.085, 0.175, 0.137, 0.149, 0.047, 0.078,
    0.182, 0.551, 0.389, 0.424, 0.48, 0.377, 0.432, 0.409, 0.455, 0.442, 0.344,
    0.446, 0.431, 0.509, 0.455, 0.828, 0.112, 0.103, 0.093, 0.13, 0.139, 0.047,
    0.076, 0.055, 0.077, 0.165, 0.079, 0.136, -0.09, 0.07, 0.084, 0.237, 0.105,
    0.176, 0.195, 0.255, 0.147, 0.151, 0.194, 0.118, 0.13, 0.129, 0.124, 0.083,
    0.111, 0.112, 1.022, 0.7, 0.674, 0.597, 0.623, 0.514, 0.441, 0.51, 0.366,
    0.517, 0.434, 0.503, 0.393, 0.612, 0.591, 0.178, 0.032, 0.149, 0.184, 0.135,
    0.146, 0.178, 0.184, 0.119, 0.167, 0.124, 0.089, 0.156, 0.075, 0.103, 0.7,
    1.229, 0.803, 0.732, 0.704, 0.644, 0.55, 0.614, 0.508, 0.703, 0.531, 0.565,
    0.475, 0.723, 0.727, 0.196, 0.095, 0.136, 0.173, 0.099, 0.137, 0.143, 0.138,
    0.049, 0.116, 0.056, 0.097, 0.062, 0.123, 0.093, 0.674, 0.803, 1.061, 0.769,
    0.609, 0.569, 0.532, 0.675, 0.466, 0.655, 0.542, 0.593, 0.451, 0.652, 0.702,
    0.148, 0.039, 0.057, 0.179, 0.178, 0.145, 0.175, 0.18, 0.035, 0.135, 0.102,
    0.138, 0.11, 0.13, 0.13, 0.597, 0.732, 0.769, 1.152, 0.647, 0.474, 0.454,
    0.522, 0.378, 0.526, 0.504, 0.45, 0.354, 0.57, 0.624, 0.181, 0.067, 0.101,
    0.187, 0.176, 0.161, 0.17, 0.127, 0.041, 0.102, 0.088, 0.057, 0.099, 0.049,
    0.139, 0.623, 0.704, 0.609, 0.647, 1.083, 0.493, 0.454, 0.529, 0.371, 0.533,
    0.445, 0.458, 0.291, 0.568, 0.577, 0.196, 0.107, 0.224, 0.189, 0.273, 0.145,
    0.145, 0.153, 0.1, 0.156, 0.08, 0.081, 0.184, 0.071, 0.047, 0.514, 0.644,
    0.569, 0.474, 0.493, 0.939, 0.57, 0.552, 0.503, 0.669, 0.478, 0.489, 0.365,
    0.503, 0.584, 0.203, 0.093, 0.25, 0.165, 0.22, 0.171, 0.155, 0.134, 0.134,
    0.113, 0.142, 0.123, 0.122, 0.192, 0.076, 0.441, 0.55, 0.532, 0.454, 0.454,
    0.57, 1.06, 0.554, 0.556, 0.644, 0.483, 0.42, 0.322, 0.399, 0.556, 0.181,
    0.088, 0.158, 0.249, 0.143, 0.183, 0.159, 0.185, 0.106, 0.124, 0.1, 0.162,
    0.142, 0.139, 0.055, 0.51, 0.614, 0.675, 0.522, 0.529, 0.552, 0.554, 1.011,
    0.53, 0.671, 0.544, 0.516, 0.352, 0.562, 0.636, 0.191, 0.139, 0.232, 0.135,
    0.167, 0.189, 0.211, 0.219, 0.09, 0.166, 0.08, 0.101, 0.122, 0.085, 0.077,
    0.366, 0.508, 0.466, 0.378, 0.371, 0.503, 0.556, 0.53, 0.997, 0.61, 0.409,
    0.452, 0.273, 0.473, 0.498, 0.235, 0.125, 0.291, 0.216, 0.207, 0.232, 0.219,
    0.205, 0.145, 0.146, 0.133, 0.119, 0.163, 0.175, 0.165, 0.517, 0.703, 0.655,
    0.526, 0.533, 0.669, 0.644, 0.671, 0.61, 1, 0.476, 0.53, 0.338, 0.568, 0.605,
    0.18, 0.038, 0.171, 0.185, 0.195, 0.183, 0.211, 0.143, -0.009, 0.14, 0.068,
    0.159, 0.135, 0.137, 0.079, 0.434, 0.531, 0.542, 0.504, 0.445, 0.478, 0.483,
    0.544, 0.409, 0.476, 1.029, 0.469, 0.419, 0.561, 0.613, 0.205, 0.141, 0.208,
    0.178, 0.16, 0.203, 0.23, 0.221, 0.081, 0.167, 0.08, 0.164, 0.099, 0.149,
    0.136, 0.503, 0.565, 0.593, 0.45, 0.458, 0.489, 0.42, 0.516, 0.452, 0.53,
    0.469, 1.018, 0.393, 0.655, 0.612, -0.05, 0.043, -0.014, 0.019, -0.014,
    -0.023, 0.03, 0.001, -0.129, 0.051, 0.004, 0.036, -0.03, 0.047, -0.09, 0.393,
    0.475, 0.451, 0.354, 0.291, 0.365, 0.322, 0.352, 0.273, 0.338, 0.419, 0.393,
    0.976, 0.497, 0.563, 0.121, 0.04, 0.143, 0.118, 0.161, 0.155, 0.166, 0.068,
    -0.063, 0.036, 0.141, 0.138, 0.053, 0.078, 0.07, 0.612, 0.723, 0.652, 0.57,
    0.568, 0.503, 0.399, 0.562, 0.473, 0.568, 0.561, 0.655, 0.497, 1.153, 0.701,
    0.137, 0.124, 0.167, 0.143, 0.203, 0.148, 0.103, 0.145, 0.067, 0.109, 0.132,
    0.15, 0.113, 0.182, 0.084, 0.591, 0.727, 0.702, 0.624, 0.577, 0.584, 0.556,
    0.636, 0.498, 0.605, 0.613, 0.612, 0.563, 0.701, 1.15
  ),
  nrow = 30L,
  ncol = 30L,
  dimnames = list(
    c(
      "Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item8",
      "Item9", "Item10", "Item11", "Item12", "Item13", "Item14", "Item15", "Item16",
      "Item17", "Item18", "Item19", "Item20", "Item21", "Item22", "Item23",
      "Item24", "Item25", "Item26", "Item27", "Item28", "Item29", "Item30"
    ),
    c(
      "Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item8",
      "Item9", "Item10", "Item11", "Item12", "Item13", "Item14", "Item15", "Item16",
      "Item17", "Item18", "Item19", "Item20", "Item21", "Item22", "Item23",
      "Item24", "Item25", "Item26", "Item27", "Item28", "Item29", "Item30"
    )
  )
)

# ─── 2. Define a bifactor “target” for the 30×8 loading matrix ──────────
Target <- psych::make.keys(
  30, 
  list(
    FG1 = 1:15,
    FG2 = 16:30,
    FE1 = 1:5,
    FE2 = 6:10,
    FE3 = 11:15,
    FE4 = 16:20,
    FE5 = 21:25,
    FE6 = 26:30
  )
)
Target
#>       FG1 FG2 FE1 FE2 FE3 FE4 FE5 FE6
#>  [1,]   1   0   1   0   0   0   0   0
#>  [2,]   1   0   1   0   0   0   0   0
#>  [3,]   1   0   1   0   0   0   0   0
#>  [4,]   1   0   1   0   0   0   0   0
#>  [5,]   1   0   1   0   0   0   0   0
#>  [6,]   1   0   0   1   0   0   0   0
#>  [7,]   1   0   0   1   0   0   0   0
#>  [8,]   1   0   0   1   0   0   0   0
#>  [9,]   1   0   0   1   0   0   0   0
#> [10,]   1   0   0   1   0   0   0   0
#> [11,]   1   0   0   0   1   0   0   0
#> [12,]   1   0   0   0   1   0   0   0
#> [13,]   1   0   0   0   1   0   0   0
#> [14,]   1   0   0   0   1   0   0   0
#> [15,]   1   0   0   0   1   0   0   0
#> [16,]   0   1   0   0   0   1   0   0
#> [17,]   0   1   0   0   0   1   0   0
#> [18,]   0   1   0   0   0   1   0   0
#> [19,]   0   1   0   0   0   1   0   0
#> [20,]   0   1   0   0   0   1   0   0
#> [21,]   0   1   0   0   0   0   1   0
#> [22,]   0   1   0   0   0   0   1   0
#> [23,]   0   1   0   0   0   0   1   0
#> [24,]   0   1   0   0   0   0   1   0
#> [25,]   0   1   0   0   0   0   1   0
#> [26,]   0   1   0   0   0   0   0   1
#> [27,]   0   1   0   0   0   0   0   1
#> [28,]   0   1   0   0   0   0   0   1
#> [29,]   0   1   0   0   0   0   0   1
#> [30,]   0   1   0   0   0   0   0   1

# ─── 3. Define a 8×8 target for factor correlations ────────────────────
Phi_Target <- matrix(0, 8, 8)
Phi_Target[1:2, 1:2] <- 1
diag(Phi_Target) <- 0

Phi_Target
#>      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
#> [1,]    0    1    0    0    0    0    0    0
#> [2,]    1    0    0    0    0    0    0    0
#> [3,]    0    0    0    0    0    0    0    0
#> [4,]    0    0    0    0    0    0    0    0
#> [5,]    0    0    0    0    0    0    0    0
#> [6,]    0    0    0    0    0    0    0    0
#> [7,]    0    0    0    0    0    0    0    0
#> [8,]    0    0    0    0    0    0    0    0

# ─── 4. EFA in lavaan with “target” rotation (loadings only) ────────────
#    – orthogonal
fit_efaT_orth <- efa(
  sample.cov = cov_matrix,
  sample.nobs = 200,
  nfactor = 8,
  rotation = "target",
  rotation.args = list(target = psych::scrub(Target,isvalue=1),
                       rstarts = 10L,
                       orthogonal = TRUE)
)
#> Warning: lavaan->lav_model_vcov():  
#>    The variance-covariance matrix of the estimated parameters (vcov) does not 
#>    appear to be positive definite! The smallest eigenvalue (= -2.320460e-18) 
#>    is smaller than zero. This may be a symptom that the model is not 
#>    identified.

# → ALL factor covariances are forced to zero
lavInspect(fit_efaT_orth$nf8, "cor.lv")
#>    f1 f2 f3 f4 f5 f6 f7 f8
#> f1  1                     
#> f2  0  1                  
#> f3  0  0  1               
#> f4  0  0  0  1            
#> f5  0  0  0  0  1         
#> f6  0  0  0  0  0  1      
#> f7  0  0  0  0  0  0  1   
#> f8  0  0  0  0  0  0  0  1

#    – oblique
fit_efaT_oblq <- efa(
  sample.cov = cov_matrix,
  sample.nobs = 200,
  nfactor = 8,
  rotation = "target",
  rotation.args = list(target = psych::scrub(Target,isvalue=1),
                       rstarts = 10L,
                       orthogonal = FALSE)
)
#> Warning: lavaan->lav_model_vcov():  
#>    The variance-covariance matrix of the estimated parameters (vcov) does not 
#>    appear to be positive definite! The smallest eigenvalue (= -2.381606e-18) 
#>    is smaller than zero. This may be a symptom that the model is not 
#>    identified.

# → STILL no way to set some Φ(i,j)=0 and others ≠0
lavInspect(fit_efaT_oblq$nf8, "cor.lv")
#>        f1     f2     f3     f4     f5     f6     f7     f8
#> f1  1.000                                                 
#> f2  0.184  1.000                                          
#> f3 -0.063  0.099  1.000                                   
#> f4 -0.060  0.031  0.206  1.000                            
#> f5 -0.242 -0.022  0.193  0.109  1.000                     
#> f6  0.048 -0.167  0.026  0.066 -0.069  1.000              
#> f7  0.177 -0.124  0.098  0.053 -0.137  0.244  1.000       
#> f8  0.001  0.037  0.040  0.037  0.018  0.147  0.045  1.000

# ─── 5. External “xtarget” rotation via Marco Jimenez's bifactor package ---

fit_efaT_rotnone <- efa(
  sample.cov = cov_matrix,
  sample.nobs = 200,
  nfactor = 8,
  rotation = "none"
)

bifactor::rotate(
  fit_efaT_rotnone$loadings,
  rotation = "xtarget",
  Target = Target,
  PhiTarget = Phi_Target,
  random_starts = 10L
)
#> $lambda
#>               [,1]        [,2]         [,3]         [,4]         [,5]
#>  [1,]  0.835624329 -0.01575589  0.262831832 -0.026693388 -0.064131181
#>  [2,]  0.682938994 -0.01857124  0.079581863  0.085366632  0.069752566
#>  [3,]  0.695276347  0.02701210  0.237840418 -0.104464412 -0.009492177
#>  [4,]  0.733948369  0.03285039  0.229061750  0.003663162 -0.036348135
#>  [5,]  0.627640836  0.05020864  0.543412093  0.022106420  0.052715212
#>  [6,]  0.658089914  0.02336350  0.049994608  0.378924803 -0.086555036
#>  [7,]  0.622807073  0.05562661 -0.047841607  0.347255104  0.083056681
#>  [8,]  0.714836072  0.02805528 -0.014900701  0.450508405 -0.007145501
#>  [9,]  0.638513945 -0.10165916 -0.041266494  0.314213207  0.052084914
#> [10,]  0.585303336  0.03679680  0.009879982  0.372910602 -0.021405260
#> [11,]  0.635038404 -0.02090932 -0.001628670  0.060450476  0.515601510
#> [12,]  0.663099527  0.02833035 -0.023384492 -0.047463033  0.440054659
#> [13,]  0.751191234 -0.03815962  0.113196407  0.111360986  0.337368482
#> [14,]  0.731966004  0.02551003 -0.050888900 -0.135818831  0.390752733
#> [15,]  0.709539160 -0.08956076 -0.013304536  0.038844001  0.158609682
#> [16,]  0.041595207  0.67347320  0.116065874  0.005886479 -0.021087316
#> [17,] -0.041443995  0.75972187 -0.020249359  0.076465653  0.039619011
#> [18,]  0.019685428  0.82604400 -0.167101548 -0.126393524 -0.128501997
#> [19,]  0.004550938  0.67857600 -0.041007835  0.009282449  0.037716469
#> [20,] -0.022336119  0.62250962  0.093767809  0.049649582  0.007518089
#> [21,] -0.027906305  0.71888281  0.206205225  0.057197102  0.007475502
#> [22,]  0.024783250  0.62927064  0.048563544 -0.045779224  0.052466389
#> [23,]  0.037683631  0.73477219 -0.092748380 -0.028000192 -0.038060430
#> [24,]  0.043721649  0.58720302 -0.027015967  0.087804764 -0.074691623
#> [25,]  0.066764992  0.71956008 -0.062302721 -0.027582506 -0.028665038
#> [26,]  0.021843216  0.67399810  0.069876460  0.013246839  0.008245823
#> [27,]  0.089649646  0.66707875 -0.062681210  0.031729523 -0.090051624
#> [28,] -0.170753779  0.65504410 -0.023197885  0.013379040  0.073006476
#> [29,] -0.043735954  0.74280321  0.023930400 -0.036410184  0.049753057
#> [30,] -0.032020449  0.81129260  0.029596839 -0.007799884  0.092948912
#>               [,6]          [,7]         [,8]
#>  [1,]  0.077525550  0.0047933958  0.006212683
#>  [2,] -0.121243398 -0.0649669609 -0.049314414
#>  [3,] -0.104823839  0.1644374559  0.044790474
#>  [4,]  0.032369396 -0.0484715275 -0.030338206
#>  [5,]  0.008760684  0.0082123258  0.011153656
#>  [6,] -0.016656154  0.0166319921  0.085055387
#>  [7,] -0.021621941 -0.0159910195  0.061576959
#>  [8,]  0.017306095 -0.0115357262 -0.044619230
#>  [9,]  0.072334612  0.1151253378 -0.070425903
#> [10,] -0.014089724 -0.0448326108 -0.080352942
#> [11,]  0.044327778  0.0070253862  0.084784818
#> [12,] -0.072904030 -0.0917605953  0.012328056
#> [13,]  0.006446903  0.0493125947 -0.038118457
#> [14,] -0.087622136 -0.0347490298 -0.068170219
#> [15,]  0.168209109  0.0337583227  0.061229024
#> [16,]  0.331000912 -0.0215849424  0.058657105
#> [17,]  0.352227913  0.1297643392  0.067552096
#> [18,]  0.320861212  0.0008929858 -0.038311584
#> [19,]  0.417549682 -0.0738463668 -0.045976494
#> [20,]  0.398265854  0.0733516828  0.049734260
#> [21,]  0.061497963  0.3498103354 -0.047100788
#> [22,] -0.010744412  0.3764476856 -0.126606853
#> [23,]  0.050519389  0.2253631784 -0.009090946
#> [24,] -0.101979099  0.3745765367  0.061729740
#> [25,]  0.087428530  0.5173444960  0.039010887
#> [26,] -0.044748758  0.0005128910  0.021508323
#> [27,] -0.025672176  0.0333863110  0.169974440
#> [28,] -0.134697955 -0.1446123761  0.002460289
#> [29,]  0.053285364 -0.0425883798  0.665594093
#> [30,]  0.021059097  0.0086155293  0.012858168
#> 
#> $phi
#>              [,1]         [,2]         [,3]         [,4]         [,5]
#> [1,]  1.000000000  0.238360783 -0.022592342 -0.007122988 -0.026547614
#> [2,]  0.238360783  1.000000000  0.035255840  0.007226791 -0.013789461
#> [3,] -0.022592342  0.035255840  1.000000000  0.034751174  0.029990084
#> [4,] -0.007122988  0.007226791  0.034751174  1.000000000  0.017970646
#> [5,] -0.026547614 -0.013789461  0.029990084  0.017970646  1.000000000
#> [6,]  0.017001583 -0.029147213  0.005870422  0.018977533 -0.021236348
#> [7,]  0.079201816 -0.034037832  0.037215672  0.018941822 -0.035596461
#> [8,] -0.014275659  0.006501432  0.006736975  0.003063213  0.005334851
#>              [,6]         [,7]         [,8]
#> [1,]  0.017001583  0.079201816 -0.014275659
#> [2,] -0.029147213 -0.034037832  0.006501432
#> [3,]  0.005870422  0.037215672  0.006736975
#> [4,]  0.018977533  0.018941822  0.003063213
#> [5,] -0.021236348 -0.035596461  0.005334851
#> [6,]  1.000000000  0.057264211  0.034944765
#> [7,]  0.057264211  1.000000000  0.001343973
#> [8,]  0.034944765  0.001343973  1.000000000
#> 
#> $propVar
#>            [,1]
#> [1,] 0.23719048
#> [2,] 0.24596254
#> [3,] 0.02033770
#> [4,] 0.02662238
#> [5,] 0.02698824
#> [6,] 0.02581150
#> [7,] 0.02731267
#> [8,] 0.01881867
#> 
#> $T
#>              [,1]        [,2]        [,3]        [,4]        [,5]          [,6]
#> [1,]  0.947044542  0.21808295  0.27542694 -0.02648640 -0.09189072 -0.1085639959
#> [2,]  0.226650743  0.04637946 -0.38400954  0.33999225  0.41437209  0.6378136714
#> [3,] -0.002163568  0.14288525  0.14977450 -0.38004299  0.09996736  0.5567453890
#> [4,] -0.101764463  0.74114980  0.41515268 -0.06726609 -0.04207702  0.1723377513
#> [5,] -0.186170061 -0.31811923  0.73152453  0.39718290  0.46325776  0.0285104482
#> [6,]  0.014371977  0.33455110 -0.05338893  0.73364476 -0.36502975  0.0009070993
#> [7,]  0.080193534  0.40635508 -0.20935183 -0.02034083  0.67735253 -0.4535682331
#> [8,] -0.008862378 -0.04817491  0.00926401  0.19581546  0.03777562 -0.1876273970
#>              [,7]        [,8]
#> [1,]  0.099929194 -0.00200556
#> [2,] -0.274454935 -0.21279873
#> [3,]  0.635251060  0.17336827
#> [4,] -0.369693359 -0.28366871
#> [5,]  0.008537593  0.12375255
#> [6,]  0.317540086  0.32446399
#> [7,]  0.149516739  0.23046027
#> [8,]  0.501210239 -0.81883129
#> 
#> $f
#> [1] 0.3847984
#> 
#> $iterations
#> [1] 67
#> 
#> $convergence
#> [1] TRUE
#> 
#> $elapsed
#>  elapsed 
#> 30891600 
#> 
#> attr(,"class")
#> [1] "rotation"

Created on 2025-04-19 with reprex v2.1.1

Session info
sessioninfo::session_info()
#> Warning in system2("quarto", "-V", stdout = TRUE, env = paste0("TMPDIR=", : el
#> comando ejecutado '"quarto"
#> TMPDIR=C:/Users/brian/AppData/Local/Temp/RtmpMH4ODr/file5e3435b12706 -V' tiene
#> el estatus 1
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.4.3 (2025-02-28 ucrt)
#>  os       Windows 11 x64 (build 26100)
#>  system   x86_64, mingw32
#>  ui       RTerm
#>  language (EN)
#>  collate  Spanish_Peru.utf8
#>  ctype    Spanish_Peru.utf8
#>  tz       Europe/Paris
#>  date     2025-04-19
#>  pandoc   3.2 @ C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown)
#>  quarto   NA @ C:\\PROGRA~1\\Quarto\\bin\\quarto.exe
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version    date (UTC) lib source
#>  bifactor      0.1.0      2024-11-13 [1] Github (marcosjnez/bifactor@581d603)
#>  cli           3.6.4      2025-02-13 [1] CRAN (R 4.4.3)
#>  digest        0.6.37     2024-08-19 [1] CRAN (R 4.4.1)
#>  evaluate      1.0.3      2025-01-10 [1] CRAN (R 4.4.2)
#>  fastmap       1.2.0      2024-05-15 [1] CRAN (R 4.4.1)
#>  fs            1.6.6      2025-04-12 [1] CRAN (R 4.4.3)
#>  glue          1.8.0      2024-09-30 [1] CRAN (R 4.4.1)
#>  htmltools     0.5.8.1    2024-04-04 [1] CRAN (R 4.4.1)
#>  knitr         1.50       2025-03-16 [1] CRAN (R 4.4.3)
#>  lattice       0.22-6     2024-03-20 [2] CRAN (R 4.4.3)
#>  lavaan      * 0.6-19     2024-09-26 [1] CRAN (R 4.4.1)
#>  lifecycle     1.0.4      2023-11-07 [1] CRAN (R 4.4.1)
#>  MASS          7.3-64     2025-01-04 [2] CRAN (R 4.4.3)
#>  mnormt        2.1.1      2022-09-26 [1] CRAN (R 4.4.0)
#>  nlme          3.1-167    2025-01-27 [2] CRAN (R 4.4.3)
#>  numDeriv      2016.8-1.1 2019-06-06 [1] CRAN (R 4.4.0)
#>  pbivnorm      0.6.0      2015-01-23 [1] CRAN (R 4.4.0)
#>  psych         2.5.3      2025-03-21 [1] CRAN (R 4.4.3)
#>  quadprog      1.5-8      2019-11-20 [1] CRAN (R 4.4.0)
#>  Rcpp          1.0.14     2025-01-12 [1] CRAN (R 4.4.2)
#>  reprex        2.1.1      2024-07-06 [1] CRAN (R 4.4.1)
#>  rlang         1.1.6      2025-04-11 [1] CRAN (R 4.4.3)
#>  rmarkdown     2.29       2024-11-04 [1] CRAN (R 4.4.1)
#>  rstudioapi    0.17.1     2024-10-22 [1] CRAN (R 4.4.1)
#>  sessioninfo   1.2.3      2025-02-05 [1] CRAN (R 4.4.3)
#>  withr         3.0.2      2024-10-28 [1] CRAN (R 4.4.1)
#>  xfun          0.52       2025-04-02 [1] CRAN (R 4.4.3)
#>  yaml          2.3.10     2024-07-26 [1] CRAN (R 4.4.1)
#> 
#>  [1] C:/Users/brian/AppData/Local/R/win-library/4.4
#>  [2] C:/Program Files/R/R-4.4.3/library
#>  * ── Packages attached to the search path.
#> 
#> ──────────────────────────────────────────────────────────────────────────────

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions