runMI with categorical data / WLSMV / fit measures

758 views
Skip to first unread message

Jan Brederecke

unread,
Mar 30, 2019, 7:10:49 AM3/30/19
to lavaan
Hi everyone,

I am struggling to extract the fit measures of my runMI-output and all the information in the available help files and this forum did not help me solve it.

I did the following with my data (questionnaire data, 5-level-likert-type-scale): 




FBK_Subset[,c("FBKP_1","FBKP_2","FBKP_3","FBKP_4","FBKP_5","FBKP_6","FBKP_7","FBKP_8","FBKP_9",
            "FBKP_10","FBKP_11","FBKP_12","FBKP_13","FBKP_14","FBKP_15","FBKP_16","FBKP_17","FBKP_18",
            "FBKP_20","FBKP_21","FBKP_22","FBKP_23")] <-
   lapply(FBK_Subset[,c("FBKP_1","FBKP_2","FBKP_3","FBKP_4","FBKP_5","FBKP_6","FBKP_7","FBKP_8","FBKP_9",
                 "FBKP_10","FBKP_11","FBKP_12","FBKP_13","FBKP_14","FBKP_15","FBKP_16","FBKP_17","FBKP_18",
              "FBKP_20","FBKP_21","FBKP_22","FBKP_23")], ordered)


out1 <- runMI(CFAModel, 
              data=FBK_Subset,
              m = 5, 
              miPackage="mice",
              fun="cfa",
              estimator = "WLSMV",
              seed = 12345)

summary(out1)


This works fine but now I fail to extract the fit measures via fitMeasures() or lavTestLRT.mi() and I don't understand how to pass arguments from one to the other as is told.

Any help on how to extract the fit measures is highly appreciated!

I use the latest versions of both lavaan() and semTools().

With kind regards
Jan Brederecke  

Terrence Jorgensen

unread,
Mar 31, 2019, 4:54:35 AM3/31/19
to lavaan
This works fine but now I fail to extract the fit measures via fitMeasures() or lavTestLRT.mi()

could you share that syntax too, to show us what the problem is?

I don't understand how to pass arguments from one to the other as is told.

If you want to pass lavTestLRT() or lavTestLRT.mi() arguments via fitMeasures(), all you have to do is specify those arguments.

fitMeasures(fit, A.method = "exact", scaled.shifted = FALSE) # NOT recommended

Since you are using DWLS, there aren't any other arguments for you to pass that aren't already fixed for that case:  lavTestLRT.mi() fixes asymptotic=TRUE, test = "D2", pool.robust=TRUE; lavTestLRT() fixes method="satorra.2000".

Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Jan Brederecke

unread,
Mar 31, 2019, 6:17:07 PM3/31/19
to lavaan
Dear Terrence,

thank you for your kind response.

This is what I tried (I tried a lot of different combinations of arguments but deleted them all since they did not work...):

fitMeasures(out1)


lavTestLRT
.mi(out1)


lavTestLRT
(out1)


But the output looks as follows: 

> lavTestLRT.mi(out1)
"D3" only available using maximum likelihood estimation. Changed test to "D2".
Robust correction can only be applied to pooled chi-squared statistic, not F statistic. "asymptotic" was switched to TRUE.
Robust corrections are made by pooling the naive chi-squared statistic across 5 imputations for which the model converged, then applying the average (across imputations) scaling factor and shift parameter to that pooled value.
To instead pool the robust test statistics, set test = "D2" and pool.robust = TRUE.


                 chisq                     df                 pvalue                   npar                 ntotal
               
478.301                206.000                  0.000                138.000                304.000
          chisq
.scaled              df.scaled          pvalue.scaled   chisq.scaling.factor chisq.shift.parameters
               
607.926                206.000                  0.000                  0.933                 95.048
> fitMeasures(out1)
"D3" only available using maximum likelihood estimation. Changed test to "D2".
Robust corrections are made by pooling the naive chi-squared statistic across 5 imputations for which the model converged, then applying the average (across imputations) scaling factor and shift parameter to that pooled value.
To instead pool the robust test statistics, set test = "D2" and pool.robust = TRUE.


