Continuous-time longitudinal IRT model

This vignette illustrates how to estimate a longitudinal IRT following the methodology described in Proust-Lima et al. (2022 - https://doi.org/10.1016/j.ymeth.2022.01.005). The model combines a graded response measurement model to link a series of binary or ordinal items measured repeatedly over time with their underlying latent process. Simultaneously, a linear mixed model describes the trajectory of the underlying latent process over time.

Importation

The longitudinal IRT model is estimated via multlcmm function of lcmm R package (Proust-Lima et al. 2017). The following libraries are used in this vignette:

library(lcmm)
library(ggplot2)
library(ggpubr)
library(splines)
library(gridExtra)
library(dplyr)

Dataset

The illustration is on a simulated dataset that mimics the PREDIALA study described and analyzed in Proust-Lima et al. (2021). The dataset is called simdataIRT. It contains the following information:

str(simdataHADS)
#> 'data.frame':    1140 obs. of  13 variables:
#>  $ grp       : int  1 0 0 0 0 0 1 0 0 0 ...
#>  $ sex       : int  1 0 0 0 0 0 1 1 1 1 ...
#>  $ age       : num  59.5 58.2 58.2 58.2 58.2 ...
#>  $ hads_2    : int  0 3 1 1 1 2 2 3 3 2 ...
#>  $ hads_4    : int  0 0 0 1 0 1 3 2 2 2 ...
#>  $ hads_6    : int  0 0 1 1 0 1 1 1 2 2 ...
#>  $ hads_8    : int  1 0 1 0 1 1 1 2 1 2 ...
#>  $ hads_10   : int  0 0 2 0 0 1 1 3 1 2 ...
#>  $ hads_12   : int  0 0 0 0 0 1 2 3 3 2 ...
#>  $ hads_14   : int  0 0 0 0 0 0 0 0 0 1 ...
#>  $ ID        : int  1 2 2 2 2 2 3 4 4 4 ...
#>  $ time      : num  7.74 3.18 8.95 15.08 19.74 ...
#>  $ time_entry: num  7.74 3.18 3.18 3.18 3.18 ...

Description of the sample

Timescale of interest: time on the waiting list

The timescale of interest is the time in months spent on the waiting list: time. This timescale poses two problems:

Distribution of the time at entry and time at follow_ups

Quantiles of the distribution of measurement times

Continuous-time longitudinal IRT model estimation

We consider here a longitudinal IRT model with natural cubic splines on time on the waiting list to account for a possible nonlinear trajectory over time, and we adjust the trajectory for the group. We consider 2 internal knots placed at 7 and 15, and shift the right boundary at 60 due to the long tail of the distribution. In the main analysis, we estimate a model with no differential item functioning (DIF) on the group and no response shift (RS) on time.

Estimation of the model with no DIF/RS

To reduce the computation time, we first estimate a model with only 1 random-effect, a random intercept. And then, we use the estimates as initial values for the estimation of the model that also includes random-effects on the time functions. Estimation involves a numerical integration approximated by quasi Monte-Carlo (QMC) with 1000 points. This induces very intensive and long computations but was shown to give accurate results in simulations.

The summary of the estimation:

summary(modIRT)
#> General latent class mixed model 
#>      fitted by maximum likelihood method 
#>  
#> multlcmm(fixed = hads_2 + hads_4 + hads_6 + hads_8 + hads_10 + 
#>     hads_12 + hads_14 ~ ns(time, knots = c(7, 15), Boundary.knots = c(0, 
#>     60)) * grp, random = ~1 + ns(time, knots = c(7, 15), Boundary.knots = c(0, 
#>     60)), subject = "ID", link = "thresholds", data = simdataHADS, 
#>     methInteg = "QMC", nMC = 1000, nproc = 20)
#>  
#> Statistical Model: 
#>      Dataset: simdataHADS 
#>      Number of subjects: 561 
#>      Number of observations: 7980 
#>      Number of latent classes: 1 
#>      Number of parameters: 44  
#>      Link functions: Thresholds for hads_2 
#>                      Thresholds for hads_4 
#>                      Thresholds for hads_6 
#>                      Thresholds for hads_8 
#>                      Thresholds for hads_10 
#>                      Thresholds for hads_12 
#>                      Thresholds for hads_14 
#>  
#> Iteration process: 
#>      Convergence criteria satisfied 
#>      Number of iterations:  23 
#>      Convergence criteria: parameters= 1.5e-07 
#>                          : likelihood= 2.9e-05 
#>                          : second derivatives= 6e-06 
#>  
#> Goodness-of-fit statistics: 
#>      maximum log-likelihood: -7218.07  
#>      AIC: 14524.13  
#>      BIC: 14714.64  
#>  
#> Maximum Likelihood Estimates: 
#>  
#> Fixed effects in the longitudinal model:
#> 
#>                               coef      Se   Wald p-value
#> intercept (not estimated)  0.00000                       
#> ns(...)1                  -0.12557 0.13637 -0.921 0.35718
#> ns(...)2                   0.21602 0.22892  0.944 0.34534
#> ns(...)3                   0.52819 0.17406  3.034 0.00241
#> grp                       -0.56649 0.15226 -3.721 0.00020
#> ns(...)1:grp               0.21044 0.20316  1.036 0.30027
#> ns(...)2:grp               0.46316 0.33009  1.403 0.16058
#> ns(...)3:grp              -0.00636 0.24646 -0.026 0.97942
#> 
#> 
#> Variance-covariance matrix of the random-effects:
#> (the variance of the first random effect is not estimated)
#>           intercept ns(...)1 ns(...)2 ns(...)3
#> intercept   1.00000                           
#> ns(...)1   -0.46121  0.84470                  
#> ns(...)2   -1.14421  1.12605  2.66212         
#> ns(...)3   -0.26878  0.58923  0.66262  0.46238
#> 
#>                            hads_2   hads_4   hads_6   hads_8  hads_10  hads_12
#> Residual standard error:  0.79159  0.64076  1.03750  1.00833  1.06157  0.68536
#>                           hads_14
#> Residual standard error:  1.63011
#> 
#> Parameters of the link functions:
#> 
#>                     coef      Se   Wald p-value
#> hads_2-Thresh1  -0.53483 0.11863 -4.508 0.00001
#> hads_2-Thresh2   1.13007 0.05254 21.509 0.00000
#> hads_2-Thresh3   0.89283 0.04974 17.949 0.00000
#> hads_4-Thresh1  -0.22854 0.10998 -2.078 0.03770
#> hads_4-Thresh2   1.01804 0.04766 21.361 0.00000
#> hads_4-Thresh3   1.04826 0.05791 18.102 0.00000
#> hads_6-Thresh1  -0.37848 0.11770 -3.216 0.00130
#> hads_6-Thresh2   1.35627 0.06718 20.188 0.00000
#> hads_6-Thresh3   1.32585 0.09338 14.198 0.00000
#> hads_8-Thresh1  -1.37992 0.16595 -8.315 0.00000
#> hads_8-Thresh2   1.34364 0.06319 21.262 0.00000
#> hads_8-Thresh3   1.10211 0.05741 19.196 0.00000
#> hads_10-Thresh1 -0.01232 0.11044 -0.112 0.91115
#> hads_10-Thresh2  1.00872 0.05355 18.839 0.00000
#> hads_10-Thresh3  1.10947 0.06459 17.176 0.00000
#> hads_12-Thresh1 -0.19444 0.11018 -1.765 0.07760
#> hads_12-Thresh2  0.99923 0.04764 20.973 0.00000
#> hads_12-Thresh3  1.02758 0.05720 17.966 0.00000
#> hads_14-Thresh1  0.92540 0.17048  5.428 0.00000
#> hads_14-Thresh2  1.49075 0.09725 15.330 0.00000
#> hads_14-Thresh3  0.87089 0.10087  8.634 0.00000

Predicted underlying depressive symptomatolgy trajectory

Location and discrimination of the items (with SE by Delta-Method)

The location and discrimination parameters are transformations of the estimated parameters. They are retrieved with the following code:

The 3 thresholds and discrimination estimates of each item are:

item category probability curve

The curve of each item category probability according to the underlying level of depressive symptomatology can be obtain usinf the ItemInfo function.

Item characteristic curves

The following code computes the expectation of each item according to the underlying level of depressive symptomatology. This is achieved with predictYcond function with two plot possibilities: direct plot function or ggplot

Item Information Function

The level of information brought by each item category (information share) and brought in total by each item is also computed by the ItemInfo function. The curves can be again plotted directly with options which=“LevelInfo” and which=“ItemInfo” respectively.

Predicted item trajectory according to time

Item predicted trajectories according to a specific profile of covariates can be computed using predictY function:

Assessment of DIF and RS

Estimation of the IRT model with a DIF on group

DIF is programmed using contrasts (item-specific departure around the mean effect on the underlying latent process)

sumDIF <- summary(modIRT_DIFg)
#> General latent class mixed model 
#>      fitted by maximum likelihood method 
#>  
#> multlcmm(fixed = hads_2 + hads_4 + hads_6 + hads_8 + hads_10 + 
#>     hads_12 + hads_14 ~ ns(time, knots = c(7, 15), Boundary.knots = c(0, 
#>     60)) * (grp) + contrast(grp), random = ~1 + ns(time, knots = c(7, 
#>     15), Boundary.knots = c(0, 60)), subject = "ID", link = "thresholds", 
#>     data = simdataHADS, methInteg = "QMC", nMC = 1000)
#>  
#> Statistical Model: 
#>      Dataset: simdataHADS 
#>      Number of subjects: 561 
#>      Number of observations: 7980 
#>      Number of latent classes: 1 
#>      Number of parameters: 50  
#>      Link functions: Thresholds for hads_2 
#>                      Thresholds for hads_4 
#>                      Thresholds for hads_6 
#>                      Thresholds for hads_8 
#>                      Thresholds for hads_10 
#>                      Thresholds for hads_12 
#>                      Thresholds for hads_14 
#>  
#> Iteration process: 
#>      Convergence criteria satisfied 
#>      Number of iterations:  13 
#>      Convergence criteria: parameters= 1.3e-07 
#>                          : likelihood= 5.3e-06 
#>                          : second derivatives= 9e-07 
#>  
#> Goodness-of-fit statistics: 
#>      maximum log-likelihood: -7214.28  
#>      AIC: 14528.56  
#>      BIC: 14745.05  
#>  
#> Maximum Likelihood Estimates: 
#>  
#> Fixed effects in the longitudinal model:
#> 
#>                                  coef      Se   Wald p-value
#> intercept (not estimated)     0.00000                       
#> ns(...)1                     -0.12748 0.14988 -0.851 0.39501
#> ns(...)2                      0.21532 0.28874  0.746 0.45583
#> ns(...)3                      0.53107 0.18189  2.920 0.00350
#> grp                          -0.53889 0.16731 -3.221 0.00128
#> ns(...)1:grp                  0.21171 0.20603  1.028 0.30413
#> ns(...)2:grp                  0.46671 0.34710  1.345 0.17875
#> ns(...)3:grp                 -0.00820 0.21014 -0.039 0.96885
#> Contrasts on grp (p=0.29283)                                
#> hads_2                       -0.02642 0.05645 -0.468 0.63972
#> hads_4                       -0.02348 0.05147 -0.456 0.64819
#> hads_6                       -0.00915 0.07182 -0.127 0.89860
#> hads_8                        0.03429 0.06495  0.528 0.59756
#> hads_10                      -0.09224 0.07381 -1.250 0.21142
#> hads_12                      -0.10713 0.05455 -1.964 0.04954
#> hads_14**                     0.22413 0.11256  1.991 0.04646
#> 
#> 
#> Variance-covariance matrix of the random-effects:
#> (the variance of the first random effect is not estimated)
#>           intercept ns(...)1 ns(...)2 ns(...)3
#> intercept   1.00000                           
#> ns(...)1   -0.46196  0.85115                  
#> ns(...)2   -1.14653  1.13101  2.67135         
#> ns(...)3   -0.27252  0.59376  0.66774  0.46547
#> 
#>                            hads_2   hads_4   hads_6   hads_8  hads_10  hads_12
#> Residual standard error:  0.79214  0.63961  1.03469  0.99749  1.07431  0.69536
#>                           hads_14
#> Residual standard error:  1.55512
#> 
#> Parameters of the link functions:
#> 
#>                     coef      Se   Wald p-value
#> hads_2-Thresh1  -0.53412 0.14549 -3.671 0.00024
#> hads_2-Thresh2   1.13040 0.05280 21.408 0.00000
#> hads_2-Thresh3   0.89312 0.04989 17.903 0.00000
#> hads_4-Thresh1  -0.22590 0.13702 -1.649 0.09922
#> hads_4-Thresh2   1.01769 0.04765 21.358 0.00000
#> hads_4-Thresh3   1.04790 0.05780 18.129 0.00000
#> hads_6-Thresh1  -0.36726 0.14755 -2.489 0.01281
#> hads_6-Thresh2   1.35459 0.06746 20.079 0.00000
#> hads_6-Thresh3   1.32477 0.09338 14.187 0.00000
#> hads_8-Thresh1  -1.33351 0.18354 -7.265 0.00000
#> hads_8-Thresh2   1.33761 0.06297 21.242 0.00000
#> hads_8-Thresh3   1.09643 0.05722 19.161 0.00000
#> hads_10-Thresh1 -0.04701 0.14524 -0.324 0.74620
#> hads_10-Thresh2  1.01460 0.05447 18.627 0.00000
#> hads_10-Thresh3  1.11577 0.06559 17.011 0.00000
#> hads_12-Thresh1 -0.24013 0.13820 -1.738 0.08228
#> hads_12-Thresh2  1.00629 0.04810 20.923 0.00000
#> hads_12-Thresh3  1.03509 0.05774 17.928 0.00000
#> hads_14-Thresh1  1.02240 0.19798  5.164 0.00000
#> hads_14-Thresh2  1.46048 0.09380 15.570 0.00000
#> hads_14-Thresh3  0.85264 0.09818  8.685 0.00000
#> 
#>  ** coefficient not estimated but obtained from the others as minus the sum of them 
#> 
sumDIF[,2]
#>    intercept (not estimated)                     ns(...)1 
#>                           NA                      0.14988 
#>                     ns(...)2                     ns(...)3 
#>                      0.28874                      0.18189 
#>                          grp                 ns(...)1:grp 
#>                      0.16731                      0.20603 
#>                 ns(...)2:grp                 ns(...)3:grp 
#>                      0.34710                      0.21014 
#> Contrasts on grp (p=0.29283)                       hads_2 
#>                           NA                      0.05645 
#>                       hads_4                       hads_6 
#>                      0.05147                      0.07182 
#>                       hads_8                      hads_10 
#>                      0.06495                      0.07381 
#>                      hads_12                    hads_14** 
#>                      0.05455                      0.11256

To be done again …. L’item 2 est le seul item qui semble être différent entre les groupes (p=0.0071) avec un niveau plus faible chez les preemptive par rapport aux autres items. Au global, la différence de groupe entre les 7 items ne semble pas significative (p=0.2665 au global (Chi2 à 6 degrés de liberté)).

Global test for contrasts

95% confidence interval of the difference between groups for item 2:

sum <- summary(modIRT_DIFg)[10,]
#> General latent class mixed model 
#>      fitted by maximum likelihood method 
#>  
#> multlcmm(fixed = hads_2 + hads_4 + hads_6 + hads_8 + hads_10 + 
#>     hads_12 + hads_14 ~ ns(time, knots = c(7, 15), Boundary.knots = c(0, 
#>     60)) * (grp) + contrast(grp), random = ~1 + ns(time, knots = c(7, 
#>     15), Boundary.knots = c(0, 60)), subject = "ID", link = "thresholds", 
#>     data = simdataHADS, methInteg = "QMC", nMC = 1000)
#>  
#> Statistical Model: 
#>      Dataset: simdataHADS 
#>      Number of subjects: 561 
#>      Number of observations: 7980 
#>      Number of latent classes: 1 
#>      Number of parameters: 50  
#>      Link functions: Thresholds for hads_2 
#>                      Thresholds for hads_4 
#>                      Thresholds for hads_6 
#>                      Thresholds for hads_8 
#>                      Thresholds for hads_10 
#>                      Thresholds for hads_12 
#>                      Thresholds for hads_14 
#>  
#> Iteration process: 
#>      Convergence criteria satisfied 
#>      Number of iterations:  13 
#>      Convergence criteria: parameters= 1.3e-07 
#>                          : likelihood= 5.3e-06 
#>                          : second derivatives= 9e-07 
#>  
#> Goodness-of-fit statistics: 
#>      maximum log-likelihood: -7214.28  
#>      AIC: 14528.56  
#>      BIC: 14745.05  
#>  
#> Maximum Likelihood Estimates: 
#>  
#> Fixed effects in the longitudinal model:
#> 
#>                                  coef      Se   Wald p-value
#> intercept (not estimated)     0.00000                       
#> ns(...)1                     -0.12748 0.14988 -0.851 0.39501
#> ns(...)2                      0.21532 0.28874  0.746 0.45583
#> ns(...)3                      0.53107 0.18189  2.920 0.00350
#> grp                          -0.53889 0.16731 -3.221 0.00128
#> ns(...)1:grp                  0.21171 0.20603  1.028 0.30413
#> ns(...)2:grp                  0.46671 0.34710  1.345 0.17875
#> ns(...)3:grp                 -0.00820 0.21014 -0.039 0.96885
#> Contrasts on grp (p=0.29283)                                
#> hads_2                       -0.02642 0.05645 -0.468 0.63972
#> hads_4                       -0.02348 0.05147 -0.456 0.64819
#> hads_6                       -0.00915 0.07182 -0.127 0.89860
#> hads_8                        0.03429 0.06495  0.528 0.59756
#> hads_10                      -0.09224 0.07381 -1.250 0.21142
#> hads_12                      -0.10713 0.05455 -1.964 0.04954
#> hads_14**                     0.22413 0.11256  1.991 0.04646
#> 
#> 
#> Variance-covariance matrix of the random-effects:
#> (the variance of the first random effect is not estimated)
#>           intercept ns(...)1 ns(...)2 ns(...)3
#> intercept   1.00000                           
#> ns(...)1   -0.46196  0.85115                  
#> ns(...)2   -1.14653  1.13101  2.67135         
#> ns(...)3   -0.27252  0.59376  0.66774  0.46547
#> 
#>                            hads_2   hads_4   hads_6   hads_8  hads_10  hads_12
#> Residual standard error:  0.79214  0.63961  1.03469  0.99749  1.07431  0.69536
#>                           hads_14
#> Residual standard error:  1.55512
#> 
#> Parameters of the link functions:
#> 
#>                     coef      Se   Wald p-value
#> hads_2-Thresh1  -0.53412 0.14549 -3.671 0.00024
#> hads_2-Thresh2   1.13040 0.05280 21.408 0.00000
#> hads_2-Thresh3   0.89312 0.04989 17.903 0.00000
#> hads_4-Thresh1  -0.22590 0.13702 -1.649 0.09922
#> hads_4-Thresh2   1.01769 0.04765 21.358 0.00000
#> hads_4-Thresh3   1.04790 0.05780 18.129 0.00000
#> hads_6-Thresh1  -0.36726 0.14755 -2.489 0.01281
#> hads_6-Thresh2   1.35459 0.06746 20.079 0.00000
#> hads_6-Thresh3   1.32477 0.09338 14.187 0.00000
#> hads_8-Thresh1  -1.33351 0.18354 -7.265 0.00000
#> hads_8-Thresh2   1.33761 0.06297 21.242 0.00000
#> hads_8-Thresh3   1.09643 0.05722 19.161 0.00000
#> hads_10-Thresh1 -0.04701 0.14524 -0.324 0.74620
#> hads_10-Thresh2  1.01460 0.05447 18.627 0.00000
#> hads_10-Thresh3  1.11577 0.06559 17.011 0.00000
#> hads_12-Thresh1 -0.24013 0.13820 -1.738 0.08228
#> hads_12-Thresh2  1.00629 0.04810 20.923 0.00000
#> hads_12-Thresh3  1.03509 0.05774 17.928 0.00000
#> hads_14-Thresh1  1.02240 0.19798  5.164 0.00000
#> hads_14-Thresh2  1.46048 0.09380 15.570 0.00000
#> hads_14-Thresh3  0.85264 0.09818  8.685 0.00000
#> 
#>  ** coefficient not estimated but obtained from the others as minus the sum of them 
#> 
c(sum[1],sum[1]- qnorm(0.975)*sum[2],sum[1]+ qnorm(0.975)*sum[2])
#>        coef        coef        coef 
#> -0.02642000 -0.13705997  0.08421997

C. Estimation of the IRT model with a Response Shift over time

Response Shift is modelled by adding contrasts on the functions of time

summary(modIRT_DIFt)
#> General latent class mixed model 
#>      fitted by maximum likelihood method 
#>  
#> multlcmm(fixed = hads_2 + hads_4 + hads_6 + hads_8 + hads_10 + 
#>     hads_12 + hads_14 ~ ns(time, knots = c(7, 15), Boundary.knots = c(0, 
#>     60)) * (grp) + contrast(ns(time, knots = c(7, 15), Boundary.knots = c(0, 
#>     60))), random = ~1 + ns(time, knots = c(7, 15), Boundary.knots = c(0, 
#>     60)), subject = "ID", link = "thresholds", data = simdataHADS, 
#>     methInteg = "QMC", nMC = 1000)
#>  
#> Statistical Model: 
#>      Dataset: simdataHADS 
#>      Number of subjects: 561 
#>      Number of observations: 7980 
#>      Number of latent classes: 1 
#>      Number of parameters: 62  
#>      Link functions: Thresholds for hads_2 
#>                      Thresholds for hads_4 
#>                      Thresholds for hads_6 
#>                      Thresholds for hads_8 
#>                      Thresholds for hads_10 
#>                      Thresholds for hads_12 
#>                      Thresholds for hads_14 
#>  
#> Iteration process: 
#>      Convergence criteria satisfied 
#>      Number of iterations:  25 
#>      Convergence criteria: parameters= 7.7e-07 
#>                          : likelihood= 2e-05 
#>                          : second derivatives= 1.5e-06 
#>  
#> Goodness-of-fit statistics: 
#>      maximum log-likelihood: -7205.82  
#>      AIC: 14535.65  
#>      BIC: 14804.09  
#>  
#> Maximum Likelihood Estimates: 
#>  
#> Fixed effects in the longitudinal model:
#> 
#>                                       coef      Se   Wald p-value
#> intercept (not estimated)          0.00000                       
#> ns(...)1                          -0.15118 0.14527 -1.041 0.29799
#> ns(...)2                           0.24201 0.22065  1.097 0.27273
#> ns(...)3                           0.51599 0.14376  3.589 0.00033
#> grp                               -0.56666 0.14421 -3.929 0.00009
#> ns(...)1:grp                       0.20990 0.19824  1.059 0.28967
#> ns(...)2:grp                       0.46825 0.26337  1.778 0.07541
#> ns(...)3:grp                      -0.00269 0.10362 -0.026 0.97926
#> Contrasts on ns(...)1 (p=0.19144)                                
#> hads_2                             0.08808 0.12351  0.713 0.47575
#> hads_4                             0.11588 0.11125  1.042 0.29762
#> hads_6                            -0.44923 0.16043 -2.800 0.00511
#> hads_8                             0.07870 0.14551  0.541 0.58861
#> hads_10                            0.02251 0.15339  0.147 0.88334
#> hads_12                            0.07310 0.11507  0.635 0.52527
#> hads_14**                          0.07096 0.25197  0.282 0.77823
#> Contrasts on ns(...)2 (p=0.15757)                                
#> hads_2                             0.05069 0.20882  0.243 0.80818
#> hads_4                             0.31902 0.19262  1.656 0.09768
#> hads_6                            -0.12456 0.24725 -0.504 0.61442
#> hads_8                            -0.15758 0.23823 -0.661 0.50831
#> hads_10                           -0.50100 0.26666 -1.879 0.06027
#> hads_12                           -0.22571 0.19444 -1.161 0.24572
#> hads_14**                          0.63914 0.44963  1.421 0.15517
#> Contrasts on ns(...)3 (p=0.12167)                                
#> hads_2                             0.09775 0.14180  0.689 0.49061
#> hads_4                             0.26875 0.12584  2.136 0.03270
#> hads_6                             0.07197 0.15943  0.451 0.65169
#> hads_8                            -0.10742 0.16213 -0.663 0.50761
#> hads_10                           -0.22367 0.17189 -1.301 0.19317
#> hads_12                           -0.21525 0.12666 -1.699 0.08924
#> hads_14**                          0.10787 0.27732  0.389 0.69729
#> 
#> 
#> Variance-covariance matrix of the random-effects:
#> (the variance of the first random effect is not estimated)
#>           intercept ns(...)1 ns(...)2 ns(...)3
#> intercept   1.00000                           
#> ns(...)1   -0.46502  0.83427                  
#> ns(...)2   -1.15064  1.12124  2.65929         
#> ns(...)3   -0.26882  0.58400  0.66300  0.45942
#> 
#>                            hads_2   hads_4   hads_6   hads_8  hads_10  hads_12
#> Residual standard error:  0.79106  0.64238  1.02392  0.99607  1.04240  0.66925
#>                           hads_14
#> Residual standard error:  1.61569
#> 
#> Parameters of the link functions:
#> 
#>                     coef      Se   Wald p-value
#> hads_2-Thresh1  -0.51076 0.14481 -3.527 0.00042
#> hads_2-Thresh2   1.12935 0.05266 21.444 0.00000
#> hads_2-Thresh3   0.89240 0.04978 17.929 0.00000
#> hads_4-Thresh1  -0.10615 0.12077 -0.879 0.37947
#> hads_4-Thresh2   1.02070 0.04795 21.287 0.00000
#> hads_4-Thresh3   1.05232 0.05838 18.025 0.00000
#> hads_6-Thresh1  -0.44550 0.16207 -2.749 0.00598
#> hads_6-Thresh2   1.35186 0.06684 20.226 0.00000
#> hads_6-Thresh3   1.32294 0.09294 14.235 0.00000
#> hads_8-Thresh1  -1.40668 0.19676 -7.149 0.00000
#> hads_8-Thresh2   1.33585 0.06286 21.250 0.00000
#> hads_8-Thresh3   1.09600 0.05707 19.206 0.00000
#> hads_10-Thresh1 -0.20171 0.16312 -1.237 0.21625
#> hads_10-Thresh2  1.00090 0.05294 18.907 0.00000
#> hads_10-Thresh3  1.10217 0.06395 17.235 0.00000
#> hads_12-Thresh1 -0.24862 0.13162 -1.889 0.05891
#> hads_12-Thresh2  0.98979 0.04693 21.093 0.00000
#> hads_12-Thresh3  1.01983 0.05642 18.077 0.00000
#> hads_14-Thresh1  1.22178 0.29419  4.153 0.00003
#> hads_14-Thresh2  1.48491 0.09737 15.251 0.00000
#> hads_14-Thresh3  0.86615 0.10043  8.624 0.00000
#> 
#>  ** coefficient not estimated but obtained from the others as minus the sum of them 
#> 

There does not seem to be any difference in item trajectories over time (see global p-values for each function of time in the summary). We can seek whether there are some difference item by item using Wald Test. This can be done with the WaldMult function of lcmm except for the last item since this parameter is a combination of the others. Next code details how to obtain this item-specific test of invariance over time.

Interpretation.