Objective

Modelling progression of the dengue illness phenotype. Replication of the SEM analysis presented in:

Park, S., Srikiatkhachorn, A., Kalayanarooj, S., Macareo, L., Green, S., Friedman, J. F., & Rothman, A. L. (2018). Use of structural equation models to predict dengue illness phenotype. PLoS Neglected Tropical Diseases, 12(10), 1–14. https://doi.org/10.1371/journal.pntd.0006799

The paper was worried about the evolution of the Dengue virus (DENV) infection, which, in severe cases, leads to Dengue Haemorrhagic Fever (DHF), characterized by fever, plasma leakage, bleeding diathesis, and thrombocytopenia. Platelet counts and hepatic parameters like ALT were monitored in three moments of time to model the progression of the phenotype in dengue illness.

Original method: SEM using Mplus 8 statistical software. SEM parameters were estimated using the weighted least squares means and variances adjusted estimator with the theta parameterization

Method applied in this analysis: CB-SEM with MLR estimator in R’s package Lavaan. For simplicity, we are not discussing weighted models yet in this post. So, note this is not an exact replication. We are taking a lot of freedom in adjusting models and analysis here.

Data acquisition

library(openxlsx)
## Warning: package 'openxlsx' was built under R version 4.1.3
data<-read.xlsx("Park2018.xlsx")

Let’s explore the datastructure.

str(data)
## 'data.frame':	257 obs. of  22 variables:
##  $ age2        : chr  "12-13" "4-5" "4-5" "8-9" ...
##  $ sex         : num  1 1 2 2 1 1 1 1 2 2 ...
##  $ dengue      : num  1 1 0 1 1 0 1 1 1 1 ...
##  $ dhf         : num  1 0 0 0 0 0 0 0 0 0 ...
##  $ dhf34       : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ ast_m3      : num  25 38 27 167 29 39 32 48 36 35 ...
##  $ alt_m3      : num  10 14 9 109 13 15 10 23 18 16 ...
##  $ wbc_m3      : num  3600 7200 9200 2200 9500 8000 5200 5000 2800 6000 ...
##  $ lymph_m3    : num  16 21 13 34 7 21 16 18 37 11 ...
##  $ albumin_m3  : num  4.5 5.6 4.6 4.8 5 5.9 4.6 3.9 4 4.2 ...
##  $ max_hct_m3  : num  42.5 38 37 40 38 40 42.5 39 38 40 ...
##  $ platelets_m3: num  271000 272000 216000 227000 204000 287000 266000 307000 206000 273000 ...
##  $ tourn_no_m3 : num  21 21 10 21 5 8 21 4 6 4 ...
##  $ ast_m1      : num  53 36 26 248 34 35 43 43 240 97 ...
##  $ alt_m1      : num  15 14 11 174 14 11 9 24 126 28 ...
##  $ wbc_m1      : num  2300 5100 3800 1600 6500 7300 2800 3800 600 3300 ...
##  $ lymph_m1    : num  32 60 41 39 61 45 24 35 42 32 ...
##  $ albumin_m1  : num  4.3 4.6 3.7 4.5 4.9 4.9 3.9 3.8 4.4 4.5 ...
##  $ max_hct_m1  : num  43 39 37 40 36 37 41 39 38 45 ...
##  $ platelets_m1: num  73000 263000 200000 116000 163000 262000 168000 147000 180000 106000 ...
##  $ tourn_no_m1 : num  21 21 0 21 2 4 21 20 14 21 ...
##  $ age_t       : num  12 4 4 8 6 4 8 8 4 6 ...

In this dataset, outcomes cannot be described by a single parameter, but by a set of complementary and possibly multicollinear parameters. Note also that the parameters are monitored and assessed multiple times over a specific period, as the time for results to become apparent can also vary. Such sequential measures are certainly associated. Notably, the intervention improves or worsens, but the ultimate level of results depends on the initial measure.

The same parameters (like platelet count and ALT levels) are assessed 3 days and 1 day before the event (indicated with m3 and m1 at the end of the variable name).

Model