"D3" only available using maximum likelihood estimation. Changed test to "D2".
Robust corrections are made by pooling the naive chi-squared statistic across 5 imputations for which the model converged, then applying the average (across imputations) scaling factor and shift parameter to that pooled value.
To instead pool the robust test statistics, set test = "D2" and pool.robust = TRUE.


Error in gp.resid.lavaan.mi(Observed = object@SampleStatsList[useImps],  :
 
object 'N' not found
In addition: Warning message:
In pchisq(X2.sc, DF.sc, ncp = N * DF.sc * 0.05^2/nG, lower.tail = FALSE) :
  full precision may
not have been achieved in 'pnchisq'
> lavTestLRT(out1)
Error in lavTestLRT(out1) :
 
no slot of name "optim" for this object of class "lavaan.mi"

All I want is the additional fit measures like RMSEA, CFI and so on and I do not yet understand my mistake.

Thank you so much for your help, Terrence!



Jan Brederecke

unread,
Mar 31, 2019, 6:39:10 PM3/31/19
to lavaan
Additionally, I tried this: 

> fitMeasures(out1, fit.measures = ("all"),asymptotic=TRUE, test = "D2", pool.robust=TRUE)
Error in .local(object, fit.measures, baseline.model, ...) :
  unused arguments
(asymptotic = TRUE, test = "D2", pool.robust = TRUE)

Terrence Jorgensen

unread,
Apr 1, 2019, 9:46:18 AM4/1/19
to lavaan
Error in gp.resid.lavaan.mi(Observed = object@SampleStatsList[useImps],  :
 
object 'N' not found

This was an old problem that was already resolved.

> fitMeasures(out1, fit.measures = ("all"),asymptotic=TRUE, test = "D2", pool.robust=TRUE)
Error in .local(object, fit.measures, baseline.model, ...) : 
  unused
 arguments (asymptotic = TRUE, test = "D2", pool.robust = TRUE)

If the arguments aren't recognized, this must be an older version of fitMeasures() before Yves Rosseel made the function generic in lavaan.

I use the latest versions of both lavaan() and semTools()

Are you sure?  Try again:

install.packages("lavaan", repos = "http://www.da.ugent.be", type = "source")
devtools
::install_github("simsem/semTools/semTools")

I also just fixed another bug, so today semTools went from 0.5-1.915 to 0.5-1.916


> lavTestLRT(out1)
Error in lavTestLRT(out1) :
 
no slot of name "optim" for this object of class "lavaan.mi"

lavTestLRT() is for lavaan objects, not lavaan.mi objects.   You have to use lavTestLRT.mi() for lavaan.mi objects.

Jan Brederecke

unread,
Apr 3, 2019, 10:02:29 AM4/3/19
to lavaan
Dear Terrence,

thank you for your help!

I followed your instructions and installed the latest versions of semTools and lavaan but my problem was not resolved.
Additionally, my EFA (you already helped me out with this...) that I used on my first sample does not converge anymore after the update so I had to change to an ULS-EFA using psych... nonetheless, my run.mi() CFA won't give me fitmeasures which is sort of my greater problem at the moment, as I'm keen to use MI for this sample.

Any further help is highly appreciated.

Best regards
Jan
> out1 <- runMI(CFATcool, 
+               data=FBK_Subset,
+               m = 5,
+               miPackage="mice",
+               fun="cfa",
+               estimator = "WLSMV",
+               seed = 12345)
>
> summary(out1)
lavaan.mi object based on 5 imputed data sets.
See class?lavaan.mi help page for available methods.

Convergence information:
The model converged on 5 imputed data sets

Rubin's (1987) rules were used to pool point and SE estimates across 5 imputed data sets, and to calculate degrees of freedom for each parameter's t test and CI.

Parameter Estimates:

 
Information                                 Expected
 
Information saturated (h1) model        Unstructured
 
Standard Errors                           Robust.sem

Latent Variables:
                                   
Estimate  Std.Err  t-value       df  P(>|t|)
 
AllgemeinepsychischeStressoren =~                                            
    FBKP_1                            
1.000                                    
    FBKP_3                            
1.005    0.021   48.988 3730.703    0.000
    FBKP_4                            
0.781    0.035   22.531 1906.053    0.000
    FBKP_5                            
0.893    0.025   35.321 4253.089    0.000
    FBKP_6                            
0.801    0.038   21.329 3989.771    0.000
    FBKP_7                            
0.899    0.024   37.851 1636.363    0.000
    FBKP_9                            
0.883    0.027   32.345 7896.067    0.000
    FBKP_10                            
0.775    0.034   22.678      Inf    0.000
    FBKP_12                            
0.963    0.021   45.726      Inf    0.000
 
Progredienzangst =~                                                          
    FBKP_8                            
1.000                                    
    FBKP_15                            
1.001    0.031   32.579      Inf    0.000
    FBKP_16                            
0.739    0.047   15.779      Inf    0.000
    FBKP_17                            
1.021    0.030   33.680 3871.302    0.000
    FBKP_18                            
0.759    0.049   15.616 1264.125    0.000
    FBKP_20                            
0.941    0.034   27.862  502.513    0.000
    FBKP_21                            
0.997    0.030   33.217      Inf    0.000
    FBKP_22                            
0.715    0.050   14.235 3757.965    0.000
    FBKP_23                            
1.053    0.028   37.551  744.200    0.000
 
PartnerschaftlicheStressoren =~                                              
    FBKP_2                            
1.000                                    
    FBKP_11                            
0.872    0.062   13.957 3839.797    0.000
    FBKP_13                            
1.091    0.052   21.169      Inf    0.000
    FBKP_14                            
1.076    0.054   20.075  686.255    0.000

Covariances:
                                   
Estimate  Std.Err  t-value       df  P(>|t|)
 
AllgemeinepsychischeStressoren ~~                                            
   
Progredinzngst                     0.543    0.033   16.285 7204.925    0.000
   
PrtnrschftlchS                     0.410    0.041   10.089      Inf    0.000
 
Progredienzangst ~~                                                          
   
PrtnrschftlchS                     0.305    0.040    7.700 6905.005    0.000

Intercepts:
                   
Estimate  Std.Err  t-value       df  P(>|t|)
   
.FBKP_1            0.000                                    
   
.FBKP_3            0.000                                    
   
.FBKP_4            0.000                                    
   
.FBKP_5            0.000                                    
   
.FBKP_6            0.000                                    
   
.FBKP_7            0.000                                    
   
.FBKP_9            0.000                                    
   
.FBKP_10           0.000                                    
   
.FBKP_12           0.000                                    
   
.FBKP_8            0.000                                    
   
.FBKP_15           0.000                                    
   
.FBKP_16           0.000                                    
   
.FBKP_17           0.000                                    
   
.FBKP_18           0.000                                    
   
.FBKP_20           0.000                                    
   
.FBKP_21           0.000                                    
   
.FBKP_22           0.000                                    
   
.FBKP_23           0.000                                    
   
.FBKP_2            0.000                                    
   
.FBKP_11           0.000                                    
   
.FBKP_13           0.000                                    
   
.FBKP_14           0.000                                    
   
AllgmnpsychscS    0.000                                    
   
Progredinzngst    0.000                                    
   
PrtnrschftlchS    0.000                                    

Thresholds:
                   
Estimate  Std.Err  t-value       df  P(>|t|)
    FBKP_1
|t1        -0.596    0.079   -7.581      Inf    0.000
    FBKP_1
|t2        -0.071    0.074   -0.963      Inf    0.336
    FBKP_1
|t3         0.361    0.075    4.782      Inf    0.000
    FBKP_1
|t4         1.045    0.090   11.573 4370.060    0.000
    FBKP_1
|t5         1.727    0.131   13.138 1006.527    0.000
    FBKP_3
|t1        -0.553    0.078   -7.100      Inf    0.000
    FBKP_3
|t2        -0.181    0.074   -2.440      Inf    0.015
    FBKP_3
|t3         0.269    0.075    3.601      Inf    0.000
    FBKP_3
|t4         0.966    0.088   11.025      Inf    0.000
    FBKP_3
|t5         1.789    0.138   13.010  741.812    0.000
    FBKP_4
|t1        -0.049    0.074   -0.672      Inf    0.502
    FBKP_4
|t2         0.412    0.076    5.425 8073.090    0.000
    FBKP_4
|t3         0.738    0.081    9.065      Inf    0.000
    FBKP_4
|t4         1.256    0.099   12.663      Inf    0.000
    FBKP_4
|t5         1.877    0.147   12.775 6502.062    0.000
    FBKP_5
|t1        -0.262    0.075   -3.512      Inf    0.000
    FBKP_5
|t2         0.269    0.075    3.601      Inf    0.000
    FBKP_5
|t3         0.668    0.080    8.360 5708.816    0.000
    FBKP_5
|t4         1.068    0.091   11.719 2504.940    0.000
    FBKP_5
|t5         1.907    0.150   12.673 2274.567    0.000
    FBKP_6
|t1         0.013    0.074    0.179 3276.308    0.858
    FBKP_6
|t2         0.496    0.077    6.442 2631.275    0.000
    FBKP_6
|t3         0.856    0.084   10.148 1382.981    0.000
    FBKP_6
|t4         1.278    0.100   12.746      Inf    0.000
    FBKP_6
|t5         1.859    0.145   12.831 2802.615    0.000
    FBKP_7
|t1        -0.553    0.078   -7.100      Inf    0.000
    FBKP_7
|t2         0.136    0.074    1.836      Inf    0.066
    FBKP_7
|t3         0.524    0.077    6.772      Inf    0.000
    FBKP_7
|t4         1.065    0.091   11.701 6540.398    0.000
    FBKP_7
|t5         1.727    0.131   13.143      Inf    0.000
    FBKP_9
|t1        -0.493    0.077   -6.398      Inf    0.000
    FBKP_9
|t2         0.117    0.074    1.590      Inf    0.112
    FBKP_9
|t3         0.509    0.077    6.596 4332.059    0.000
    FBKP_9
|t4         1.062    0.091   11.682  942.202    0.000
    FBKP_9
|t5         1.831    0.142   12.912 7817.911    0.000
    FBKP_10
|t1       -0.636    0.079   -8.015      Inf    0.000
    FBKP_10
|t2       -0.139    0.074   -1.881      Inf    0.060
    FBKP_10
|t3        0.255    0.075    3.423      Inf    0.001
    FBKP_10
|t4        0.708    0.081    8.767      Inf    0.000
    FBKP_10
|t5        1.377    0.106   13.042 2700.219    0.000
    FBKP_12
|t1       -0.592    0.079   -7.537      Inf    0.000
    FBKP_12
|t2       -0.021    0.074   -0.291      Inf    0.771
    FBKP_12
|t3        0.389    0.076    5.137      Inf    0.000
    FBKP_12
|t4        1.071    0.091   11.737 8129.746    0.000
    FBKP_12
|t5        2.089    0.175   11.906 1007.018    0.000
    FBKP_8
|t1        -0.897    0.085  -10.492      Inf    0.000
    FBKP_8
|t2        -0.387    0.076   -5.115      Inf    0.000
    FBKP_8
|t3         0.104    0.074    1.411 3228.895    0.158
    FBKP_8
|t4         0.580    0.078    7.407 2182.588    0.000
    FBKP_8
|t5         1.340    0.104   12.946      Inf    0.000
    FBKP_15
|t1       -0.837    0.084   -9.984      Inf    0.000
    FBKP_15
|t2       -0.414    0.076   -5.448 4782.280    0.000
    FBKP_15
|t3       -0.194    0.074   -2.619      Inf    0.009
    FBKP_15
|t4        0.252    0.074    3.378      Inf    0.001
    FBKP_15
|t5        0.632    0.079    7.972 7175.969    0.000
    FBKP_16
|t1       -1.285    0.101  -12.772 4429.571    0.000
    FBKP_16
|t2       -0.823    0.083   -9.861      Inf    0.000
    FBKP_16
|t3       -0.394    0.076   -5.204      Inf    0.000
    FBKP_16
|t4        0.018    0.074    0.246      Inf    0.805
    FBKP_16
|t5        0.642    0.079    8.080      Inf    0.000
    FBKP_17
|t1       -1.186    0.096  -12.364 6055.854    0.000
    FBKP_17
|t2       -0.742    0.082   -9.107      Inf    0.000
    FBKP_17
|t3       -0.392    0.076   -5.182      Inf    0.000
    FBKP_17
|t4        0.035    0.074    0.470      Inf    0.638
    FBKP_17
|t5        0.644    0.079    8.101      Inf    0.000
    FBKP_18
|t1       -0.984    0.088  -11.160 1629.171    0.000
    FBKP_18
|t2       -0.496    0.077   -6.442 4365.146    0.000
    FBKP_18
|t3       -0.111    0.074   -1.500 9795.253    0.134
    FBKP_18
|t4        0.384    0.076    5.070      Inf    0.000
    FBKP_18
|t5        0.976    0.088   11.103 5163.115    0.000
    FBKP_20
|t1       -1.282    0.100  -12.759      Inf    0.000
    FBKP_20
|t2       -0.784    0.082   -9.507 2758.456    0.000
    FBKP_20
|t3       -0.359    0.075   -4.760 8492.501    0.000
    FBKP_20
|t4        0.023    0.074    0.314      Inf    0.754
    FBKP_20
|t5        0.640    0.079    8.058      Inf    0.000
    FBKP_21
|t1       -1.503    0.113  -13.244      Inf    0.000
    FBKP_21
|t2       -0.909    0.086  -10.593      Inf    0.000
    FBKP_21
|t3       -0.427    0.076   -5.603 4752.969    0.000
    FBKP_21
|t4        0.058    0.074    0.784 7482.226    0.433
    FBKP_21
|t5        0.620    0.079    7.842      Inf    0.000
    FBKP_22
|t1       -0.914    0.086  -10.632      Inf    0.000
    FBKP_22
|t2       -0.400    0.076   -5.270      Inf    0.000
    FBKP_22
|t3       -0.117    0.074   -1.590 5786.860    0.112
    FBKP_22
|t4        0.389    0.076    5.137 3584.561    0.000
    FBKP_22
|t5        0.873    0.085   10.291 2351.218    0.000
    FBKP_23
|t1       -1.180    0.096  -12.332      Inf    0.000
    FBKP_23
|t2       -0.666    0.080   -8.338      Inf    0.000
    FBKP_23
|t3       -0.184    0.074   -2.484      Inf    0.013
    FBKP_23
|t4        0.320    0.075    4.270      Inf    0.000
    FBKP_23
|t5        0.873    0.085   10.291      Inf    0.000
    FBKP_2
|t1        -0.166    0.074   -2.238      Inf    0.025
    FBKP_2
|t2         0.405    0.076    5.337 4765.323    0.000
    FBKP_2
|t3         0.832    0.084    9.943      Inf    0.000
    FBKP_2
|t4         1.513    0.114   13.252      Inf    0.000
    FBKP_2
|t5         2.133    0.182   11.700      Inf    0.000
    FBKP_11
|t1       -0.538    0.078   -6.925      Inf    0.000
    FBKP_11
|t2        0.051    0.074    0.694      Inf    0.488
    FBKP_11
|t3        0.305    0.075    4.069      Inf    0.000
    FBKP_11
|t4        0.771    0.082    9.381      Inf    0.000
    FBKP_11
|t5        1.408    0.107   13.109      Inf    0.000
    FBKP_13
|t1        0.021    0.074    0.291      Inf    0.771
    FBKP_13
|t2        0.494    0.077    6.420      Inf    0.000
    FBKP_13
|t3        0.849    0.084   10.087      Inf    0.000
    FBKP_13
|t4        1.170    0.095   12.284 6341.644    0.000
    FBKP_13
|t5        1.898    0.149   12.697  522.160    0.000
    FBKP_14
|t1       -0.033    0.074   -0.448      Inf    0.654
    FBKP_14
|t2        0.513    0.077    6.640      Inf    0.000
    FBKP_14
|t3        0.773    0.082    9.402 5606.978    0.000
    FBKP_14
|t4        1.297    0.101   12.811 3454.131    0.000
    FBKP_14
|t5        2.059    0.171   12.063      Inf    0.000

Variances:
                   
Estimate  Std.Err  t-value       df  P(>|t|)
   
.FBKP_1            0.178                                    
   
.FBKP_3            0.171                                    
   
.FBKP_4            0.499                                    
   
.FBKP_5            0.344                                    
   
.FBKP_6            0.472                                    
   
.FBKP_7            0.336                                    
   
.FBKP_9            0.360                                    
   
.FBKP_10           0.507                                    
   
.FBKP_12           0.237                                    
   
.FBKP_8            0.299                                    
   
.FBKP_15           0.297                                    
   
.FBKP_16           0.617                                    
   
.FBKP_17           0.269                                    
   
.FBKP_18           0.596                                    
   
.FBKP_20           0.379                                    
   
.FBKP_21           0.304                                    
   
.FBKP_22           0.642                                    
   
.FBKP_23           0.222                                    
   
.FBKP_2            0.346                                    
   
.FBKP_11           0.503                                    
   
.FBKP_13           0.221                                    
   
.FBKP_14           0.242                                    
   
AllgmnpsychscS    0.822    0.023   35.324 2404.089    0.000
   
Progredinzngst    0.701    0.036   19.471 4554.905    0.000
   
PrtnrschftlchS    0.654    0.049   13.408 4521.102    0.000

Scales y*:
                   
Estimate  Std.Err  t-value       df  P(>|t|)
    FBKP_1            
1.000                                    
    FBKP_3            
1.000                                    
    FBKP_4            
1.000                                    
    FBKP_5            
1.000                                    
    FBKP_6            
1.000                                    
    FBKP_7            
1.000                                    
    FBKP_9            
1.000                                    
    FBKP_10          
1.000                                    
    FBKP_12          
1.000                                    
    FBKP_8            
1.000                                    
    FBKP_15          
1.000                                    
    FBKP_16      
    1.000                                    
    FBKP_17          
1.000                                    
    FBKP_18          
1.000                                    
    FBKP_20          
1.000                                    
    FBKP_21          
1.000                                    
    FBKP_22          
1.000                                    
    FBKP_23          
1.000                                    
    FBKP_2            
1.000                                    
    FBKP_11          
1.000                                    
    FBKP_13          
1.000                                    
    FBKP_14          
1.000                                    



> fitMeasures(out1)
"D3" only available using maximum likelihood estimation. Changed test to "D2".
Robust corrections are made by pooling the naive chi-squared statistic across 5 imputations for which the model converged, then applying the average (across imputations) scaling factor and shift parameter to that pooled value.
To instead pool the robust test statistics, set test = "D2" and pool.robust = TRUE.

"D3" only available using maximum likelihood estimation. Changed test to "D2".
Robust corrections are made by pooling the naive chi-squared statistic across 5 imputations for which the model converged, then applying the average (across imputations) scaling factor and shift parameter to that pooled value.
To instead pool the robust test statistics, set test = "D2" and pool.robust = TRUE.

Error in gp.resid.lavaan.mi(Observed = object@SampleStatsList[useImps], :
 
object 'N' not found
In addition: Warning message:
In pchisq(X2.sc, DF.sc, ncp = N * DF.sc * 0.05^2/nG, lower.tail = FALSE) :
 full precision may
not have been achieved in 'pnchisq'
>
> lavTestLRT.mi(out1)
"D3" only available using maximum likelihood estimation. Changed test to "D2".
Robust correction can only be applied to pooled chi-squared statistic, not F statistic. "asymptotic" was switched to TRUE.
Robust corrections are made by pooling the naive chi-squared statistic across 5 imputations for which the model converged, then applying the average (across imputations) scaling factor and shift parameter to that pooled value.
To instead pool the robust test statistics, set test = "D2" and pool.robust = TRUE.


 chisq df pvalue npar ntotal chisq
.scaled df.scaled
 
478.200 206.000 0.000 135.000 304.000 612.335 206.000
 pvalue
.scaled chisq.scaling.factor chisq.shift.parameters
 
0.000 0.923 94.182
> fitMeasures(out1,test = "D2" , pool.robust = TRUE)

Error in .local(object, fit.measures, baseline.model, ...) :

 unused arguments
(test = "D2", pool.robust = TRUE)






Message has been deleted

Terrence Jorgensen

unread,
Apr 4, 2019, 9:46:11 AM4/4/19
to lavaan
I followed your instructions and installed the latest versions of semTools and lavaan but my problem was not resolved.

What does this output tell you the version numbers are?

sessionInfo()

Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Jan Brederecke

unread,
Apr 5, 2019, 6:08:09 AM4/5/19
to lavaan
R version 3.5.3 (2019-03-11)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6


Matrix products: default
BLAS
: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK
: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib


locale
:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8


attached
base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base    


other attached packages
:
[1] semTools_0.5-1    lavaan_0.6-4.1374


loaded via a
namespace (and not attached):
[1] compiler_3.5.3 tools_3.5.3    mnormt_1.5-5   pbivnorm_0.6.0 stats4_3.5.3  

 I am currently at home but I followed the same procedure at work, creating the same results.

Terrence Jorgensen

unread,
Apr 6, 2019, 4:19:13 PM4/6/19
to lavaan
other attached packages:
[1] semTools_0.5-1    lavaan_0.6-4.1374

It looks like the development version of lavaan installed, but not semTools, because that is the CRAN version, not the current development version (0.5-1.916).  Did you notice an error when you tried installing it?  Make sure the devtools package is installed first:

install.packages("devtools")
devtools
::install_github("simsem/semTools/semTools")

Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Jan Brederecke

unread,
Apr 8, 2019, 4:55:54 AM4/8/19
to lavaan
Dear Terrence,

I follow your instructions but when I try to update semTools from your link, the following error is desplayed:

> devtools::install_github("simsem/semTools/semTools") Error in curl::curl_fetch_memory(url, handle = h) : Failed to connect to api.github.com port 443: Timed out

Kind regards
Jan

Terrence Jorgensen

unread,
Apr 8, 2019, 7:32:56 AM4/8/19
to lavaan
I follow your instructions but when I try to update semTools from your link, the following error is desplayed:

> devtools::install_github("simsem/semTools/semTools") Error in curl::curl_fetch_memory(url, handle = h) : Failed to connect to api.github.com port 443: Timed out


Looks like an internet connection issue, possibly due to security measures by your employer if that's where you tried this.  One of the solutions in this thread might work for you:


If not, I can build a source file for you to download and install manually.

Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Jan Brederecke

unread,
Apr 8, 2019, 9:58:06 AM4/8/19
to lavaan
Terrence,

I highly appreciate your efforts!

After trying what was recommended in your linked forum, still the same error is displayed.

It would be great, to get such a sourcefile and to finally be able to see what my CFA fitmeasures are, as I really want to employ the MI version for that paper.


Thank you so much for all your time and helpful advice!

Jan

Terrence Jorgensen

unread,
Apr 10, 2019, 6:45:05 AM4/10/19
to lavaan
It would be great, to get such a sourcefile 

attached.  Download to your working directory (or anywhere, but add the full path before the file name) and install with

install.packages("semTools_0.5-1.917.tar.gz", type = "source", repos = NULL)

semTools_0.5-1.917.tar.gz

Jan Brederecke

unread,
Apr 10, 2019, 7:49:48 AM4/10/19
to lavaan
Dear Terrence,

thank you for creating the file for me. Unfortunately, it produces an error when I try to load it.
A quick internet search did not really help me but I will try it again, when I come home from work (Windows environment) and have access to my Mac, maybe that helps ?!

Have a great day!
Jan


> install.packages("semTools_0.5-1.917.tar.gz", type = "source", repos = NULL)
Installing package into C:/Users/brederja/Documents/R/win-library/3.5
(as lib is unspecified)
ERROR
: cannot extract package from 'semTools_0.5-1.917.tar.gz'
In R CMD INSTALL
Warning in install.packages :
 installation of
package semTools_0.5-1.917.tar.gz had non-zero exit status

Jan Brederecke

unread,
Apr 11, 2019, 3:37:58 AM4/11/19
to lavaan
Dear Terrence,

thank you so much! It finally worked when I tried it at home! 

Thank you for all your support and efforts!

Best regards
Jan 
Reply all
Reply to author
Forward
0 new messages