So, the model reflect such association:

  • causal relation among DHF (dengue hemorrhagic fever) and measures 1 day before the event

  • the measures at 1 day before the event as potentially influenced by all the measures at 3 days before the event.

  • hypotheses about the influence of age in the outcome, but also on measures at m3

  • and consider also that the measures can be correlated each other (for example, ALT and AST are known enzymes associated with hepatotoxicity, for example.

library(lavaan)
model="
  dhf~alt_m1+lymph_m1+max_hct_m1+platelets_m1
  ast_m1~alt_m3+wbc_m3+lymph_m3+albumin_m3+platelets_m3+age_t+ast_m3  
  alt_m1~alt_m3+wbc_m3+lymph_m3+albumin_m3+platelets_m3+ast_m3
  wbc_m1~ast_m3+alt_m3+wbc_m3+lymph_m3+albumin_m3+age_t
  lymph_m1~wbc_m3+lymph_m3+max_hct_m3+age_t
  albumin_m1~ast_m3+alt_m3+albumin_m3+platelets_m3
  max_hct_m1~wbc_m3+lymph_m3+albumin_m3+max_hct_m3+age_t
  platelets_m1~wbc_m3+lymph_m3+platelets_m3
  tourn_no_m1~ast_m3+wbc_m3+lymph_m3+albumin_m3+tourn_no_m3+age_t
  
  
  alt_m3~age_t
  wbc_m3~age_t
  lymph_m3~age_t
  max_hct_m3~age_t
  platelets_m3~age_t
  tourn_no_m3~age_t
  
  # covariances
  ast_m1~~alt_m1+albumin_m1+max_hct_m1
  alt_m1~~albumin_m1+max_hct_m1
  wbc_m1~~lymph_m1+platelets_m1
  lymph_m1~~tourn_no_m1
  albumin_m1~~platelets_m1
  max_hct_m1~~platelets_m1+tourn_no_m1
  platelets_m1~~tourn_no_m1
  
  ast_m3~~wbc_m3+platelets_m3 
  alt_m3~~wbc_m3+platelets_m3+ast_m3
  wbc_m3~~lymph_m3+platelets_m3+tourn_no_m3
  lymph_m3~~platelets_m3+tourn_no_m3
  max_hct_m3~~platelets_m3
  "
fit=sem(model=model, data=data,std.ov=TRUE,estimator="MLR",fixed.x = FALSE)

Visualization

Visualization was generated using R’s package semPlots, with some adjustment of the coordinates for each of the variables, and also adding p values for paths.

#17 nodes
ly<-matrix(NA,18,2)
depVar='dhf'
med1=c('ast_m1','alt_m1','wbc_m1','lymph_m1','albumin_m1','max_hct_m1','platelets_m1','tourn_no_m1')
med2=c('ast_m3','alt_m3','wbc_m3','lymph_m3','albumin_m3','max_hct_m3','platelets_m3','tourn_no_m3')
indepVar='age_t'
labels=c()
labels[1]=depVar
ly[1,]=c(1,0)
y=1
for (x in c(1:length(med1))){
  ly[y+x,]=c(0.6,(x/8*1.6-1))
  labels[(x+y)]<-med1[x]
}
y=9
for (x in c(1:length(med2))){
  ly[y+x,]=c(-1,(x/8*1.6-1))
  labels[(x+y)]<-med2[x]
}
labels[18]=indepVar
ly[18,]=c(-0.5,1)

table2<-parameterEstimates(fit,standardized=TRUE)%>%as.data.frame()
table2<-table2[!table2$lhs==table2$rhs,]
b<-gettextf('%.3f \n p=%.3f', table2$std.all, digits=table2$pvalue)

semPaths(fit, layout=ly,
         edgeLabels=b,
         residuals=FALSE,
         style='ram',
         what='est',
         whatLabels = "std",
         cut=0.3,
         sizeMan = 10, # Size of manifest variables
  sizeMan2=3,edge.label.cex = 0.8,label.cex=1,
  
  nCharNodes = 0,fade=TRUE,
  mar = c(1,3,1,3))

Attend how the association among the sequential measures of the variables (m1 and m3) is fragrant. Also note the different parameters are associated. For example, the AST levels on day 3 are significantly associated with albumin levels on day 1.

figure

Parameter table

The summarization on fit measures and parameter estimates are presented bellow. The model is an almost saturated model, and can be still adjusted by removing non-significant paths, for example. Almost because using logic/theory we have not allowed the age being an independent variable for outcome (dhf). But we let it influencing not just the initial measures (at -3 days), but also the measure 1 day before the event. But the results show the model fits well, and that path is not required.

The further adjustment is required/indicated to increase degrees of freedom. With such adjustments, possibly we will depict better some paths which currently standard errors are so high to distinguish if it is significant or not.

summary(fit, fit.measures=TRUE)
## lavaan 0.6-11 ended normally after 48 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                       102
##                                                       
##   Number of observations                           257
##                                                       
## Model Test User Model:
##                                                Standard      Robust
##   Test Statistic                                 99.387      91.350
##   Degrees of freedom                                 69          69
##   P-value (Chi-square)                            0.010       0.037
##   Scaling correction factor                                   1.088
##        Yuan-Bentler correction (Mplus variant)                     
## 
## Model Test Baseline Model:
## 
##   Test statistic                              2032.225    1299.643
##   Degrees of freedom                               152         152
##   P-value                                        0.000       0.000
##   Scaling correction factor                                  1.564
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.984       0.981
##   Tucker-Lewis Index (TLI)                       0.964       0.957
##                                                                   
##   Robust Comparative Fit Index (CFI)                         0.986
##   Robust Tucker-Lewis Index (TLI)                            0.970
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)              -5587.968   -5587.968
##   Scaling correction factor                                  2.743
##       for the MLR correction                                      
##   Loglikelihood unrestricted model (H1)      -5538.274   -5538.274
##   Scaling correction factor                                  2.075
##       for the MLR correction                                      
##                                                                   
##   Akaike (AIC)                               11379.935   11379.935
##   Bayesian (BIC)                             11741.941   11741.941
##   Sample-size adjusted Bayesian (BIC)        11418.570   11418.570
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.041       0.036
##   90 Percent confidence interval - lower         0.021       0.011
##   90 Percent confidence interval - upper         0.059       0.053
##   P-value RMSEA <= 0.05                          0.779       0.908
##                                                                   
##   Robust RMSEA                                               0.037
##   90 Percent confidence interval - lower                     0.010
##   90 Percent confidence interval - upper                     0.056
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.054       0.054
## 
## Parameter Estimates:
## 
##   Standard errors                             Sandwich
##   Information bread                           Observed
##   Observed information based on                Hessian
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   dhf ~                                               
##     alt_m1            0.160    0.059    2.704    0.007
##     lymph_m1         -0.107    0.053   -2.004    0.045
##     max_hct_m1        0.197    0.057    3.449    0.001
##     platelets_m1     -0.243    0.054   -4.461    0.000
##   ast_m1 ~                                            
##     alt_m3           -0.250    0.057   -4.380    0.000
##     wbc_m3           -0.056    0.035   -1.633    0.102
##     lymph_m3         -0.161    0.051   -3.154    0.002
##     albumin_m3       -0.042    0.025   -1.668    0.095
##     platelets_m3     -0.137    0.058   -2.358    0.018
##     age_t            -0.073    0.071   -1.037    0.300
##     ast_m3            0.749    0.105    7.138    0.000
##   alt_m1 ~                                            
##     alt_m3            0.271    0.155    1.751    0.080
##     wbc_m3           -0.071    0.039   -1.845    0.065
##     lymph_m3         -0.093    0.031   -3.012    0.003
##     albumin_m3       -0.068    0.038   -1.784    0.074
##     platelets_m3     -0.093    0.035   -2.699    0.007
##     ast_m3            0.445    0.084    5.304    0.000
##   wbc_m1 ~                                            
##     ast_m3            0.223    0.062    3.595    0.000
##     alt_m3           -0.100    0.040   -2.522    0.012
##     wbc_m3            0.807    0.056   14.528    0.000
##     lymph_m3          0.129    0.040    3.205    0.001
##     albumin_m3       -0.104    0.041   -2.522    0.012
##     age_t            -0.054    0.040   -1.344    0.179
##   lymph_m1 ~                                          
##     wbc_m3           -0.199    0.049   -4.045    0.000
##     lymph_m3          0.281    0.069    4.053    0.000
##     max_hct_m3       -0.079    0.054   -1.466    0.143
##     age_t            -0.175    0.062   -2.818    0.005
##   albumin_m1 ~                                        
##     ast_m3           -0.108    0.059   -1.829    0.067
##     alt_m3            0.008    0.043    0.185    0.853
##     albumin_m3        0.501    0.054    9.339    0.000
##     platelets_m3      0.104    0.054    1.921    0.055
##   max_hct_m1 ~                                        
##     wbc_m3           -0.106    0.051   -2.099    0.036
##     lymph_m3         -0.147    0.050   -2.918    0.004
##     albumin_m3       -0.071    0.047   -1.524    0.128
##     max_hct_m3        0.498    0.072    6.960    0.000
##     age_t             0.178    0.056    3.180    0.001
##   platelets_m1 ~                                      
##     wbc_m3            0.312    0.073    4.274    0.000
##     lymph_m3          0.085    0.049    1.709    0.087
##     platelets_m3      0.519    0.057    9.083    0.000
##   tourn_no_m1 ~                                       
##     ast_m3            0.125    0.037    3.406    0.001
##     wbc_m3           -0.132    0.048   -2.787    0.005
##     lymph_m3         -0.136    0.061   -2.239    0.025
##     albumin_m3       -0.074    0.049   -1.514    0.130
##     tourn_no_m3       0.464    0.052    8.916    0.000
##     age_t             0.114    0.055    2.077    0.038
##   alt_m3 ~                                            
##     age_t             0.127    0.040    3.135    0.002
##   wbc_m3 ~                                            
##     age_t            -0.192    0.051   -3.721    0.000
##   lymph_m3 ~                                          
##     age_t            -0.345    0.061   -5.639    0.000
##   max_hct_m3 ~                                        
##     age_t             0.341    0.061    5.618    0.000
##   platelets_m3 ~                                      
##     age_t            -0.280    0.061   -4.619    0.000
##   tourn_no_m3 ~                                       
##     age_t             0.116    0.062    1.866    0.062
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##  .ast_m1 ~~                                           
##    .alt_m1            0.365    0.190    1.924    0.054
##    .albumin_m1        0.118    0.107    1.098    0.272
##    .max_hct_m1       -0.063    0.035   -1.795    0.073
##  .alt_m1 ~~                                           
##    .albumin_m1        0.094    0.053    1.764    0.078
##    .max_hct_m1       -0.036    0.027   -1.328    0.184
##  .wbc_m1 ~~                                           
##    .lymph_m1         -0.108    0.036   -2.957    0.003
##    .platelets_m1      0.115    0.025    4.607    0.000
##  .lymph_m1 ~~                                         
##    .tourn_no_m1      -0.113    0.041   -2.730    0.006
##  .albumin_m1 ~~                                       
##    .platelets_m1      0.157    0.037    4.194    0.000
##  .max_hct_m1 ~~                                       
##    .platelets_m1     -0.111    0.039   -2.871    0.004
##    .tourn_no_m1       0.108    0.041    2.626    0.009
##  .platelets_m1 ~~                                     
##    .tourn_no_m1      -0.056    0.037   -1.530    0.126
##  .wbc_m3 ~~                                           
##     ast_m3           -0.162    0.035   -4.688    0.000
##  .platelets_m3 ~~                                     
##     ast_m3           -0.184    0.092   -1.996    0.046
##  .alt_m3 ~~                                           
##    .wbc_m3           -0.118    0.033   -3.559    0.000
##    .platelets_m3     -0.095    0.054   -1.784    0.074
##     ast_m3            0.743    0.274    2.710    0.007
##  .wbc_m3 ~~                                           
##    .lymph_m3         -0.379    0.051   -7.499    0.000
##    .platelets_m3      0.299    0.058    5.130    0.000
##    .tourn_no_m3      -0.178    0.053   -3.366    0.001
##  .lymph_m3 ~~                                         
##    .platelets_m3     -0.153    0.061   -2.530    0.011
##    .tourn_no_m3       0.137    0.057    2.403    0.016
##  .max_hct_m3 ~~                                       
##    .platelets_m3     -0.078    0.055   -1.424    0.154
##  .dhf ~~                                              
##    .ast_m1            0.017    0.023    0.746    0.456
##    .wbc_m1            0.019    0.027    0.691    0.490
##    .albumin_m1       -0.018    0.045   -0.404    0.686
##    .tourn_no_m1       0.054    0.041    1.311    0.190
##  .ast_m1 ~~                                           
##    .wbc_m1           -0.010    0.016   -0.604    0.546
##    .tourn_no_m1       0.001    0.016    0.075    0.940
##  .wbc_m1 ~~                                           
##    .albumin_m1        0.022    0.033    0.662    0.508
##    .tourn_no_m1      -0.019    0.027   -0.719    0.472
##  .albumin_m1 ~~                                       
##    .tourn_no_m1      -0.026    0.038   -0.666    0.506
##   albumin_m3 ~~                                       
##     age_t             0.068    0.060    1.136    0.256
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .dhf               0.804    0.078   10.305    0.000
##    .ast_m1            0.571    0.394    1.449    0.147
##    .alt_m1            0.462    0.146    3.153    0.002
##    .wbc_m1            0.382    0.044    8.675    0.000
##    .lymph_m1          0.768    0.079    9.739    0.000
##    .albumin_m1        0.689    0.087    7.956    0.000
##    .max_hct_m1        0.587    0.079    7.412    0.000
##    .platelets_m1      0.500    0.045   11.006    0.000
##    .tourn_no_m1       0.647    0.053   12.104    0.000
##    .alt_m3            0.987    0.408    2.417    0.016
##    .wbc_m3            0.943    0.244    3.869    0.000
##    .lymph_m3          0.877    0.083   10.608    0.000
##    .max_hct_m3        0.880    0.099    8.869    0.000
##    .platelets_m3      0.914    0.090   10.187    0.000
##    .tourn_no_m3       0.983    0.060   16.407    0.000
##     ast_m3            0.996    0.428    2.329    0.020
##     albumin_m3        0.996    0.102    9.727    0.000
##     age_t             0.996    0.068   14.642    0.000

The fit measures can be also extracted using:

fitmeasures(fit)
##                          npar                          fmin 
##                       102.000                         0.193 
##                         chisq                            df 
##                        99.387                        69.000 
##                        pvalue                  chisq.scaled 
##                         0.010                        91.350 
##                     df.scaled                 pvalue.scaled 
##                        69.000                         0.037 
##          chisq.scaling.factor                baseline.chisq 
##                         1.088                      2032.225 
##                   baseline.df               baseline.pvalue 
##                       152.000                         0.000 
##         baseline.chisq.scaled            baseline.df.scaled 
##                      1299.643                       152.000 
##        baseline.pvalue.scaled baseline.chisq.scaling.factor 
##                         0.000                         1.564 
##                           cfi                           tli 
##                         0.984                         0.964 
##                          nnfi                           rfi 
##                         0.964                         0.892 
##                           nfi                          pnfi 
##                         0.951                         0.432 
##                           ifi                           rni 
##                         0.985                         0.984 
##                    cfi.scaled                    tli.scaled 
##                         0.981                         0.957 
##                    cfi.robust                    tli.robust 
##                         0.986                         0.970 
##                   nnfi.scaled                   nnfi.robust 
##                         0.957                         0.970 
##                    rfi.scaled                    nfi.scaled 
##                         0.845                         0.930 
##                    ifi.scaled                    rni.scaled 
##                         0.982                         0.981 
##                    rni.robust                          logl 
##                         0.986                     -5587.968 
##             unrestricted.logl                           aic 
##                     -5538.274                     11379.935 
##                           bic                        ntotal 
##                     11741.941                       257.000 
##                          bic2             scaling.factor.h1 
##                     11418.570                         2.075 
##             scaling.factor.h0                         rmsea 
##                         2.743                         0.041 
##                rmsea.ci.lower                rmsea.ci.upper 
##                         0.021                         0.059 
##                  rmsea.pvalue                  rmsea.scaled 
##                         0.779                         0.036 
##         rmsea.ci.lower.scaled         rmsea.ci.upper.scaled 
##                         0.011                         0.053 
##           rmsea.pvalue.scaled                  rmsea.robust 
##                         0.908                         0.037 
##         rmsea.ci.lower.robust         rmsea.ci.upper.robust 
##                         0.010                         0.056 
##           rmsea.pvalue.robust                           rmr 
##                            NA                         0.054 
##                    rmr_nomean                          srmr 
##                         0.054                         0.054 
##                  srmr_bentler           srmr_bentler_nomean 
##                         0.054                         0.054 
##                          crmr                   crmr_nomean 
##                         0.056                         0.056 
##                    srmr_mplus             srmr_mplus_nomean 
##                         0.054                         0.054 
##                         cn_05                         cn_01 
##                       232.152                       257.587 
##                           gfi                          agfi 
##                         0.961                         0.903 
##                          pgfi                           mfi 
##                         0.388                         0.943 
##                          ecvi 
##                         1.180

And parameter estimates can also obtained by:

parameterestimates(fit,standardized = TRUE)
##              lhs op          rhs    est    se      z pvalue ci.lower ci.upper
## 1            dhf  ~       alt_m1  0.160 0.059  2.704  0.007    0.044    0.276
## 2            dhf  ~     lymph_m1 -0.107 0.053 -2.004  0.045   -0.211   -0.002
## 3            dhf  ~   max_hct_m1  0.197 0.057  3.449  0.001    0.085    0.309
## 4            dhf  ~ platelets_m1 -0.243 0.054 -4.461  0.000   -0.350   -0.136
## 5         ast_m1  ~       alt_m3 -0.250 0.057 -4.380  0.000   -0.362   -0.138
## 6         ast_m1  ~       wbc_m3 -0.056 0.035 -1.633  0.102   -0.124    0.011
## 7         ast_m1  ~     lymph_m3 -0.161 0.051 -3.154  0.002   -0.262   -0.061
## 8         ast_m1  ~   albumin_m3 -0.042 0.025 -1.668  0.095   -0.091    0.007
## 9         ast_m1  ~ platelets_m3 -0.137 0.058 -2.358  0.018   -0.250   -0.023
## 10        ast_m1  ~        age_t -0.073 0.071 -1.037  0.300   -0.212    0.065
## 11        ast_m1  ~       ast_m3  0.749 0.105  7.138  0.000    0.543    0.955
## 12        alt_m1  ~       alt_m3  0.271 0.155  1.751  0.080   -0.032    0.575
## 13        alt_m1  ~       wbc_m3 -0.071 0.039 -1.845  0.065   -0.147    0.004
## 14        alt_m1  ~     lymph_m3 -0.093 0.031 -3.012  0.003   -0.153   -0.032
## 15        alt_m1  ~   albumin_m3 -0.068 0.038 -1.784  0.074   -0.142    0.007
## 16        alt_m1  ~ platelets_m3 -0.093 0.035 -2.699  0.007   -0.161   -0.026
## 17        alt_m1  ~       ast_m3  0.445 0.084  5.304  0.000    0.280    0.609
## 18        wbc_m1  ~       ast_m3  0.223 0.062  3.595  0.000    0.101    0.345
## 19        wbc_m1  ~       alt_m3 -0.100 0.040 -2.522  0.012   -0.178   -0.022
## 20        wbc_m1  ~       wbc_m3  0.807 0.056 14.528  0.000    0.698    0.916
## 21        wbc_m1  ~     lymph_m3  0.129 0.040  3.205  0.001    0.050    0.208
## 22        wbc_m1  ~   albumin_m3 -0.104 0.041 -2.522  0.012   -0.185   -0.023
## 23        wbc_m1  ~        age_t -0.054 0.040 -1.344  0.179   -0.134    0.025
## 24      lymph_m1  ~       wbc_m3 -0.199 0.049 -4.045  0.000   -0.296   -0.103
## 25      lymph_m1  ~     lymph_m3  0.281 0.069  4.053  0.000    0.145    0.416
## 26      lymph_m1  ~   max_hct_m3 -0.079 0.054 -1.466  0.143   -0.186    0.027
## 27      lymph_m1  ~        age_t -0.175 0.062 -2.818  0.005   -0.297   -0.053
## 28    albumin_m1  ~       ast_m3 -0.108 0.059 -1.829  0.067   -0.225    0.008
## 29    albumin_m1  ~       alt_m3  0.008 0.043  0.185  0.853   -0.076    0.092
## 30    albumin_m1  ~   albumin_m3  0.501 0.054  9.339  0.000    0.396    0.606
## 31    albumin_m1  ~ platelets_m3  0.104 0.054  1.921  0.055   -0.002    0.211
## 32    max_hct_m1  ~       wbc_m3 -0.106 0.051 -2.099  0.036   -0.205   -0.007
## 33    max_hct_m1  ~     lymph_m3 -0.147 0.050 -2.918  0.004   -0.245   -0.048
## 34    max_hct_m1  ~   albumin_m3 -0.071 0.047 -1.524  0.128   -0.163    0.020
## 35    max_hct_m1  ~   max_hct_m3  0.498 0.072  6.960  0.000    0.358    0.638
## 36    max_hct_m1  ~        age_t  0.178 0.056  3.180  0.001    0.068    0.288
## 37  platelets_m1  ~       wbc_m3  0.312 0.073  4.274  0.000    0.169    0.455
## 38  platelets_m1  ~     lymph_m3  0.085 0.049  1.709  0.087   -0.012    0.181
## 39  platelets_m1  ~ platelets_m3  0.519 0.057  9.083  0.000    0.407    0.631
## 40   tourn_no_m1  ~       ast_m3  0.125 0.037  3.406  0.001    0.053    0.196
## 41   tourn_no_m1  ~       wbc_m3 -0.132 0.048 -2.787  0.005   -0.226   -0.039
## 42   tourn_no_m1  ~     lymph_m3 -0.136 0.061 -2.239  0.025   -0.254   -0.017
## 43   tourn_no_m1  ~   albumin_m3 -0.074 0.049 -1.514  0.130   -0.170    0.022
## 44   tourn_no_m1  ~  tourn_no_m3  0.464 0.052  8.916  0.000    0.362    0.566
## 45   tourn_no_m1  ~        age_t  0.114 0.055  2.077  0.038    0.006    0.222
## 46        alt_m3  ~        age_t  0.127 0.040  3.135  0.002    0.048    0.206
## 47        wbc_m3  ~        age_t -0.192 0.051 -3.721  0.000   -0.293   -0.091
## 48      lymph_m3  ~        age_t -0.345 0.061 -5.639  0.000   -0.464   -0.225
## 49    max_hct_m3  ~        age_t  0.341 0.061  5.618  0.000    0.222    0.460
## 50  platelets_m3  ~        age_t -0.280 0.061 -4.619  0.000   -0.399   -0.161
## 51   tourn_no_m3  ~        age_t  0.116 0.062  1.866  0.062   -0.006    0.237
## 52        ast_m1 ~~       alt_m1  0.365 0.190  1.924  0.054   -0.007    0.737
## 53        ast_m1 ~~   albumin_m1  0.118 0.107  1.098  0.272   -0.092    0.328
## 54        ast_m1 ~~   max_hct_m1 -0.063 0.035 -1.795  0.073   -0.131    0.006
## 55        alt_m1 ~~   albumin_m1  0.094 0.053  1.764  0.078   -0.010    0.198
## 56        alt_m1 ~~   max_hct_m1 -0.036 0.027 -1.328  0.184   -0.088    0.017
## 57        wbc_m1 ~~     lymph_m1 -0.108 0.036 -2.957  0.003   -0.179   -0.036
## 58        wbc_m1 ~~ platelets_m1  0.115 0.025  4.607  0.000    0.066    0.164
## 59      lymph_m1 ~~  tourn_no_m1 -0.113 0.041 -2.730  0.006   -0.194   -0.032
## 60    albumin_m1 ~~ platelets_m1  0.157 0.037  4.194  0.000    0.083    0.230
## 61    max_hct_m1 ~~ platelets_m1 -0.111 0.039 -2.871  0.004   -0.187   -0.035
## 62    max_hct_m1 ~~  tourn_no_m1  0.108 0.041  2.626  0.009    0.027    0.188
## 63  platelets_m1 ~~  tourn_no_m1 -0.056 0.037 -1.530  0.126   -0.129    0.016
## 64        wbc_m3 ~~       ast_m3 -0.162 0.035 -4.688  0.000   -0.230   -0.094
## 65  platelets_m3 ~~       ast_m3 -0.184 0.092 -1.996  0.046   -0.365   -0.003
## 66        alt_m3 ~~       wbc_m3 -0.118 0.033 -3.559  0.000   -0.183   -0.053
## 67        alt_m3 ~~ platelets_m3 -0.095 0.054 -1.784  0.074   -0.200    0.009
## 68        alt_m3 ~~       ast_m3  0.743 0.274  2.710  0.007    0.206    1.281
## 69        wbc_m3 ~~     lymph_m3 -0.379 0.051 -7.499  0.000   -0.479   -0.280
## 70        wbc_m3 ~~ platelets_m3  0.299 0.058  5.130  0.000    0.185    0.414
## 71        wbc_m3 ~~  tourn_no_m3 -0.178 0.053 -3.366  0.001   -0.281   -0.074
## 72      lymph_m3 ~~ platelets_m3 -0.153 0.061 -2.530  0.011   -0.272   -0.035
## 73      lymph_m3 ~~  tourn_no_m3  0.137 0.057  2.403  0.016    0.025    0.249
## 74    max_hct_m3 ~~ platelets_m3 -0.078 0.055 -1.424  0.154   -0.186    0.029
## 75           dhf ~~          dhf  0.804 0.078 10.305  0.000    0.651    0.957
## 76        ast_m1 ~~       ast_m1  0.571 0.394  1.449  0.147   -0.201    1.343
## 77        alt_m1 ~~       alt_m1  0.462 0.146  3.153  0.002    0.175    0.749
## 78        wbc_m1 ~~       wbc_m1  0.382 0.044  8.675  0.000    0.295    0.468
## 79      lymph_m1 ~~     lymph_m1  0.768 0.079  9.739  0.000    0.613    0.922
## 80    albumin_m1 ~~   albumin_m1  0.689 0.087  7.956  0.000    0.519    0.859
## 81    max_hct_m1 ~~   max_hct_m1  0.587 0.079  7.412  0.000    0.432    0.742
## 82  platelets_m1 ~~ platelets_m1  0.500 0.045 11.006  0.000    0.411    0.589
## 83   tourn_no_m1 ~~  tourn_no_m1  0.647 0.053 12.104  0.000    0.542    0.752
## 84        alt_m3 ~~       alt_m3  0.987 0.408  2.417  0.016    0.187    1.787
## 85        wbc_m3 ~~       wbc_m3  0.943 0.244  3.869  0.000    0.465    1.421
## 86      lymph_m3 ~~     lymph_m3  0.877 0.083 10.608  0.000    0.715    1.039
## 87    max_hct_m3 ~~   max_hct_m3  0.880 0.099  8.869  0.000    0.686    1.075
## 88  platelets_m3 ~~ platelets_m3  0.914 0.090 10.187  0.000    0.738    1.089
## 89   tourn_no_m3 ~~  tourn_no_m3  0.983 0.060 16.407  0.000    0.865    1.100
## 90        ast_m3 ~~       ast_m3  0.996 0.428  2.329  0.020    0.158    1.834
## 91           dhf ~~       ast_m1  0.017 0.023  0.746  0.456   -0.028    0.063
## 92           dhf ~~       wbc_m1  0.019 0.027  0.691  0.490   -0.035    0.073
## 93           dhf ~~   albumin_m1 -0.018 0.045 -0.404  0.686   -0.106    0.070
## 94           dhf ~~  tourn_no_m1  0.054 0.041  1.311  0.190   -0.027    0.134
## 95        ast_m1 ~~       wbc_m1 -0.010 0.016 -0.604  0.546   -0.041    0.022
## 96        ast_m1 ~~  tourn_no_m1  0.001 0.016  0.075  0.940   -0.029    0.032
## 97        wbc_m1 ~~   albumin_m1  0.022 0.033  0.662  0.508   -0.043    0.087
## 98        wbc_m1 ~~  tourn_no_m1 -0.019 0.027 -0.719  0.472   -0.071    0.033
## 99    albumin_m1 ~~  tourn_no_m1 -0.026 0.038 -0.666  0.506   -0.101    0.050
## 100   albumin_m3 ~~   albumin_m3  0.996 0.102  9.727  0.000    0.795    1.197
## 101   albumin_m3 ~~        age_t  0.068 0.060  1.136  0.256   -0.050    0.186
## 102        age_t ~~        age_t  0.996 0.068 14.642  0.000    0.863    1.129
##     std.lv std.all std.nox
## 1    0.160   0.160   0.160
## 2   -0.107  -0.107  -0.107
## 3    0.197   0.199   0.199
## 4   -0.243  -0.241  -0.241
## 5   -0.250  -0.252  -0.252
## 6   -0.056  -0.056  -0.056
## 7   -0.161  -0.162  -0.162
## 8   -0.042  -0.042  -0.042
## 9   -0.137  -0.137  -0.137
## 10  -0.073  -0.074  -0.074
## 11   0.749   0.752   0.752
## 12   0.271   0.275   0.275
## 13  -0.071  -0.072  -0.072
## 14  -0.093  -0.094  -0.094
## 15  -0.068  -0.068  -0.068
## 16  -0.093  -0.094  -0.094
## 17   0.445   0.449   0.449
## 18   0.223   0.222   0.222
## 19  -0.100  -0.100  -0.100
## 20   0.807   0.797   0.797
## 21   0.129   0.129   0.129
## 22  -0.104  -0.104  -0.104
## 23  -0.054  -0.054  -0.054
## 24  -0.199  -0.198  -0.198
## 25   0.281   0.281   0.281
## 26  -0.079  -0.080  -0.080
## 27  -0.175  -0.176  -0.176
## 28  -0.108  -0.110  -0.110
## 29   0.008   0.008   0.008
## 30   0.501   0.510   0.511
## 31   0.104   0.106   0.106
## 32  -0.106  -0.105  -0.105
## 33  -0.147  -0.146  -0.146
## 34  -0.071  -0.071  -0.071
## 35   0.498   0.497   0.497
## 36   0.178   0.178   0.179
## 37   0.312   0.315   0.315
## 38   0.085   0.086   0.086
## 39   0.519   0.527   0.527
## 40   0.125   0.127   0.127
## 41  -0.132  -0.134  -0.134
## 42  -0.136  -0.138  -0.138
## 43  -0.074  -0.075  -0.075
## 44   0.464   0.472   0.472
## 45   0.114   0.116   0.116
## 46   0.127   0.126   0.127
## 47  -0.192  -0.193  -0.194
## 48  -0.345  -0.345  -0.345
## 49   0.341   0.341   0.342
## 50  -0.280  -0.281  -0.281
## 51   0.116   0.116   0.116
## 52   0.365   0.711   0.711
## 53   0.118   0.188   0.188
## 54  -0.063  -0.108  -0.108
## 55   0.094   0.167   0.167
## 56  -0.036  -0.069  -0.069
## 57  -0.108  -0.199  -0.199
## 58   0.115   0.264   0.264
## 59  -0.113  -0.160  -0.160
## 60   0.157   0.267   0.267
## 61  -0.111  -0.206  -0.206
## 62   0.108   0.175   0.175
## 63  -0.056  -0.099  -0.099
## 64  -0.162  -0.167  -0.167
## 65  -0.184  -0.193  -0.193
## 66  -0.118  -0.123  -0.123
## 67  -0.095  -0.101  -0.101
## 68   0.743   0.750   0.750
## 69  -0.379  -0.417  -0.417
## 70   0.299   0.323   0.323
## 71  -0.178  -0.185  -0.185
## 72  -0.153  -0.171  -0.171
## 73   0.137   0.148   0.148
## 74  -0.078  -0.087  -0.087
## 75   0.804   0.820   0.820
## 76   0.571   0.577   0.577
## 77   0.462   0.472   0.472
## 78   0.382   0.381   0.381
## 79   0.768   0.775   0.775
## 80   0.689   0.716   0.716
## 81   0.587   0.587   0.587
## 82   0.500   0.519   0.519
## 83   0.647   0.672   0.672
## 84   0.987   0.984   0.984
## 85   0.943   0.963   0.963
## 86   0.877   0.881   0.881
## 87   0.880   0.883   0.883
## 88   0.914   0.921   0.921
## 89   0.983   0.987   0.987
## 90   0.996   1.000   1.000
## 91   0.017   0.026   0.026
## 92   0.019   0.034   0.034
## 93  -0.018  -0.024  -0.024
## 94   0.054   0.074   0.074
## 95  -0.010  -0.021  -0.021
## 96   0.001   0.002   0.002
## 97   0.022   0.043   0.043
## 98  -0.019  -0.038  -0.038
## 99  -0.026  -0.038  -0.038
## 100  0.996   1.000   0.996
## 101  0.068   0.069   0.068
## 102  0.996   1.000   0.996

Residual covariances

lavResiduals(fit,zstat=TRUE, type='cor')
## $type
## [1] "cor.bollen"
## 
## $cov
##              dhf    ast_m1 alt_m1 wbc_m1 lymp_1 albm_1 mx_h_1 pltl_1 trn__1
## dhf           0.000                                                        
## ast_m1        0.031  0.000                                                 
## alt_m1        0.027  0.002  0.000                                          
## wbc_m1       -0.044 -0.044 -0.033  0.000                                   
## lymph_m1      0.000 -0.014 -0.040 -0.011  0.000                            
## albumin_m1    0.011 -0.087 -0.099 -0.016  0.036  0.000                     
## max_hct_m1    0.010 -0.016  0.021 -0.018  0.028  0.038  0.000              
## platelets_m1 -0.020 -0.068 -0.071  0.016  0.001  0.036 -0.037  0.000       
## tourn_no_m1   0.105  0.065  0.067  0.005 -0.028 -0.051 -0.014 -0.065  0.000
## alt_m3        0.021  0.007  0.004  0.009 -0.026 -0.105  0.023 -0.052  0.020
## wbc_m3       -0.060 -0.039 -0.027 -0.011 -0.006  0.017 -0.007 -0.006 -0.018
## lymph_m3      0.047  0.080  0.066  0.016  0.005 -0.037 -0.007 -0.011  0.026
## max_hct_m3   -0.067  0.073  0.100  0.007 -0.019  0.013  0.001 -0.029  0.050
## platelets_m3  0.041 -0.009 -0.012  0.060  0.002  0.094 -0.062  0.025 -0.067
## tourn_no_m3   0.171  0.085  0.071  0.016 -0.069 -0.092 -0.009 -0.080  0.028
## albumin_m3    0.041 -0.109 -0.144  0.005  0.014  0.023  0.079  0.091 -0.036
## age_t        -0.008  0.033  0.041 -0.009  0.000  0.042  0.003 -0.018 -0.008
## ast_m3        0.062  0.012  0.008 -0.009 -0.022 -0.119 -0.065 -0.061  0.053
##              alt_m3 wbc_m3 lymp_3 mx_h_3 pltl_3 trn__3 albm_3 age_t  ast_m3
## dhf                                                                        
## ast_m1                                                                     
## alt_m1                                                                     
## wbc_m1                                                                     
## lymph_m1                                                                   
## albumin_m1                                                                 
## max_hct_m1                                                                 
## platelets_m1                                                               
## tourn_no_m1                                                                
## alt_m3        0.000                                                        
## wbc_m3       -0.006  0.000                                                 
## lymph_m3      0.029 -0.015  0.000                                          
## max_hct_m3    0.075 -0.010 -0.031  0.000                                   
## platelets_m3 -0.002  0.011 -0.022 -0.009  0.000                            
## tourn_no_m3   0.030 -0.023  0.003  0.056 -0.048  0.000                     
## albumin_m3   -0.176  0.066 -0.094  0.139  0.180 -0.032  0.000              
## age_t        -0.026  0.007  0.000  0.000  0.007  0.000  0.000  0.000       
## ast_m3       -0.002 -0.043  0.100  0.092 -0.011  0.119 -0.189 -0.036  0.000
## 
## $cov.z
##              dhf    ast_m1 alt_m1 wbc_m1 lymp_1 albm_1 mx_h_1 pltl_1 trn__1
## dhf           0.000                                                        
## ast_m1        1.006  0.000                                                 
## alt_m1        1.151  0.191  0.000                                          
## wbc_m1       -1.125 -1.540 -1.025  0.000                                   
## lymph_m1     -0.016 -0.151 -0.559 -0.567  0.000                            
## albumin_m1    0.294 -3.972 -3.232 -0.368  0.581  0.000                     
## max_hct_m1    0.560 -0.380  0.434 -0.462  0.579  0.625  0.000              
## platelets_m1 -1.175 -1.338 -1.476  0.632  0.020  1.216 -0.956  0.000       
## tourn_no_m1   2.984  1.930  1.852  0.230 -1.048 -1.454 -0.380 -1.568  0.000
## alt_m3        0.354  0.342  0.366  0.435 -0.445 -2.308  0.353 -1.235  0.518
## wbc_m3       -1.485 -2.217 -1.529 -2.364 -0.720  0.308 -0.306 -0.460 -1.621
## lymph_m3      0.778  2.271  1.644  1.572  0.440 -0.629 -0.268 -0.643  2.744
## max_hct_m3   -1.028  0.506  0.805  0.125 -0.669  0.204  0.017 -0.579  0.815
## platelets_m3  0.928 -0.474 -0.576  1.443  0.039  3.050 -1.340  2.331 -1.217
## tourn_no_m3   2.626  1.843  1.518  0.355 -1.207 -1.495 -0.160 -1.294  2.422
## albumin_m3    0.680 -2.000 -2.362  0.147  0.234  1.412  1.397  1.657 -0.972
## age_t        -0.140  0.657  0.703 -0.755 -0.043  0.815  0.264 -0.426 -0.929
## ast_m3        1.210  0.837  0.848 -0.339 -0.292 -3.309 -0.949 -1.098  1.468
##              alt_m3 wbc_m3 lymp_3 mx_h_3 pltl_3 trn__3 albm_3 age_t  ast_m3
## dhf                                                                        
## ast_m1                                                                     
## alt_m1                                                                     
## wbc_m1                                                                     
## lymph_m1                                                                   
## albumin_m1                                                                 
## max_hct_m1                                                                 
## platelets_m1                                                               
## tourn_no_m1                                                                
## alt_m3        0.000                                                        
## wbc_m3       -0.296  0.000                                                 
## lymph_m3      0.587 -1.666  0.000                                          
## max_hct_m3    0.822 -0.227 -0.592  0.000                                   
## platelets_m3 -0.083  0.887 -0.996 -0.276  0.000                            
## tourn_no_m3   0.588 -0.991  0.138  0.925 -0.779  0.000                     
## albumin_m3   -2.076  1.407 -1.622  2.292  2.769 -0.512  0.000              
## age_t        -0.578  0.921  0.017  0.000  0.534  0.000  0.000  0.000       
## ast_m3       -0.244 -1.934  1.880  0.542 -0.331  2.028 -2.078 -0.601  0.000
## 
## $summary
##                            cov
## crmr                     0.056
## crmr.se                  0.012
## crmr.exactfit.z          0.841
## crmr.exactfit.pvalue     0.200
## ucrmr                    0.031
## ucrmr.se                 0.016
## ucrmr.ci.lower           0.005
## ucrmr.cilupper           0.058
## ucrmr.closefit.h0.value  0.050
## ucrmr.closefit.z        -1.171
## ucrmr.closefit.pvalue    0.879

Modification indices

To adjust further the model, one useful output is the modification indices:

modificationindices(fit,standardized = TRUE)%>%arrange(-mi)%>%head()
##          lhs op          rhs     mi    epc sepc.lv sepc.all sepc.nox
## 1 albumin_m3  ~       alt_m1 11.127 -0.292  -0.292   -0.290   -0.290
## 2 max_hct_m1 ~~       ast_m3 11.125 -0.100  -0.100   -0.131   -0.131
## 3 albumin_m3  ~ platelets_m3  9.104  0.196   0.196    0.196    0.196
## 4 albumin_m3  ~       ast_m3  8.962 -0.186  -0.186   -0.186   -0.186
## 5 albumin_m3  ~       alt_m3  7.908 -0.176  -0.176   -0.176   -0.176
## 6        dhf  ~  tourn_no_m1  7.714  0.305   0.305    0.302    0.302

Categories: , ,

Updated: