dat.raw <- read_dta(paste0(data.raw_path, "Katie_19Jan22.dta"))

dat <- dat.raw %>%
  dplyr::select(id = atwinid,
         sampsex,
         seswq35,
         sethnic,
         sisoem5,  # social isolation mother report
         sisoem7,
         sisoem10,
         sisoem12,
         sisoet5,  # social isolation teacher report
         sisoet7, 
         sisoet10,
         sisoet12,
         tadhdem5,  # total ADHD mother report
         tadhdem7,
         tadhdem10,
         tadhdem12,
         tadhdet5,  # total ADHD teacher report
         tadhdet7,
         tadhdet10,
         tadhdet12,
         hyem5,     # hyperactivity ADHD mother report
         hyem7,
         hyem10,
         hyem12, 
         hyet5,     # hyperactivity ADHD teacher report
         hyet7,
         hyet10,
         hyet12,
         inem5,    # inattention ADHD mother report
         inem7,
         inem10,
         inem12,
         inet5,    # inattention ADHD teacher report
         inet7,
         inet10,
         inet12,
         sisoe5,
         sisoe7,
         sisoe10,
         sisoe12
  )

colnames(dat)

[1] “id” “sampsex” “seswq35” “sethnic” “sisoem5” “sisoem7”
[7] “sisoem10” “sisoem12” “sisoet5” “sisoet7” “sisoet10” “sisoet12” [13] “tadhdem5” “tadhdem7” “tadhdem10” “tadhdem12” “tadhdet5” “tadhdet7” [19] “tadhdet10” “tadhdet12” “hyem5” “hyem7” “hyem10” “hyem12”
[25] “hyet5” “hyet7” “hyet10” “hyet12” “inem5” “inem7”
[31] “inem10” “inem12” “inet5” “inet7” “inet10” “inet12”
[37] “sisoe5” “sisoe7” “sisoe10” “sisoe12”


Functions

# Table of model fit 
table.model.fit <- function(model){
  model.fit <- as.data.frame(t(as.data.frame(model$FIT))) %>%
    dplyr::select(chisq, df, chisq.scaled, cfi.robust, tli.robust, aic, bic, bic2, rmsea.robust, rmsea.ci.lower.robust, rmsea.ci.upper.robust, srmr) #can only be used with "MLR" estimator
  return(model.fit)
}

# Table of regression and correlation (standardised covariance) coefficients
table.model.coef <- function(model, type, constraints){
  if (type == "RICLPM" & constraints == "No"){
    model.coef <- as.tibble(model$PE[c(17:32),]) %>% dplyr::select(-exo, -std.lv, -std.nox)
    return(model.coef)
  } else if(type == "RICLPM" & constraints == "Yes"){
    model.coef <- as.tibble(model$PE[c(17:32),]) %>% dplyr::select(-exo, -label, -std.lv, -std.nox)
    return(model.coef)
  } else if(type == "CLPM" & constraints == "No"){
    model.coef <- as.tibble(model$PE[c(1:16),]) %>% dplyr::select(-exo, -std.lv, -std.nox)
    return(model.coef)
  } else if(type == "CLPM" & constraints == "Yes"){
    model.coef <- as.tibble(model$PE[c(1:16),]) %>% dplyr::select(-exo, -std.lv, -std.nox)
    return(model.coef)
  } else {model.coef <- NULL}
}

Create combined ADHD variables

# age 5
dat <- dat %>%
  mutate(tadhde5 = 
           case_when(
             is.na(tadhdem5) & is.na(tadhdet5) ~ NA_real_,
             is.na(tadhdem5) & !is.na(tadhdet5) ~ as.numeric(tadhdet5),
             is.na(tadhdet5) & !is.na(tadhdem5) ~ as.numeric(tadhdem5),
             !is.na(tadhdem5) & !is.na(tadhdet5) ~ as.numeric(rowMeans(across(.cols = c(tadhdem5,tadhdet5)))))
  )
# age 7
dat <- dat %>%
  mutate(tadhde7 = 
           case_when(
             is.na(tadhdem7) & is.na(tadhdet7) ~ NA_real_,
             is.na(tadhdem7) & !is.na(tadhdet7) ~ as.numeric(tadhdet7),
             is.na(tadhdet7) & !is.na(tadhdem7) ~ as.numeric(tadhdem7),
             !is.na(tadhdem7) & !is.na(tadhdet7) ~ as.numeric(rowMeans(across(.cols = c(tadhdem7,tadhdet7)))))
  )
# age 10
dat <- dat %>%
  mutate(tadhde10 = 
           case_when(
             is.na(tadhdem10) & is.na(tadhdet10) ~ NA_real_,
             is.na(tadhdem10) & !is.na(tadhdet10) ~ as.numeric(tadhdet10),
             is.na(tadhdet10) & !is.na(tadhdem10) ~ as.numeric(tadhdem10),
             !is.na(tadhdem10) & !is.na(tadhdet10) ~ as.numeric(rowMeans(across(.cols = c(tadhdem10,tadhdet10)))))
  )
# age 12
dat <- dat %>%
  mutate(tadhde12 = 
           case_when(
             is.na(tadhdem12) & is.na(tadhdet12) ~ NA_real_,
             is.na(tadhdem12) & !is.na(tadhdet12) ~ as.numeric(tadhdet12),
             is.na(tadhdet12) & !is.na(tadhdem12) ~ as.numeric(tadhdem12),
             !is.na(tadhdem12) & !is.na(tadhdet12) ~ as.numeric(rowMeans(across(.cols = c(tadhdem12,tadhdet12)))))
  )
# age 5
dat <- dat %>%
  mutate(hye5 = 
           case_when(
             is.na(hyem5) & is.na(hyet5) ~ NA_real_,
             is.na(hyem5) & !is.na(hyet5) ~ as.numeric(hyet5),
             is.na(hyet5) & !is.na(hyem5) ~ as.numeric(hyem5),
             !is.na(hyem5) & !is.na(hyet5) ~ as.numeric(rowMeans(across(.cols = c(hyem5,hyet5)))))
  )
# age 7
dat <- dat %>%
  mutate(hye7 = 
           case_when(
             is.na(hyem7) & is.na(hyet7) ~ NA_real_,
             is.na(hyem7) & !is.na(hyet7) ~ as.numeric(hyet7),
             is.na(hyet7) & !is.na(hyem7) ~ as.numeric(hyem7),
             !is.na(hyem7) & !is.na(hyet7) ~ as.numeric(rowMeans(across(.cols = c(hyem7,hyet7)))))
  )
# age 10
dat <- dat %>%
  mutate(hye10 = 
           case_when(
             is.na(hyem10) & is.na(hyet10) ~ NA_real_,
             is.na(hyem10) & !is.na(hyet10) ~ as.numeric(hyet10),
             is.na(hyet10) & !is.na(hyem10) ~ as.numeric(hyem10),
             !is.na(hyem10) & !is.na(hyet10) ~ as.numeric(rowMeans(across(.cols = c(hyem10,hyet10)))))
  )
# age 12
dat <- dat %>%
  mutate(hye12 = 
           case_when(
             is.na(hyem12) & is.na(hyet12) ~ NA_real_,
             is.na(hyem12) & !is.na(hyet12) ~ as.numeric(hyet12),
             is.na(hyet12) & !is.na(hyem12) ~ as.numeric(hyem12),
             !is.na(hyem12) & !is.na(hyet12) ~ as.numeric(rowMeans(across(.cols = c(hyem12,hyet12)))))
  )
# age 5
dat <- dat %>%
  mutate(ine5 = 
           case_when(
             is.na(inem5) & is.na(inet5) ~ NA_real_,
             is.na(inem5) & !is.na(inet5) ~ as.numeric(inet5),
             is.na(inet5) & !is.na(inem5) ~ as.numeric(inem5),
             !is.na(inem5) & !is.na(inet5) ~ as.numeric(rowMeans(across(.cols = c(inem5,inet5)))))
  )
# age 7
dat <- dat %>%
  mutate(ine7 = 
           case_when(
             is.na(inem7) & is.na(inet7) ~ NA_real_,
             is.na(inem7) & !is.na(inet7) ~ as.numeric(inet7),
             is.na(inet7) & !is.na(inem7) ~ as.numeric(inem7),
             !is.na(inem7) & !is.na(inet7) ~ as.numeric(rowMeans(across(.cols = c(inem7,inet7)))))
  )
# age 10
dat <- dat %>%
  mutate(ine10 = 
           case_when(
             is.na(inem10) & is.na(inet10) ~ NA_real_,
             is.na(inem10) & !is.na(inet10) ~ as.numeric(inet10),
             is.na(inet10) & !is.na(inem10) ~ as.numeric(inem10),
             !is.na(inem10) & !is.na(inet10) ~ as.numeric(rowMeans(across(.cols = c(inem10,inet10)))))
  )
# age 12
dat <- dat %>%
  mutate(ine12 = 
           case_when(
             is.na(inem12) & is.na(inet12) ~ NA_real_,
             is.na(inem12) & !is.na(inet12) ~ as.numeric(inet12),
             is.na(inet12) & !is.na(inem12) ~ as.numeric(inem12),
             !is.na(inem12) & !is.na(inet12) ~ as.numeric(rowMeans(across(.cols = c(inem12,inet12)))))
  )

Descriptive tables

dat2 <- readRDS(file = paste0(data_path2, "class_joined_preprocessed_isolation_data_full_sample.rds")) %>%
  select(id, acorn_05)

dataframes_acorn <- list(dat, dat2)

dat <- plyr::join_all(
  dataframes_acorn,
  by = "id" 
  )

colnames(dat)

[1] “id” “sampsex” “seswq35” “sethnic” “sisoem5” “sisoem7”
[7] “sisoem10” “sisoem12” “sisoet5” “sisoet7” “sisoet10” “sisoet12” [13] “tadhdem5” “tadhdem7” “tadhdem10” “tadhdem12” “tadhdet5” “tadhdet7” [19] “tadhdet10” “tadhdet12” “hyem5” “hyem7” “hyem10” “hyem12”
[25] “hyet5” “hyet7” “hyet10” “hyet12” “inem5” “inem7”
[31] “inem10” “inem12” “inet5” “inet7” “inet10” “inet12”
[37] “sisoe5” “sisoe7” “sisoe10” “sisoe12” “tadhde5” “tadhde7”
[43] “tadhde10” “tadhde12” “hye5” “hye7” “hye10” “hye12”
[49] “ine5” “ine7” “ine10” “ine12” “acorn_05”

dat <- dat %>%
  mutate(
    sex = 
      recode_factor(as_factor(sampsex),
        "1" = "Male",
        "2" = "Female"))

table(dat$sex)

Male Female 1092 1140

dat <- dat %>%
  mutate(
    SES = 
      recode_factor(as_factor(seswq35),
        "1" = "Low",
        "2" = "Middle", 
        "3" = "High"))

table(dat$SES)

Low Middle High 742 738 752

dat <- dat %>%
  mutate(
    ethnicity = 
      recode_factor(as_factor(sethnic),
        "1" = "White",
        "2" = "Asian", 
        "3" = "Black",
        "4" = "Mixed race",
        "5" = "Other"))

table(dat$ethnicity)
 White      Asian      Black Mixed race      Other    Missing 
  2018         90         42          8         74          0 
dat <- dat %>%
  mutate(
    sisoe5.numeric = as.numeric(sisoe5),
    sisoe7.numeric = as.numeric(sisoe7),
    sisoe10.numeric = as.numeric(sisoe10),
    sisoe12.numeric = as.numeric(sisoe12)
  )
data.female <- dat %>% filter(sex == "Female")
data.male <- dat %>% filter (sex == "Male")

Social isolation and ADHD at age 5

continuous_isolation_descriptives_raw5 <- dat %>%
  group_by(sex) %>%
  summarise(mean = mean(sisoe5.numeric), sd = sd(sisoe5.numeric), min = min(sisoe5.numeric), max = max(sisoe5.numeric)) %>%
  pivot_longer(cols = c("mean", "sd", "min", "max")) %>%
  rename(descriptive = name) %>%
  pivot_wider(names_from = sex, values_from = value) %>%
  mutate(Total = 
           c(mean(dat$sisoe5.numeric), sd(dat$sisoe5.numeric), min(dat$sisoe5.numeric), max(dat$sisoe5.numeric)),
         sd_male = c(sd(data.male$sisoe5.numeric), NA_real_, NA_real_, NA_real_),
         sd_female = c(sd(data.female$sisoe5.numeric), NA_real_, NA_real_, NA_real_),
         sd_total = c(sd(dat$sisoe5.numeric), NA_real_, NA_real_, NA_real_)) %>%
  select(
    "Descriptive" = descriptive,
    "Male" = Male,
    "% Male" = sd_male,
    "Female" = Female,
    "% Female" = sd_female,
    "Total" = Total,
    "% Total" = sd_total) 
  
continuous_isolation_descriptives5 <- continuous_isolation_descriptives_raw5[-c(2), ]
continuous_isolation_descriptives5
continuous_adhd_descriptives_raw5 <- dat %>%
  group_by(sex) %>%
  summarise(mean = mean(tadhde5), sd = sd(tadhde5), min = min(tadhde5), max = max(tadhde5)) %>%
  pivot_longer(cols = c("mean", "sd", "min", "max")) %>%
  rename(descriptive = name) %>%
  pivot_wider(names_from = sex, values_from = value) %>%
  mutate(Total = 
           c(mean(dat$tadhde5), sd(dat$tadhde5), min(dat$tadhde5), max(dat$tadhde5)),
         sd_male = c(sd(data.male$tadhde5), NA_real_, NA_real_, NA_real_),
         sd_female = c(sd(data.female$tadhde5), NA_real_, NA_real_, NA_real_),
         sd_total = c(sd(dat$tadhde5), NA_real_, NA_real_, NA_real_)) %>%
  select(
    "Descriptive" = descriptive,
    "Male" = Male,
    "% Male" = sd_male,
    "Female" = Female,
    "% Female" = sd_female,
    "Total" = Total,
    "% Total" = sd_total) 
  
continuous_adhd_descriptives5 <- continuous_adhd_descriptives_raw5[-c(2), ]
continuous_adhd_descriptives5

Ethnicity

ethnicity_descriptives.raw <- dat %>% #create object to bind later on
  count(sex, ethnicity) %>%
  mutate(Prop = round(n/sum(n)*100, 2)) %>%
  pivot_wider(names_from = sex, values_from = c(n, Prop)) %>%
  mutate(Total = n_Male + n_Female,
         Prop_total = Prop_Male + Prop_Female) %>% 
  select(
    "Descriptive" = ethnicity,
    "Male" = n_Male,
    "% Male" = Prop_Male,
    "Female" = n_Female,
    "% Female" = Prop_Female,
    "Total" = Total,
    "% Total" = Prop_total)

ethnicity_descriptives <- ethnicity_descriptives.raw[-c(7), ]
ethnicity_descriptives

Family SES

fam_ses_descriptives.raw <- dat %>% #create object to bind later on
  count(sex, SES) %>%
  mutate(Prop = round(n/sum(n)*100, 2)) %>%
  pivot_wider(names_from = sex, values_from = c(n, Prop)) %>%
  mutate(Total = n_Male + n_Female,
         Prop_total = Prop_Male + Prop_Female) %>% 
  select(
    "Descriptive" = SES,
    "Male" = n_Male,
    "% Male" = Prop_Male,
    "Female" = n_Female,
    "% Female" = Prop_Female,
    "Total" = Total,
    "% Total" = Prop_total)

fam_ses_descriptives <- fam_ses_descriptives.raw[-c(7), ]
fam_ses_descriptives

Neighbourhood SES (ACORN)

neigh_ses_descriptives.raw <- dat %>% #create object to bind later on
  count(sex, acorn_05) %>%
  mutate(Prop = round(n/sum(n)*100, 2)) %>%
  pivot_wider(names_from = sex, values_from = c(n, Prop)) %>%
  mutate(Total = n_Male + n_Female,
         Prop_total = Prop_Male + Prop_Female) %>% 
  select(
    "Descriptive" = acorn_05,
    "Male" = n_Male,
    "% Male" = Prop_Male,
    "Female" = n_Female,
    "% Female" = Prop_Female,
    "Total" = Total,
    "% Total" = Prop_total)

neigh_ses_descriptives <- neigh_ses_descriptives.raw[-c(7), ]
neigh_ses_descriptives
descriptives <- bind_rows(
  continuous_isolation_descriptives5,
  continuous_adhd_descriptives5,
  ethnicity_descriptives,
  fam_ses_descriptives,
  neigh_ses_descriptives
)

#add in column to show which descriptives they are
descriptives <- descriptives %>%
  mutate(
    Category = 
      c("Social isolation", "Social isolation", "Social isolation",
        "ADHD symptoms", "ADHD symptoms", "ADHD symptoms",
        "Ethnicity", "Ethnicity", "Ethnicity", "Ethnicity", "Ethnicity",
        "Family SES", "Family SES", "Family SES",
        "Neighbourhood SES", "Neighbourhood SES", "Neighbourhood SES", "Neighbourhood SES", "Neighbourhood SES", "Neighbourhood SES"),
    Male = round(Male, 2),
    Female = round(Female, 2),
    Total = round(Total, 2),
    `% Male /SD`= round(`% Male`, 2),
    `% Female /SD`= round(`% Female`, 2),
    `% Total`= round(`% Total`, 2)) %>%
select(
    Category,
    Descriptive,
    Male,
    `% Male /SD`,
    Female,
    `% Female /SD`,
    Total,
    `% Total`) 

#final table to be viewed in word
kable(descriptives) 
Category Descriptive Male % Male /SD Female % Female /SD Total % Total
Social isolation mean 0.88 1.23 0.75 1.03 0.81 1.13
Social isolation min 0.00 NA 0.00 NA 0.00 NA
Social isolation max 12.00 NA 9.00 NA 12.00 NA
ADHD symptoms mean 2.67 3.01 1.85 2.45 2.25 2.76
ADHD symptoms min 0.00 NA 0.00 NA 0.00 NA
ADHD symptoms max 16.00 NA 18.00 NA 18.00 NA
Ethnicity White 998.00 44.71 1020.00 45.70 2018.00 90.41
Ethnicity Asian 36.00 1.61 54.00 2.42 90.00 4.03
Ethnicity Black 18.00 0.81 24.00 1.08 42.00 1.89
Ethnicity Mixed race 4.00 0.18 4.00 0.18 8.00 0.36
Ethnicity Other 36.00 1.61 38.00 1.70 74.00 3.31
Family SES Low 360.00 16.13 382.00 17.11 742.00 33.24
Family SES Middle 370.00 16.58 368.00 16.49 738.00 33.07
Family SES High 362.00 16.22 390.00 17.47 752.00 33.69
Neighbourhood SES Wealthy Achievers 250.00 11.20 248.00 11.11 498.00 22.31
Neighbourhood SES Urban Prosperity 60.00 2.69 64.00 2.87 124.00 5.56
Neighbourhood SES Comfortably Off 294.00 13.17 322.00 14.43 616.00 27.60
Neighbourhood SES Moderate Means 158.00 7.08 166.00 7.44 324.00 14.52
Neighbourhood SES Hard Pressed 310.00 13.89 316.00 14.16 626.00 28.05
Neighbourhood SES NA 20.00 0.90 24.00 1.08 44.00 1.98

The below introductory notes have been adapted from Hamaker, Kuiper, and Grasman, 2015

The CLPM only accounts for temporal stability through the inclusion of autoregressive parameters. Thus, it is implicitly assumed that every person varies over time around the same means μt and πt, and that there are no trait-like individual differences that endure. this is a rather problematic assumption, as it is difficult to imagine a psychological construct – whether behavioral, cognitive, emotional or psychophysiological – that is not to some extent characterized by stable individual differences (if not for the entire lifespan, then at least for the duration of the study; Hamaker, ). Longitudinal data can actually be thought of as multilevel data, in which occasions are nested within individuals (or other systems, like dyads). When considering this perspective, it becomes clear that we need to separate the within-person level from the between-person level.

The random intercepts cross lagged panel model (RI-CLPM) accounts not only for temporal stability, but also for time-invariant, trait-like stability through the inclusion of a random intercept. The cross-lagged parameters indicate the extent to which the two variables influence each other. The cross-lagged relationships pertain to a process that takes place at the within-person level and they are therefore of key interest when the interest is in reciprocal influences over time within individuals or dyads. The cross-lagged parameter indicates the extent to which the change in y can be predicted from the individual’s prior deviation from their expected score on the other variable, while controlling for the structural change in y and the prior deviation from one’s expected score on y.

The CLPM requires only two waves of data, but the RI-CLPM requires at least three waves of data, in which case there is 1 degree of freedom (df). If the intervals are of the same size, and if we assume that the effects the variables have on each other remain stable over time, we could decide to constrain the lagged parameters over time, giving us an additional 4 df (i.e., 5 df in total). If we are not willing to make these assumptions, and we are not sure whether the effect of the time-invariant stability components κi and ωi are equal over time, we may wish to remove the constraint on the factor loadings. This relaxation may especially be of interest when the observations are made further apart in time, and we expect that we are also measuring some structural changes. However, this would imply that κi and ωi no longer represents random intercepts (as in multilevel modeling), but rather represent latent variables or traits (as common in SEM). Even more so, it would imply we need more waves of data to estimate this model. The gaps in our time waves may be a problem here.

Correlations between all variables

# items 
items <- c("tadhde5",
           "sisoe5",
           "tadhde7",
           "sisoe7",
           "tadhde10",
           "sisoe10",
           "tadhde12",
           "sisoe12",
           "tadhdem5",
           "sisoem5",
           "tadhdem7",
           "sisoem7",
           "tadhdem10",
           "sisoem10",
           "tadhdem12",
           "sisoem12",
           "tadhdet5",
           "sisoet5",
           "tadhdet7",
           "sisoet7",
           "tadhdet10",
           "sisoet10",
           "tadhdet12",
           "sisoet12")

# create data frame
items.df <- as.data.frame(dat[,items])
is.data.frame(items.df)  #check 

[1] TRUE

colnames(items.df) <- c("Combined ADHD age 5",
                        "Combined Social isolation age 5",
                        "Combined ADHD age 7",
                        "Combined Social isolation age 7",
                        "Combined ADHD age 10",
                        "Combined Social isolation age 10",
                        "Combined ADHD age 12",
                        "Combined Social isolation age 12",
                        "Mother ADHD age 5",
                        "Mother Social isolation age 5",
                        "Mother ADHD age 7",
                        "Mother Social isolation age 7",
                        "Mother ADHD age 10",
                        "Mother Social isolation age 10",
                        "Mother ADHD age 12",
                        "Mother Social isolation age 12",
                        "Teacher ADHD age 5",
                        "Teacher Social isolation age 5",
                        "Teacher ADHD age 7",
                        "Teacher Social isolation age 7",
                        "Teacher ADHD age 10",
                        "Teacher Social isolation age 10",
                        "Teacher ADHD age 12",
                        "Teacher Social isolation age 12"
                        )
item.cor.matrix <- cor(items.df, 
                       method = "pearson", 
                       use = "pairwise.complete.obs")
as.data.frame(item.cor.matrix) %>% mutate_if(is.numeric, round, 2)
# check they are all signficant
item.cor.matrix.sig <- Hmisc::rcorr(as.matrix(items.df),
                                    type = "pearson")
# item.cor.matrix.sig$P

Missingness

Children that have complete data at all time points: 2078 (93.10%)

# missing isolation
dat <- dat %>%
  mutate(missing.isolation =
           if_else(
               !is.na(sisoe5) & 
               !is.na(sisoe7) &
               !is.na(sisoe10) &
               !is.na(sisoe12), 
               true = "No",
               false = "Yes"
           ))
# table(dat$missing.isolation)

# missing adhd
dat <- dat %>%
  mutate(missing.adhd =
           if_else(
               !is.na(tadhde5) & 
               !is.na(tadhde7) &
               !is.na(tadhde10) &
               !is.na(tadhde12),
               true = "No",
               false = "Yes"
           ))
# table(dat$missing.adhd)

dat <- dat %>%
  mutate(missing.both =
           if_else(
               missing.isolation == "No" & 
               missing.adhd == "No",
               true = "No",
               false = "Yes"
           ))
table(dat$missing.both)

No Yes 2078 154

All RI-CLPM models in this script

Model Description
CLPMcomb Cross-lagged panel model without random intercepts using combined mother and teacher report and total ADHD scores
RICLPMcomb Basic RI-CLPM model using combined mother and teacher report ratings for AD and SI, and total ADHD scores
RICLPMcomb2 RICLPMcomb but with fixed autoregressive and cross-lagged relations over time
RICLPMcomb3 RICLPMcomb but with constrained grand means for AD and SI
RICLPMcomb_hyp Basic RI-CLPM model using combined mother and teacher report ratings for AD and SI, and hyperactivity scores
RICLPMcomb_hyp2 RICLPMcomb_hyp but with fixed autoregressive and cross-lagged relations over time
RICLPMcomb_hyp3 RICLPMcomb_hyp but with constrained grand means for AD and SI
RICLPMcomb_inat Basic RI-CLPM model using combined mother and teacher report ratings for AD and SI, and inattention scores
RICLPMcomb_inat2 RICLPMcomb_inat but with fixed autoregressive and cross-lagged relations over time
RICLPMcomb_inat3 RICLPMcomb_inat but with constrained grand means for AD and SI
CLPMadt Cross-lagged panel model without random intercepts using teacher report and total ADHD scores
RICLPMadt Basic RI-CLPM model using teacher report ADHD and combined report isolation, and total ADHD scores
RICLPMadt2 RICLPMadt but with fixed autoregressive and cross-lagged relations over time
RICLPMadt3 RICLPMadt but with constrained grand means for AD and SI
RICLPMadt_hyp Basic RI-CLPM model using teacher report ADHD and combined report isolation, and hyperactivity scores
RICLPMadt_hyp2 RICLPMadt_hyp but with fixed autoregressive and cross-lagged relations over time
RICLPMadt_hyp3 RICLPMadt_hyp but with constrained grand means for AD and SI
RICLPMadt_inat Basic RI-CLPM model using teacher report ADHD and combined report isolation, and inattention scores
RICLPMadt_inat2 RICLPMadt_inat but with fixed autoregressive and cross-lagged relations over time
RICLPMadt_inat3 RICLPMadt_inat but with constrained grand means for AD and SI
CLPMadm Cross-lagged panel model without random intercepts using mother report and total ADHD scores
RICLPMadm Basic RI-CLPM model using mother report ADHD and combined report isolation, and total ADHD scores
RICLPMadm2 RICLPMadm but with fixed autoregressive and cross-lagged relations over time
RICLPMadm3 RICLPMadm but with constrained grand means for AD and SI
RICLPMadm_hyp Basic RI-CLPM model using mother report ADHD and combined report isolation, and hyperactivity scores
RICLPMadm_hyp2 RICLPMadm_hyp but with fixed autoregressive and cross-lagged relations over time
RICLPMadm_hyp3 RICLPMadm_hyp but with constrained grand means for AD and SI
RICLPMadm_inat Basic RI-CLPM model using mother report ADHD and combined report isolation, and inattention scores
RICLPMadm_inat2 RICLPMadm_inat but with fixed autoregressive and cross-lagged relations over time
RICLPMadm_inat3 RICLPMadm_inat but with constrained grand means for AD and SI

RI-CLPM: Combined mother and teacher report, total ADHD symptoms

For SEM in lavaan, we use three different formula types: latent variabele definitions (using the =~ operator, which can be read as is “measured by”), regression formulas (using the ~ operator), and (co)variance formulas (using the ~~ operator). The regression formulas are similar to ordinary formulas in R. The expression y1 ~~ y2 allows the residual variances of the two observed variables to be correlated. This is sometimes done if it is believed that the two variables have something in common that is not captured by the latent variables. Note that the two expressions y2 ~~ y4 and y2 ~~ y6, can be combined into the expression y2 ~~ y4 + y6, because the variable on the left of the ~~ operator (y2) is the same. This is just a shorthand notation. In general, to fix a parameter in a lavaan formula, you need to pre-multiply the corresponding variable in the formula by a numerical value. This is called the pre-multiplication mechanism and will be used for many purposes e.g. 1*x2. If you wish to fix the correlation (or covariance) between a pair of latent variables to zero, you need to explicity add a covariance-formula for this pair, and fix the parameter to zero.

To specify the RI-CLPM we need four parts: notes from Mulder’s webpage.

  • A between part, consisting of the random intercepts. It is specified using the =~ command, RIx =~ 1*x1 1*x2 ..., where 1* fixes the factor loading to one.

  • A within part, consisting of within-unit fluctuations. It is also specified using the =~ command, wx1 =~ 1*x1; wx2 =~ 1*x2;

  • The lagged regressions between the within-unit components, using wx2 ~ wx1 wy1; wx3 ~ wx2 wy2; .... Here, this is written with two variables on the left hand side of the ~, this is doing the same thing as calculating just regression paths - but combining DVs that have the same paths leading to them, e.g. wx2 ~ wx1 + wy1 and wy2 ~ wx1 + wy1 becomes wx2+ wy2 ~ wx1 + wy1.

  • Relevant covariances in both the between and within part. In the within part the components at wave 1, and their residuals at waves 2 and further are correlated within each wave, using wx1 ~~ wy1; wx2 ~~ wy2;.... We also need to specify their (residual) variances here using wx1 ~~ wx1; wx2 ~~ wx2; .... For the between part we have to specify the variances and covariance of the random intercepts using RIx ~~ RIy;.

Tips for interpreting the output: - Model Test User Model: which provides a test statistic, degrees of freedom, and a p-value for the model that was specified by the user. - Model Test Baseline Model: The baseline is a null model, typically in which all of your observed variables are constrained to covary with no other variables (put another way, the covariances are fixed to 0)–just individual variances are estimated.

Cross-lagged panel model (CLPMcomb)

CLPMcomb <- '
  # Estimate the lagged effects between the observed variables.
  tadhde7 + sisoe7 ~ tadhde5 + sisoe5
  tadhde10 + sisoe10 ~ tadhde7 + sisoe7
  tadhde12 + sisoe12 ~ tadhde10 + sisoe10

  # Estimate the covariance between the observed variables at the first wave. 
  tadhde5 ~~ sisoe5 # Covariance
  
  # Estimate the covariances between the residuals of the observed variables.
  tadhde7 ~~ sisoe7
  tadhde10 ~~ sisoe10
  tadhde12 ~~ sisoe12
  
  # Estimate the (residual) variance of the observed variables.
  tadhde5 ~~ tadhde5 # Variances
  sisoe5 ~~ sisoe5 
  tadhde7 ~~ tadhde7 # Residual variances
  sisoe7 ~~ sisoe7 
  tadhde10 ~~ tadhde10 
  sisoe10 ~~ sisoe10 
  tadhde12 ~~ tadhde12 
  sisoe12 ~~ sisoe12 
'
CLPMcomb.fit <- lavaan(CLPMcomb, 
                   data = dat, 
                   missing = 'ML',
                   meanstructure = TRUE, 
                   int.ov.free = TRUE,
                   se = "robust",
                   estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic 
                   ) 

CLPMcomb.fit.summary <- summary(CLPMcomb.fit, 
                            fit.measures = TRUE,
                            standardized = TRUE)

lavaan 0.6-10 ended normally after 32 iterations

Estimator ML Optimization method NLMINB Number of model parameters 32

Number of observations 2232 Number of missing patterns 9

Model Test User Model: Standard Robust Test Statistic 408.342 231.914 Degrees of freedom 12 12 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.761 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 6336.986 3173.081 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.997

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.937 0.930 Tucker-Lewis Index (TLI) 0.853 0.837

Robust Comparative Fit Index (CFI) 0.938 Robust Tucker-Lewis Index (TLI) 0.856

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -31883.991 -31883.991 Scaling correction factor 2.539 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.327 for the MLR correction

Akaike (AIC) 63831.982 63831.982 Bayesian (BIC) 64014.723 64014.723 Sample-size adjusted Bayesian (BIC) 63913.054 63913.054

Root Mean Square Error of Approximation:

RMSEA 0.122 0.091 90 Percent confidence interval - lower 0.112 0.083 90 Percent confidence interval - upper 0.132 0.098 P-value RMSEA <= 0.05 0.000 0.000

Robust RMSEA 0.120 90 Percent confidence interval - lower 0.107 90 Percent confidence interval - upper 0.134

Standardized Root Mean Square Residual:

SRMR 0.065 0.065

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all tadhde7 ~
tadhde5 0.540 0.026 20.382 0.000 0.540 0.575 sisoe5 0.105 0.060 1.737 0.082 0.105 0.046 sisoe7 ~
tadhde5 0.057 0.010 5.451 0.000 0.057 0.134 sisoe5 0.460 0.043 10.718 0.000 0.460 0.444 tadhde10 ~
tadhde7 0.516 0.031 16.922 0.000 0.516 0.540 sisoe7 0.133 0.066 2.025 0.043 0.133 0.063 sisoe10 ~
tadhde7 0.071 0.014 5.247 0.000 0.071 0.143 sisoe7 0.485 0.036 13.335 0.000 0.485 0.440 tadhde12 ~
tadhde10 0.656 0.034 19.184 0.000 0.656 0.637 sisoe10 0.031 0.048 0.656 0.512 0.031 0.016 sisoe12 ~
tadhde10 0.067 0.014 4.902 0.000 0.067 0.121 sisoe10 0.560 0.032 17.380 0.000 0.560 0.530

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all tadhde5 ~~
sisoe5 1.152 0.128 8.998 0.000 1.152 0.368 .tadhde7 ~~
.sisoe7 0.548 0.076 7.220 0.000 0.548 0.259 .tadhde10 ~~
.sisoe10 0.648 0.085 7.667 0.000 0.648 0.284 .tadhde12 ~~
.sisoe12 0.604 0.089 6.818 0.000 0.604 0.278

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .tadhde7 0.514 0.062 8.250 0.000 0.514 0.198 .sisoe7 0.329 0.034 9.746 0.000 0.329 0.279 .tadhde10 0.517 0.056 9.310 0.000 0.517 0.208 .sisoe10 0.407 0.031 13.329 0.000 0.407 0.313 .tadhde12 0.400 0.049 8.142 0.000 0.400 0.156 .sisoe12 0.308 0.028 10.908 0.000 0.308 0.225 tadhde5 2.250 0.059 38.460 0.000 2.250 0.814 sisoe5 0.813 0.024 33.882 0.000 0.813 0.717

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all tadhde5 7.641 0.397 19.265 0.000 7.641 1.000 sisoe5 1.285 0.102 12.618 0.000 1.285 1.000 .tadhde7 4.366 0.238 18.330 0.000 4.366 0.648 .sisoe7 1.026 0.062 16.453 0.000 1.026 0.741 .tadhde10 4.186 0.265 15.807 0.000 4.186 0.679 .sisoe10 1.244 0.076 16.327 0.000 1.244 0.739 .tadhde12 3.825 0.278 13.746 0.000 3.825 0.586 .sisoe12 1.231 0.080 15.369 0.000 1.231 0.654

#Table of model fit 
CLPMcomb.fit.summary.fit <- table.model.fit(CLPMcomb.fit.summary)
CLPMcomb.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
CLPMcomb.fit.summary.reg <- table.model.coef(model = CLPMcomb.fit.summary, type = "CLPM", constraints = "No")
CLPMcomb.fit.summary.reg
CLPMcomb.fit.summary.reg %>% 
  select(lhs, op, rhs, std.all, pvalue) %>%
  mutate_if(is.numeric, round, 3)
CLPMcomb.fit.summary.fit %>%
  select(-aic, -bic, -chisq ) %>%
  mutate_if(is.numeric, round, 2)

Constrained cross-lagged panel model (CLPMcomb)

CLPMcomb2 <- '
  # Estimate the lagged effects between the observed variables - constrained
  tadhde7 ~ tadhde5 + d*sisoe5 
  sisoe7 ~ c*tadhde5 + sisoe5
  
  tadhde10 ~ tadhde7 + d*sisoe7
  sisoe10 ~ c*tadhde7 + sisoe7
  
  tadhde12 ~ tadhde10 + d*sisoe10
  sisoe12 ~ c*tadhde10 + sisoe10

  # Estimate the covariance between the observed variables at the first wave. 
  tadhde5 ~~ sisoe5 # Covariance
  
  # Estimate the covariances between the residuals of the observed variables.
  tadhde7 ~~ sisoe7
  tadhde10 ~~ sisoe10
  tadhde12 ~~ sisoe12
  
  # Estimate the (residual) variance of the observed variables.
  tadhde5 ~~ tadhde5 # Variances
  sisoe5 ~~ sisoe5 
  tadhde7 ~~ tadhde7 # Residual variances
  sisoe7 ~~ sisoe7 
  tadhde10 ~~ tadhde10 
  sisoe10 ~~ sisoe10 
  tadhde12 ~~ tadhde12 
  sisoe12 ~~ sisoe12 
'
CLPMcomb2.fit <- lavaan(CLPMcomb2, 
                   data = dat, 
                   missing = 'ML',
                   meanstructure = TRUE, 
                   int.ov.free = TRUE,
                   se = "robust",
                   estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic 
                   ) 

CLPMcomb2.fit.summary <- summary(CLPMcomb2.fit, 
                            fit.measures = TRUE,
                            standardized = TRUE)

lavaan 0.6-10 ended normally after 29 iterations

Estimator ML Optimization method NLMINB Number of model parameters 32 Number of equality constraints 4

Number of observations 2232 Number of missing patterns 9

Model Test User Model: Standard Robust Test Statistic 413.577 225.030 Degrees of freedom 16 16 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.838 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 6336.986 3173.081 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.997

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.937 0.934 Tucker-Lewis Index (TLI) 0.890 0.884

Robust Comparative Fit Index (CFI) 0.939 Robust Tucker-Lewis Index (TLI) 0.893

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -31886.608 -31886.608 Scaling correction factor 2.281 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.327 for the MLR correction

Akaike (AIC) 63829.217 63829.217 Bayesian (BIC) 63989.115 63989.115 Sample-size adjusted Bayesian (BIC) 63900.155 63900.155

Root Mean Square Error of Approximation:

RMSEA 0.106 0.077 90 Percent confidence interval - lower 0.097 0.070 90 Percent confidence interval - upper 0.114 0.083 P-value RMSEA <= 0.05 0.000 0.000

Robust RMSEA 0.104 90 Percent confidence interval - lower 0.092 90 Percent confidence interval - upper 0.116

Standardized Root Mean Square Residual:

SRMR 0.066 0.066

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all tadhde7 ~
tadhde5 0.546 0.026 21.359 0.000 0.546 0.580 sisoe5 (d) 0.084 0.030 2.859 0.004 0.084 0.037 sisoe7 ~
tadhde5 (c) 0.064 0.007 9.182 0.000 0.064 0.151 sisoe5 0.452 0.041 11.101 0.000 0.452 0.435 tadhde10 ~
tadhde7 0.521 0.028 18.647 0.000 0.521 0.547 sisoe7 (d) 0.084 0.030 2.859 0.004 0.084 0.040 sisoe10 ~
tadhde7 (c) 0.064 0.007 9.182 0.000 0.064 0.129 sisoe7 0.484 0.033 14.550 0.000 0.484 0.441 tadhde12 ~
tadhde10 0.644 0.033 19.290 0.000 0.644 0.625 sisoe10 (d) 0.084 0.030 2.859 0.004 0.084 0.043 sisoe12 ~
tadhde10 (c) 0.064 0.007 9.182 0.000 0.064 0.116 sisoe10 0.569 0.030 18.755 0.000 0.569 0.535

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all tadhde5 ~~
sisoe5 1.152 0.128 8.998 0.000 1.152 0.368 .tadhde7 ~~
.sisoe7 0.548 0.076 7.225 0.000 0.548 0.259 .tadhde10 ~~
.sisoe10 0.649 0.085 7.649 0.000 0.649 0.284 .tadhde12 ~~
.sisoe12 0.604 0.089 6.816 0.000 0.604 0.278

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .tadhde7 0.516 0.052 9.876 0.000 0.516 0.199 .sisoe7 0.319 0.030 10.618 0.000 0.319 0.271 .tadhde10 0.549 0.046 11.954 0.000 0.549 0.222 .sisoe10 0.420 0.027 15.496 0.000 0.420 0.325 .tadhde12 0.368 0.041 8.904 0.000 0.368 0.144 .sisoe12 0.304 0.026 11.661 0.000 0.304 0.221 tadhde5 2.250 0.059 38.460 0.000 2.250 0.814 sisoe5 0.813 0.024 33.882 0.000 0.813 0.717

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all tadhde5 7.641 0.397 19.265 0.000 7.641 1.000 sisoe5 1.285 0.102 12.618 0.000 1.285 1.000 .tadhde7 4.367 0.238 18.337 0.000 4.367 0.646 .sisoe7 1.027 0.062 16.489 0.000 1.027 0.740 .tadhde10 4.189 0.266 15.768 0.000 4.189 0.683 .sisoe10 1.245 0.076 16.318 0.000 1.245 0.745 .tadhde12 3.830 0.278 13.753 0.000 3.830 0.587 .sisoe12 1.231 0.080 15.360 0.000 1.231 0.652

#Table of model fit 
CLPMcomb2.fit.summary.fit <- table.model.fit(CLPMcomb2.fit.summary)
CLPMcomb2.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
CLPMcomb2.fit.summary.reg <- table.model.coef(model = CLPMcomb2.fit.summary, type = "CLPM", constraints = "Yes")
CLPMcomb2.fit.summary.reg
CLPMcomb2.fit.summary.reg %>% 
  select(lhs, op, rhs, std.all, pvalue) %>%
  mutate_if(is.numeric, round, 2)
CLPMcomb2.fit.summary.fit %>%
  select(-aic, -bic, -chisq ) %>%
  mutate_if(is.numeric, round, 2)
lavTestLRT(CLPMcomb.fit, CLPMcomb2.fit, method = "satorra.bentler.2010")

The basic RI-CLPM model (RICLPMcomb)

The code for specifying the basic RI-CLPM is given below.

RICLPMcomb <- '
  # Create between components (rando intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Estimate the lagged effects between the within-person centered variables
  wad7 + wsi7 ~ wad5 + wsi5
  wad10 + wsi10 ~ wad7 + wsi7
  wad12 + wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMcomb.fit <- lavaan(RICLPMcomb,               # model
                     data = dat,           # data
                     missing = 'ML',       # how to handle missing data 
                     meanstructure = TRUE, # adds intercepts/means to the model for both observed and latent variables
                     se = "robust",        # robust standard errors
                     int.ov.free = TRUE,   # if FALSE, the intercepts of the observed variables are fixed to zero
                     estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
)

RICLPMcomb.fit.summary <- summary(RICLPMcomb.fit, 
                              fit.measures = TRUE,
                              standardized = TRUE)

lavaan 0.6-10 ended normally after 80 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35

Number of observations 2232 Number of missing patterns 9

Model Test User Model: Standard Robust Test Statistic 70.823 44.235 Degrees of freedom 9 9 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.601 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 6336.986 3173.081 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.997

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.990 0.989 Tucker-Lewis Index (TLI) 0.970 0.965

Robust Comparative Fit Index (CFI) 0.991 Robust Tucker-Lewis Index (TLI) 0.972

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -31715.231 -31715.231 Scaling correction factor 2.514 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.327 for the MLR correction

Akaike (AIC) 63500.462 63500.462 Bayesian (BIC) 63700.335 63700.335 Sample-size adjusted Bayesian (BIC) 63589.134 63589.134

Root Mean Square Error of Approximation:

RMSEA 0.055 0.042 90 Percent confidence interval - lower 0.044 0.032 90 Percent confidence interval - upper 0.068 0.052 P-value RMSEA <= 0.05 0.209 0.907

Robust RMSEA 0.053 90 Percent confidence interval - lower 0.038 90 Percent confidence interval - upper 0.069

Standardized Root Mean Square Residual:

SRMR 0.032 0.032

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
tadhde5 1.000 1.788 0.641 tadhde7 1.000 1.788 0.698 tadhde10 1.000 1.788 0.718 tadhde12 1.000 1.788 0.706 RIsi =~
sisoe5 1.000 0.677 0.592 sisoe7 1.000 0.677 0.577 sisoe10 1.000 0.677 0.525 sisoe12 1.000 0.677 0.500 wad5 =~
tadhde5 1.000 2.143 0.768 wad7 =~
tadhde7 1.000 1.835 0.716 wad10 =~
tadhde10 1.000 1.732 0.696 wad12 =~
tadhde12 1.000 1.792 0.708 wsi5 =~
sisoe5 1.000 0.923 0.806 wsi7 =~
sisoe7 1.000 0.958 0.816 wsi10 =~
sisoe10 1.000 1.099 0.851 wsi12 =~
sisoe12 1.000 1.172 0.866

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.218 0.039 5.623 0.000 0.255 0.255 wsi5 0.064 0.087 0.739 0.460 0.032 0.032 wsi7 ~
wad5 0.042 0.017 2.440 0.015 0.093 0.093 wsi5 0.216 0.060 3.614 0.000 0.208 0.208 wad10 ~
wad7 0.080 0.065 1.242 0.214 0.085 0.085 wsi7 0.159 0.106 1.495 0.135 0.088 0.088 wsi10 ~
wad7 0.049 0.027 1.831 0.067 0.083 0.083 wsi7 0.279 0.058 4.837 0.000 0.243 0.243 wad12 ~
wad10 0.268 0.069 3.890 0.000 0.259 0.259 wsi10 0.049 0.072 0.682 0.495 0.030 0.030 wsi12 ~
wad10 0.026 0.027 0.958 0.338 0.038 0.038 wsi10 0.430 0.043 9.967 0.000 0.404 0.404

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.565 0.115 4.926 0.000 0.286 0.286 .wad7 ~~
.wsi7 0.411 0.091 4.495 0.000 0.250 0.250 .wad10 ~~
.wsi10 0.544 0.102 5.318 0.000 0.300 0.300 .wad12 ~~
.wsi12 0.469 0.087 5.406 0.000 0.255 0.255 RIad ~~
RIsi 0.638 0.077 8.310 0.000 0.526 0.526

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .tadhde5 2.250 0.059 38.460 0.000 2.250 0.806 .tadhde7 1.813 0.055 32.733 0.000 1.813 0.708 .tadhde10 1.564 0.053 29.449 0.000 1.564 0.628 .tadhde12 1.453 0.055 26.665 0.000 1.453 0.574 .sisoe5 0.813 0.024 33.882 0.000 0.813 0.710 .sisoe7 0.831 0.025 33.074 0.000 0.831 0.709 .sisoe10 0.939 0.028 33.712 0.000 0.939 0.728 .sisoe12 0.941 0.029 31.933 0.000 0.941 0.695 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 3.197 0.240 13.334 0.000 1.000 1.000 RIsi 0.459 0.057 7.992 0.000 1.000 1.000 wad5 4.593 0.322 14.258 0.000 1.000 1.000 wsi5 0.853 0.102 8.399 0.000 1.000 1.000 .wad7 3.128 0.243 12.879 0.000 0.929 0.929 .wsi7 0.860 0.073 11.839 0.000 0.937 0.937 .wad10 2.943 0.319 9.216 0.000 0.981 0.981 .wsi10 1.114 0.081 13.836 0.000 0.923 0.923 .wad12 2.977 0.259 11.509 0.000 0.927 0.927 .wsi12 1.134 0.082 13.876 0.000 0.826 0.826 .tadhde5 0.000 0.000 0.000 .tadhde7 0.000 0.000 0.000 .tadhde10 0.000 0.000 0.000 .tadhde12 0.000 0.000 0.000 .sisoe5 0.000 0.000 0.000 .sisoe7 0.000 0.000 0.000 .sisoe10 0.000 0.000 0.000 .sisoe12 0.000 0.000 0.000

#Table of model fit 
RICLPMcomb.fit.summary.fit <- table.model.fit(RICLPMcomb.fit.summary)
#Table of regression coefficients and covariances (concurrent associations)
RICLPMcomb.fit.summary.reg <- table.model.coef(model = RICLPMcomb.fit.summary, type = "RICLPM", constraints = "No")

Constraining all lag and crosslag parameters at once (RICLPMcomb2)

RICLPMcomb2 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + d*wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ a*wad7 + d*wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ a*wad10 + d*wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMcomb2.fit <- lavaan(RICLPMcomb2, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMcomb.fit, RICLPMcomb2.fit, method = "satorra.bentler.2010")

RICLPMcomb2 is significantly worse fit compared to RICLPMcomb according to the Chi square test.

Constraining lag in ADHD parameter (RICLPMcomb2a)

Now we will test the constraints based on the following steps recommended by Curran and Bauer: 1. Estimate the baseline model where all parameters are freely estimated (The basic RI-CLPM) 2. Impose equlaity constraints on one set of stabilities (within variable lags). Use LRT tests to see if he fit becomes significantly worse. 3. Impose equality constraints on the next set of stabilities. Compare this to wither model 1 (baseline/basic) if step 2 was significant. Compare to model 2 if step 2 was non-significant. Non-sig LRT = not significantly worse fit 4. Repeat for first set of cross-lags 5. Repeat for second set of cross-lags

RICLPMcomb2a <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  
  wad10 ~ a*wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  
  wad12 ~ a*wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMcomb2a.fit <- lavaan(RICLPMcomb2a, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMcomb.fit, RICLPMcomb2a.fit, method = "satorra.bentler.2010")

Constraining lag in social isolation parameter (RICLPMcomb2b)

RICLPMcomb2b <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + b*wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + b*wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMcomb2b.fit <- lavaan(RICLPMcomb2b, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMcomb.fit, RICLPMcomb2b.fit, method = "satorra.bentler.2010")

RICLPMcomb2b is significantly worse fit compared to RICLPMcomb. Now we will constrain the other set of stability coefficients: cross lag ad->si (c)

Constraining cross lag in ADHD to social isolation parameter (RICLPMcomb2c)

RICLPMcomb2c <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ c*wad5 + wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ c*wad7 + wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ c*wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMcomb2c.fit <- lavaan(RICLPMcomb2c, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMcomb.fit, RICLPMcomb2c.fit, method = "satorra.bentler.2010")

RICLPMcomb2c is NOT significantly worse fit compared to RICLPMcomb (p = 0.7833). Now we will constrain the other set of stability coefficients: cross lag si->ad (d) but comparing that model to this one.

Constraining cross lag in social isolation to ADHD parameter (RICLPMcomb2d) - compared to RICLPMcomb2c

Thus, constraining both sets of lags are tested in this model.

RICLPMcomb2d <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + d*wsi5 
  wsi7 ~ c*wad5 + wsi5
  
  wad10 ~ wad7 + d*wsi7
  wsi10 ~ c*wad7 + wsi7
  
  wad12 ~ wad10 + d*wsi10
  wsi12 ~ c*wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMcomb2d.fit <- lavaan(RICLPMcomb2d, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 

RICLPMcomb2d.fit.summary <- summary(RICLPMcomb2d.fit, 
                                fit.measures = TRUE,
                                standardized = TRUE)

lavaan 0.6-10 ended normally after 80 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35 Number of equality constraints 4

Number of observations 2232 Number of missing patterns 9

Model Test User Model: Standard Robust Test Statistic 75.040 43.176 Degrees of freedom 13 13 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.738 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 6336.986 3173.081 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.997

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.990 0.990 Tucker-Lewis Index (TLI) 0.979 0.979

Robust Comparative Fit Index (CFI) 0.992 Robust Tucker-Lewis Index (TLI) 0.982

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -31717.340 -31717.340 Scaling correction factor 2.280 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.327 for the MLR correction

Akaike (AIC) 63496.679 63496.679 Bayesian (BIC) 63673.710 63673.710 Sample-size adjusted Bayesian (BIC) 63575.218 63575.218

Root Mean Square Error of Approximation:

RMSEA 0.046 0.032 90 Percent confidence interval - lower 0.036 0.024 90 Percent confidence interval - upper 0.057 0.040 P-value RMSEA <= 0.05 0.710 1.000

Robust RMSEA 0.043 90 Percent confidence interval - lower 0.029 90 Percent confidence interval - upper 0.057

Standardized Root Mean Square Residual:

SRMR 0.032 0.032

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
tadhde5 1.000 1.791 0.642 tadhde7 1.000 1.791 0.699 tadhde10 1.000 1.791 0.721 tadhde12 1.000 1.791 0.706 RIsi =~
sisoe5 1.000 0.683 0.595 sisoe7 1.000 0.683 0.583 sisoe10 1.000 0.683 0.531 sisoe12 1.000 0.683 0.504 wad5 =~
tadhde5 1.000 2.138 0.767 wad7 =~
tadhde7 1.000 1.831 0.715 wad10 =~
tadhde10 1.000 1.720 0.693 wad12 =~
tadhde12 1.000 1.797 0.708 wsi5 =~
sisoe5 1.000 0.923 0.804 wsi7 =~
sisoe7 1.000 0.951 0.812 wsi10 =~
sisoe10 1.000 1.090 0.847 wsi12 =~
sisoe12 1.000 1.171 0.864

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.215 0.040 5.427 0.000 0.252 0.252 wsi5 (d) 0.063 0.057 1.119 0.263 0.032 0.032 wsi7 ~
wad5 (c) 0.035 0.015 2.379 0.017 0.078 0.078 wsi5 0.214 0.056 3.836 0.000 0.207 0.207 wad10 ~
wad7 0.084 0.062 1.359 0.174 0.089 0.089 wsi7 (d) 0.063 0.057 1.119 0.263 0.035 0.035 wsi10 ~
wad7 (c) 0.035 0.015 2.379 0.017 0.058 0.058 wsi7 0.270 0.053 5.051 0.000 0.235 0.235 wad12 ~
wad10 0.269 0.066 4.084 0.000 0.257 0.257 wsi10 (d) 0.063 0.057 1.119 0.263 0.038 0.038 wsi12 ~
wad10 (c) 0.035 0.015 2.379 0.017 0.051 0.051 wsi10 0.427 0.041 10.451 0.000 0.398 0.398

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.552 0.108 5.096 0.000 0.280 0.280 .wad7 ~~
.wsi7 0.380 0.092 4.122 0.000 0.233 0.233 .wad10 ~~
.wsi10 0.520 0.093 5.598 0.000 0.289 0.289 .wad12 ~~
.wsi12 0.479 0.084 5.722 0.000 0.260 0.260 RIad ~~
RIsi 0.661 0.075 8.826 0.000 0.540 0.540

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .tadhde5 2.250 0.059 38.460 0.000 2.250 0.807 .tadhde7 1.812 0.055 32.729 0.000 1.812 0.708 .tadhde10 1.564 0.053 29.453 0.000 1.564 0.630 .tadhde12 1.454 0.055 26.669 0.000 1.454 0.573 .sisoe5 0.813 0.024 33.882 0.000 0.813 0.708 .sisoe7 0.831 0.025 33.082 0.000 0.831 0.710 .sisoe10 0.939 0.028 33.696 0.000 0.939 0.730 .sisoe12 0.941 0.029 31.920 0.000 0.941 0.694 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 3.206 0.235 13.655 0.000 1.000 1.000 RIsi 0.467 0.056 8.349 0.000 1.000 1.000 wad5 4.571 0.321 14.220 0.000 1.000 1.000 wsi5 0.851 0.100 8.498 0.000 1.000 1.000 .wad7 3.122 0.250 12.470 0.000 0.931 0.931 .wsi7 0.852 0.070 12.119 0.000 0.942 0.942 .wad10 2.928 0.312 9.390 0.000 0.989 0.989 .wsi10 1.109 0.080 13.906 0.000 0.934 0.934 .wad12 2.993 0.258 11.614 0.000 0.926 0.926 .wsi12 1.134 0.082 13.918 0.000 0.827 0.827 .tadhde5 0.000 0.000 0.000 .tadhde7 0.000 0.000 0.000 .tadhde10 0.000 0.000 0.000 .tadhde12 0.000 0.000 0.000 .sisoe5 0.000 0.000 0.000 .sisoe7 0.000 0.000 0.000 .sisoe10 0.000 0.000 0.000 .sisoe12 0.000 0.000 0.000

#Table of model fit 
RICLPMcomb2d.fit.summary.fit <- table.model.fit(RICLPMcomb2d.fit.summary)
RICLPMcomb2d.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
RICLPMcomb2d.fit.summary.reg <- table.model.coef(model = RICLPMcomb2d.fit.summary, type = "RICLPM", constraints = "Yes")
RICLPMcomb2d.fit.summary.reg %>% select(lhs, op, rhs, std.all, pvalue)  %>% mutate_if(is.numeric, round, 3)
lavTestLRT(RICLPMcomb2c.fit, RICLPMcomb2d.fit, method = "satorra.bentler.2010") #comparing to other best fitting model

RICLPMcomb2d is NOT significantly worse fit compared to RICLPMcomb2c (p = 0.4947).

The best fitting model (mother report and total ADHD symptoms) is currently RICLPMcomb2d where cross-lags are constrained to be equal across time.


Constrained grand means (RICLPMcomb3)

The grand means are the means over all units per occasion. These grand means may be time-varying, or may be fixed to be invariant over time.

RICLPMcomb3 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
  
  # Constrain the grand means over time
  tadhde5 + tadhde7 + tadhde10 + tadhde12 ~ mad*1
  sisoe5 + sisoe7 + sisoe10 + sisoe12 ~ msi*1
'
RICLPMcomb3.fit <- lavaan(RICLPMcomb3, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMcomb.fit, RICLPMcomb3.fit, method = "satorra.bentler.2010") 

If the grand means cannot be constrained to be invariant over time, this implies that on average there is some change in this variable over time, which may reflect some occasion-specific effect, or a developmental trend. By allowing the means to freely vary over time, we account for such average changes over time.

This makes sense as we have shown variation in social isolation over time and other literature has shown variation in ADHD over time.


RI-CLPM: Combined mother and teacher report, Hyperactive/Impulsive ADHD symptoms

Cross-lagged panel model (CLPMcomb_hyp)

CLPMcomb_hyp <- '
  # Estimate the lagged effects between the observed variables.
  hye7 + sisoe7 ~ hye5 + sisoe5
  hye10 + sisoe10 ~ hye7 + sisoe7
  hye12 + sisoe12 ~ hye10 + sisoe10

  # Estimate the covariance between the observed variables at the first wave. 
  hye5 ~~ sisoe5 # Covariance
  
  # Estimate the covariances between the residuals of the observed variables.
  hye7 ~~ sisoe7
  hye10 ~~ sisoe10
  hye12 ~~ sisoe12
  
  # Estimate the (residual) variance of the observed variables.
  hye5 ~~ hye5 # Variances
  sisoe5 ~~ sisoe5 
  hye7 ~~ hye7 # Residual variances
  sisoe7 ~~ sisoe7 
  hye10 ~~ hye10 
  sisoe10 ~~ sisoe10 
  hye12 ~~ hye12 
  sisoe12 ~~ sisoe12 
'
CLPMcomb_hyp.fit <- lavaan(CLPMcomb_hyp, 
                   data = dat, 
                   missing = 'ML',
                   meanstructure = TRUE, 
                   int.ov.free = TRUE,
                   se = "robust",
                   estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic 
                   ) 

CLPMcomb_hyp.fit.summary <- summary(CLPMcomb_hyp.fit, 
                            fit.measures = TRUE,
                            standardized = TRUE)

lavaan 0.6-10 ended normally after 25 iterations

Estimator ML Optimization method NLMINB Number of model parameters 32

Number of observations 2232 Number of missing patterns 9

Model Test User Model: Standard Robust Test Statistic 366.119 219.642 Degrees of freedom 12 12 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.667 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 5729.300 3019.279 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.898

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.938 0.931 Tucker-Lewis Index (TLI) 0.855 0.838

Robust Comparative Fit Index (CFI) 0.939 Robust Tucker-Lewis Index (TLI) 0.858

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -27277.325 -27277.325 Scaling correction factor 2.422 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.216 for the MLR correction

Akaike (AIC) 54618.651 54618.651 Bayesian (BIC) 54801.392 54801.392 Sample-size adjusted Bayesian (BIC) 54699.723 54699.723

Root Mean Square Error of Approximation:

RMSEA 0.115 0.088 90 Percent confidence interval - lower 0.105 0.080 90 Percent confidence interval - upper 0.125 0.096 P-value RMSEA <= 0.05 0.000 0.000

Robust RMSEA 0.114 90 Percent confidence interval - lower 0.101 90 Percent confidence interval - upper 0.127

Standardized Root Mean Square Residual:

SRMR 0.062 0.062

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all hye7 ~
hye5 0.515 0.023 22.245 0.000 0.515 0.548 sisoe5 0.079 0.031 2.517 0.012 0.079 0.059 sisoe7 ~
hye5 0.082 0.017 4.764 0.000 0.082 0.112 sisoe5 0.478 0.043 11.132 0.000 0.478 0.460 hye10 ~
hye7 0.480 0.027 18.087 0.000 0.480 0.523 sisoe7 0.081 0.036 2.265 0.024 0.081 0.069 sisoe10 ~
hye7 0.101 0.022 4.549 0.000 0.101 0.118 sisoe7 0.503 0.036 14.077 0.000 0.503 0.456 hye12 ~
hye10 0.641 0.034 18.895 0.000 0.641 0.620 sisoe10 0.009 0.025 0.358 0.720 0.009 0.008 sisoe12 ~
hye10 0.108 0.023 4.633 0.000 0.108 0.109 sisoe10 0.571 0.031 18.125 0.000 0.571 0.540

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all hye5 ~~
sisoe5 0.527 0.061 8.625 0.000 0.527 0.290 .hye7 ~~
.sisoe7 0.272 0.044 6.155 0.000 0.272 0.216 .hye10 ~~
.sisoe10 0.319 0.045 7.033 0.000 0.319 0.246 .hye12 ~~
.sisoe12 0.269 0.049 5.519 0.000 0.269 0.216

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .hye7 0.323 0.035 9.198 0.000 0.323 0.214 .sisoe7 0.330 0.034 9.774 0.000 0.330 0.280 .hye10 0.242 0.032 7.588 0.000 0.242 0.175 .sisoe10 0.410 0.031 13.269 0.000 0.410 0.316 .hye12 0.236 0.028 8.457 0.000 0.236 0.165 .sisoe12 0.313 0.029 10.891 0.000 0.313 0.228 hye5 1.371 0.034 40.447 0.000 1.371 0.856 sisoe5 0.813 0.024 33.882 0.000 0.813 0.717

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all hye5 2.566 0.114 22.496 0.000 2.566 1.000 sisoe5 1.285 0.102 12.618 0.000 1.285 1.000 .hye7 1.540 0.082 18.747 0.000 1.540 0.678 .sisoe7 1.032 0.062 16.548 0.000 1.032 0.745 .hye10 1.338 0.082 16.246 0.000 1.338 0.699 .sisoe10 1.253 0.077 16.254 0.000 1.253 0.744 .hye12 1.253 0.087 14.387 0.000 1.253 0.613 .sisoe12 1.235 0.080 15.383 0.000 1.235 0.656

#Table of model fit 
CLPMcomb_hyp.fit.summary.fit <- table.model.fit(CLPMcomb_hyp.fit.summary)
CLPMcomb_hyp.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
CLPMcomb_hyp.fit.summary.reg <- table.model.coef(model = CLPMcomb_hyp.fit.summary, type = "CLPM", constraints = "No")
CLPMcomb_hyp.fit.summary.reg
CLPMcomb_hyp.fit.summary.fit %>%
  select(-aic, -bic, -chisq ) %>%
  mutate_if(is.numeric, round, 2)

Constrained cross-lagged panel model (CLPMcomb_hyp)

CLPMcomb_hyp2 <- '
  # Estimate the lagged effects between the observed variables - constrained
  hye7 ~ hye5 + d*sisoe5 
  sisoe7 ~ c*hye5 + sisoe5
  
  hye10 ~ hye7 + d*sisoe7
  sisoe10 ~ c*hye7 + sisoe7
  
  hye12 ~ hye10 + d*sisoe10
  sisoe12 ~ c*hye10 + sisoe10

  # Estimate the covariance between the observed variables at the first wave. 
  hye5 ~~ sisoe5 # Covariance
  
  # Estimate the covariances between the residuals of the observed variables.
  hye7 ~~ sisoe7
  hye10 ~~ sisoe10
  hye12 ~~ sisoe12
  
  # Estimate the (residual) variance of the observed variables.
  hye5 ~~ hye5 # Variances
  sisoe5 ~~ sisoe5 
  hye7 ~~ hye7 # Residual variances
  sisoe7 ~~ sisoe7 
  hye10 ~~ hye10 
  sisoe10 ~~ sisoe10 
  hye12 ~~ hye12 
  sisoe12 ~~ sisoe12 
'
CLPMcomb_hyp2.fit <- lavaan(CLPMcomb_hyp2, 
                   data = dat, 
                   missing = 'ML',
                   meanstructure = TRUE, 
                   int.ov.free = TRUE,
                   se = "robust",
                   estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic 
                   ) 

CLPMcomb_hyp2.fit.summary <- summary(CLPMcomb_hyp2.fit, 
                            fit.measures = TRUE,
                            standardized = TRUE)

lavaan 0.6-10 ended normally after 25 iterations

Estimator ML Optimization method NLMINB Number of model parameters 32 Number of equality constraints 4

Number of observations 2232 Number of missing patterns 9

Model Test User Model: Standard Robust Test Statistic 374.821 218.262 Degrees of freedom 16 16 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.717 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 5729.300 3019.279 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.898

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.937 0.932 Tucker-Lewis Index (TLI) 0.890 0.882

Robust Comparative Fit Index (CFI) 0.939 Robust Tucker-Lewis Index (TLI) 0.893

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -27281.676 -27281.676 Scaling correction factor 2.189 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.216 for the MLR correction

Akaike (AIC) 54619.353 54619.353 Bayesian (BIC) 54779.251 54779.251 Sample-size adjusted Bayesian (BIC) 54690.291 54690.291

Root Mean Square Error of Approximation:

RMSEA 0.100 0.075 90 Percent confidence interval - lower 0.092 0.069 90 Percent confidence interval - upper 0.109 0.082 P-value RMSEA <= 0.05 0.000 0.000

Robust RMSEA 0.099 90 Percent confidence interval - lower 0.087 90 Percent confidence interval - upper 0.110

Standardized Root Mean Square Residual:

SRMR 0.063 0.063

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all hye7 ~
hye5 0.524 0.023 22.893 0.000 0.524 0.556 sisoe5 (d) 0.051 0.016 3.303 0.001 0.051 0.039 sisoe7 ~
hye5 (c) 0.095 0.012 8.120 0.000 0.095 0.129 sisoe5 0.468 0.041 11.376 0.000 0.468 0.451 hye10 ~
hye7 0.486 0.025 19.195 0.000 0.486 0.531 sisoe7 (d) 0.051 0.016 3.303 0.001 0.051 0.044 sisoe10 ~
hye7 (c) 0.095 0.012 8.120 0.000 0.095 0.111 sisoe7 0.499 0.033 15.277 0.000 0.499 0.454 hye12 ~
hye10 0.625 0.033 18.716 0.000 0.625 0.604 sisoe10 (d) 0.051 0.016 3.303 0.001 0.051 0.046 sisoe12 ~
hye10 (c) 0.095 0.012 8.120 0.000 0.095 0.096 sisoe10 0.584 0.031 18.850 0.000 0.584 0.549

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all hye5 ~~
sisoe5 0.527 0.061 8.625 0.000 0.527 0.290 .hye7 ~~
.sisoe7 0.273 0.044 6.163 0.000 0.273 0.216 .hye10 ~~
.sisoe10 0.319 0.045 7.015 0.000 0.319 0.246 .hye12 ~~
.sisoe12 0.270 0.049 5.523 0.000 0.270 0.217

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .hye7 0.333 0.030 11.037 0.000 0.333 0.221 .sisoe7 0.320 0.031 10.453 0.000 0.320 0.272 .hye10 0.261 0.026 10.052 0.000 0.261 0.189 .sisoe10 0.421 0.027 15.437 0.000 0.421 0.325 .hye12 0.210 0.023 8.996 0.000 0.210 0.147 .sisoe12 0.312 0.026 11.848 0.000 0.312 0.227 hye5 1.371 0.034 40.447 0.000 1.371 0.856 sisoe5 0.813 0.024 33.882 0.000 0.813 0.717

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all hye5 2.566 0.114 22.496 0.000 2.566 1.000 sisoe5 1.285 0.102 12.618 0.000 1.285 1.000 .hye7 1.541 0.082 18.729 0.000 1.541 0.677 .sisoe7 1.032 0.062 16.595 0.000 1.032 0.746 .hye10 1.339 0.083 16.179 0.000 1.339 0.702 .sisoe10 1.253 0.077 16.251 0.000 1.253 0.750 .hye12 1.256 0.087 14.360 0.000 1.256 0.615 .sisoe12 1.235 0.080 15.358 0.000 1.235 0.654

#Table of model fit 
CLPMcomb_hyp2.fit.summary.fit <- table.model.fit(CLPMcomb_hyp2.fit.summary)
CLPMcomb_hyp2.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
CLPMcomb_hyp2.fit.summary.reg <- table.model.coef(model = CLPMcomb_hyp2.fit.summary, type = "CLPM", constraints = "Yes")
CLPMcomb_hyp2.fit.summary.reg
CLPMcomb_hyp2.fit.summary.reg %>% 
  select(lhs, op, rhs, std.all, pvalue) %>%
  mutate_if(is.numeric, round, 2)
CLPMcomb_hyp2.fit.summary.fit %>%
  select(-aic, -bic, -chisq ) %>%
  mutate_if(is.numeric, round, 2)
lavTestLRT(CLPMcomb_hyp.fit, CLPMcomb_hyp2.fit, method = "satorra.bentler.2010")

The basic RI-CLPM model (RICLPMcomb_hyp)

The code for specifying the basic RI-CLPM is given below.

RICLPMcomb_hyp <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Estimate the lagged effects between the within-person centered variables
  wad7 + wsi7 ~ wad5 + wsi5
  wad10 + wsi10 ~ wad7 + wsi7
  wad12 + wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMcomb_hyp.fit <- lavaan(RICLPMcomb_hyp,       # model
                     data = dat,           # data
                     missing = 'ML',       # how to handle missing data 
                     meanstructure = TRUE, # adds intercepts/means to the model for both observed and latent variables
                     se = "robust",        # robust standard errors
                     int.ov.free = TRUE,   # if FALSE, the intercepts of the observed variables are fixed to zero
                     estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
)

RICLPMcomb_hyp.fit.summary <- summary(RICLPMcomb_hyp.fit, 
                                  fit.measures = TRUE,
                                  standardized = TRUE)

lavaan 0.6-10 ended normally after 47 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35

Number of observations 2232 Number of missing patterns 9

Model Test User Model: Standard Robust Test Statistic 54.871 35.656 Degrees of freedom 9 9 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.539 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 5729.300 3019.279 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.898

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.992 0.991 Tucker-Lewis Index (TLI) 0.975 0.972

Robust Comparative Fit Index (CFI) 0.993 Robust Tucker-Lewis Index (TLI) 0.978

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -27121.702 -27121.702 Scaling correction factor 2.391 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.216 for the MLR correction

Akaike (AIC) 54313.403 54313.403 Bayesian (BIC) 54513.276 54513.276 Sample-size adjusted Bayesian (BIC) 54402.076 54402.076

Root Mean Square Error of Approximation:

RMSEA 0.048 0.036 90 Percent confidence interval - lower 0.036 0.027 90 Percent confidence interval - upper 0.060 0.047 P-value RMSEA <= 0.05 0.592 0.985

Robust RMSEA 0.045 90 Percent confidence interval - lower 0.030 90 Percent confidence interval - upper 0.061

Standardized Root Mean Square Residual:

SRMR 0.027 0.027

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
hye5 1.000 0.977 0.605 hye7 1.000 0.977 0.657 hye10 1.000 0.977 0.703 hye12 1.000 0.977 0.689 RIsi =~
sisoe5 1.000 0.688 0.602 sisoe7 1.000 0.688 0.587 sisoe10 1.000 0.688 0.532 sisoe12 1.000 0.688 0.506 wad5 =~
hye5 1.000 1.286 0.796 wad7 =~
hye7 1.000 1.120 0.754 wad10 =~
hye10 1.000 0.989 0.711 wad12 =~
hye12 1.000 1.028 0.725 wsi5 =~
sisoe5 1.000 0.913 0.799 wsi7 =~
sisoe7 1.000 0.948 0.809 wsi10 =~
sisoe10 1.000 1.096 0.847 wsi12 =~
sisoe12 1.000 1.174 0.863

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.235 0.034 6.968 0.000 0.269 0.269 wsi5 0.046 0.051 0.897 0.370 0.037 0.037 wsi7 ~
wad5 0.055 0.026 2.066 0.039 0.074 0.074 wsi5 0.210 0.060 3.492 0.000 0.202 0.202 wad10 ~
wad7 0.108 0.053 2.033 0.042 0.122 0.122 wsi7 0.082 0.059 1.383 0.167 0.078 0.078 wsi10 ~
wad7 0.079 0.040 1.990 0.047 0.081 0.081 wsi7 0.276 0.058 4.727 0.000 0.239 0.239 wad12 ~
wad10 0.268 0.064 4.155 0.000 0.258 0.258 wsi10 0.019 0.036 0.517 0.605 0.020 0.020 wsi12 ~
wad10 0.070 0.043 1.643 0.100 0.059 0.059 wsi10 0.426 0.042 10.252 0.000 0.398 0.398

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.237 0.054 4.355 0.000 0.202 0.202 .wad7 ~~
.wsi7 0.209 0.052 3.978 0.000 0.210 0.210 .wad10 ~~
.wsi10 0.273 0.053 5.114 0.000 0.265 0.265 .wad12 ~~
.wsi12 0.217 0.047 4.569 0.000 0.205 0.205 RIad ~~
RIsi 0.301 0.040 7.441 0.000 0.448 0.448

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .hye5 1.371 0.034 40.447 0.000 1.371 0.849 .hye7 1.093 0.032 33.966 0.000 1.093 0.735 .hye10 0.835 0.030 28.180 0.000 0.835 0.601 .hye12 0.779 0.031 25.506 0.000 0.779 0.549 .sisoe5 0.813 0.024 33.882 0.000 0.813 0.711 .sisoe7 0.831 0.025 33.066 0.000 0.831 0.710 .sisoe10 0.939 0.028 33.704 0.000 0.939 0.726 .sisoe12 0.941 0.029 31.948 0.000 0.941 0.692 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 0.955 0.068 14.043 0.000 1.000 1.000 RIsi 0.473 0.057 8.365 0.000 1.000 1.000 wad5 1.654 0.099 16.742 0.000 1.000 1.000 wsi5 0.833 0.099 8.420 0.000 1.000 1.000 .wad7 1.157 0.085 13.662 0.000 0.922 0.922 .wsi7 0.851 0.073 11.600 0.000 0.948 0.948 .wad10 0.953 0.096 9.971 0.000 0.974 0.974 .wsi10 1.113 0.081 13.747 0.000 0.928 0.928 .wad12 0.983 0.082 11.927 0.000 0.930 0.930 .wsi12 1.136 0.081 13.962 0.000 0.825 0.825 .hye5 0.000 0.000 0.000 .hye7 0.000 0.000 0.000 .hye10 0.000 0.000 0.000 .hye12 0.000 0.000 0.000 .sisoe5 0.000 0.000 0.000 .sisoe7 0.000 0.000 0.000 .sisoe10 0.000 0.000 0.000 .sisoe12 0.000 0.000 0.000

#Table of model fit 
RICLPMcomb_hyp.fit.summary.fit <- table.model.fit(RICLPMcomb_hyp.fit.summary)
#Table of regression coefficients and covariances (concurrent associations)
RICLPMcomb_hyp.fit.summary.reg <- table.model.coef(model = RICLPMcomb_hyp.fit.summary, type = "RICLPM", constraints = "No")

RI-CLPM Constraints over time

Imposing constraints to the model can be achieved through pre-multiplication. It means that we have to prepend the number that we want to fix the parameter to, and an asterisk, to the parameter in the model specification. For example, F =~ 0*x1 fixes the factor loading of ite x1 to factor F to 0. Using pre-multiplication we can also constrain parameters to be the same by giving the the same label. Below we specify an RI-CLPM with the following constraints:

  1. fixed auto-regressive and cross-lagged relations over time, wx2 ~ a*wx1 + b*wy1; ...
  2. time-invariant (residual) (co-)variances in the within-person part wx2 ~~ cov*wy2; ..., wx2 ~~ vx*wx2; ..., and wy2 ~~ vy*wy2; ...
  3. constrained grand means over time, x1 + ... ~ mx*1 and y1 + ... ~ my*1

Here we will use the Chi square significance value to indicate a significantly worse fitting model.

You can also use fit indices for large sample sizes as below, we will use this method when looking at invariance testing in the measireent models: - RMSEA difference = increase smaller than 0.01 is acceptable - CFI difference = decrease smaller than 0.01 is acceptable - TLI difference = decrease smaller than 0.01 is acceptable

Fixed autoregressive and cross-lagged relations over time (RICLPMcomb_hyp2)

a = lag in ad b = lag in si c = cross lag ad->si d = cross lag si->ad

Constraining all lag and crosslag parameters at once (RICLPMcomb2)

RICLPMcomb_hyp2 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + d*wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ a*wad7 + d*wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ a*wad10 + d*wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMcomb_hyp2.fit <- lavaan(RICLPMcomb_hyp2, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMcomb_hyp.fit, RICLPMcomb_hyp2.fit, method = "satorra.bentler.2010")

RICLPMcomb_hyp2 is significantly worse fit compared to RICLPMcomb_hyp.

Constraining lag in ADHD parameter (RICLPMcomb_hyp2a)

Now we will test the constraints based on the following steps recommended by Curran and Bauer: 1. Estimate the baseline model where all parameters are freely estimated (The basic RI-CLPM) 2. Impose equlaity constraints on one set of stabilities (within variable lags). Use LRT tests to see if he fit becomes significantly worse. 3. Impose equality constraints on the next set of stabilities. Compare this to wither model 1 (baseline/basic) if step 2 was significant. Compare to model 2 if step 2 was non-significant. Non-sig LRT = not significantly worse fit 4. Repeat for first set of cross-lags 5. Repeat for second set of cross-lags

RICLPMcomb_hyp2a <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  
  wad10 ~ a*wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  
  wad12 ~ a*wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMcomb_hyp2a.fit <- lavaan(RICLPMcomb_hyp2a, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMcomb_hyp.fit, RICLPMcomb_hyp2a.fit, method = "satorra.bentler.2010")

RICLPMcomb_hyp2a is significantly worse fit compared to RICLPMcomb_hyp. Now we will constrain the other set of stability coefficients: lag in si (b)

Constraining lag in social isolation parameter (RICLPMcomb_hyp2b)

RICLPMcomb_hyp2b <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + b*wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + b*wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMcomb_hyp2b.fit <- lavaan(RICLPMcomb_hyp2b, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMcomb_hyp.fit, RICLPMcomb_hyp2b.fit, method = "satorra.bentler.2010")

RICLPMcomb_hyp2b is significantly worse fit compared to RICLPMcomb_hyp. Now we will constrain the other set of stability coefficients: cross lag ad->si (c)

Constraining cross lag in ADHD to social isolation parameter (RICLPMcomb_hyp2c)

RICLPMcomb_hyp2c <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ c*wad5 + wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ c*wad7 + wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ c*wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMcomb_hyp2c.fit <- lavaan(RICLPMcomb_hyp2c, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMcomb_hyp.fit, RICLPMcomb_hyp2c.fit, method = "satorra.bentler.2010")

RICLPMcomb_hyp2c is NOT significantly worse fit compared to RICLPMcomb_hyp (p = 0.8422). Now we will constrain the other set of stability coefficients: cross lag si->ad (d) but comparing that model to this one.

Constraining cross lag in social isolation to ADHD parameter (RICLPMcomb_hyp2d) - compared to RICLPMcomb_hyp2c

Thus, constraining both sets of lags are tested in this model.

RICLPMcomb_hyp2d <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + d*wsi5 
  wsi7 ~ c*wad5 + wsi5
  
  wad10 ~ wad7 + d*wsi7
  wsi10 ~ c*wad7 + wsi7
  
  wad12 ~ wad10 + d*wsi10
  wsi12 ~ c*wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMcomb_hyp2d.fit <- lavaan(RICLPMcomb_hyp2d, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 

RICLPMcomb_hyp2d.fit.summary <- summary(RICLPMcomb_hyp2d.fit, 
                                    fit.measures = TRUE,
                                    standardized = TRUE)

lavaan 0.6-10 ended normally after 47 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35 Number of equality constraints 4

Number of observations 2232 Number of missing patterns 9

Model Test User Model: Standard Robust Test Statistic 58.530 35.928 Degrees of freedom 13 13 P-value (Chi-square) 0.000 0.001 Scaling correction factor 1.629 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 5729.300 3019.279 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.898

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.992 0.992 Tucker-Lewis Index (TLI) 0.983 0.983

Robust Comparative Fit Index (CFI) 0.993 Robust Tucker-Lewis Index (TLI) 0.986

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -27123.531 -27123.531 Scaling correction factor 2.181 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.216 for the MLR correction

Akaike (AIC) 54309.062 54309.062 Bayesian (BIC) 54486.092 54486.092 Sample-size adjusted Bayesian (BIC) 54387.600 54387.600

Root Mean Square Error of Approximation:

RMSEA 0.040 0.028 90 Percent confidence interval - lower 0.030 0.020 90 Percent confidence interval - upper 0.050 0.037 P-value RMSEA <= 0.05 0.946 1.000

Robust RMSEA 0.036 90 Percent confidence interval - lower 0.022 90 Percent confidence interval - upper 0.050

Standardized Root Mean Square Residual:

SRMR 0.028 0.028

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
hye5 1.000 0.981 0.606 hye7 1.000 0.981 0.659 hye10 1.000 0.981 0.707 hye12 1.000 0.981 0.691 RIsi =~
sisoe5 1.000 0.691 0.604 sisoe7 1.000 0.691 0.591 sisoe10 1.000 0.691 0.536 sisoe12 1.000 0.691 0.508 wad5 =~
hye5 1.000 1.286 0.795 wad7 =~
hye7 1.000 1.119 0.752 wad10 =~
hye10 1.000 0.981 0.707 wad12 =~
hye12 1.000 1.026 0.723 wsi5 =~
sisoe5 1.000 0.912 0.797 wsi7 =~
sisoe7 1.000 0.945 0.807 wsi10 =~
sisoe10 1.000 1.090 0.845 wsi12 =~
sisoe12 1.000 1.173 0.861

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.236 0.034 6.877 0.000 0.271 0.271 wsi5 (d) 0.037 0.031 1.177 0.239 0.030 0.030 wsi7 ~
wad5 (c) 0.058 0.022 2.605 0.009 0.079 0.079 wsi5 0.204 0.057 3.583 0.000 0.197 0.197 wad10 ~
wad7 0.107 0.052 2.057 0.040 0.122 0.122 wsi7 (d) 0.037 0.031 1.177 0.239 0.035 0.035 wsi10 ~
wad7 (c) 0.058 0.022 2.605 0.009 0.060 0.060 wsi7 0.270 0.054 5.029 0.000 0.234 0.234 wad12 ~
wad10 0.257 0.064 4.020 0.000 0.245 0.245 wsi10 (d) 0.037 0.031 1.177 0.239 0.039 0.039 wsi12 ~
wad10 (c) 0.058 0.022 2.605 0.009 0.049 0.049 wsi10 0.432 0.041 10.454 0.000 0.401 0.401

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.236 0.051 4.617 0.000 0.201 0.201 .wad7 ~~
.wsi7 0.196 0.052 3.749 0.000 0.198 0.198 .wad10 ~~
.wsi10 0.262 0.050 5.274 0.000 0.256 0.256 .wad12 ~~
.wsi12 0.217 0.046 4.722 0.000 0.205 0.205 RIad ~~
RIsi 0.312 0.040 7.856 0.000 0.460 0.460

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .hye5 1.371 0.034 40.447 0.000 1.371 0.848 .hye7 1.093 0.032 33.963 0.000 1.093 0.735 .hye10 0.835 0.030 28.187 0.000 0.835 0.602 .hye12 0.779 0.031 25.506 0.000 0.779 0.549 .sisoe5 0.813 0.024 33.882 0.000 0.813 0.710 .sisoe7 0.831 0.025 33.081 0.000 0.831 0.710 .sisoe10 0.939 0.028 33.696 0.000 0.939 0.728 .sisoe12 0.941 0.029 31.931 0.000 0.941 0.691 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 0.961 0.068 14.208 0.000 1.000 1.000 RIsi 0.478 0.056 8.586 0.000 1.000 1.000 wad5 1.653 0.098 16.799 0.000 1.000 1.000 wsi5 0.832 0.099 8.443 0.000 1.000 1.000 .wad7 1.155 0.086 13.402 0.000 0.922 0.922 .wsi7 0.846 0.071 11.929 0.000 0.949 0.949 .wad10 0.945 0.095 9.922 0.000 0.982 0.982 .wsi10 1.111 0.080 13.836 0.000 0.935 0.935 .wad12 0.983 0.082 11.924 0.000 0.933 0.933 .wsi12 1.136 0.081 13.949 0.000 0.826 0.826 .hye5 0.000 0.000 0.000 .hye7 0.000 0.000 0.000 .hye10 0.000 0.000 0.000 .hye12 0.000 0.000 0.000 .sisoe5 0.000 0.000 0.000 .sisoe7 0.000 0.000 0.000 .sisoe10 0.000 0.000 0.000 .sisoe12 0.000 0.000 0.000

#Table of model fit 
RICLPMcomb_hyp2d.fit.summary.fit <- table.model.fit(RICLPMcomb_hyp2d.fit.summary)
RICLPMcomb_hyp2d.fit.summary.fit %>% mutate_if(is.numeric, round, 2)
#Table of regression coefficients and covariances (concurrent associations)
RICLPMcomb_hyp2d.fit.summary.reg <- table.model.coef(model = RICLPMcomb_hyp2d.fit.summary, type = "RICLPM", constraints = "Yes")
RICLPMcomb_hyp2d.fit.summary.reg %>% select(lhs, op, rhs, std.all, pvalue) %>% mutate_if(is.numeric, round, 2)
lavTestLRT(RICLPMcomb_hyp2c.fit, RICLPMcomb_hyp2d.fit, method = "satorra.bentler.2010") #comparing to other best fitting model

RICLPMcomb_hyp2d is NOT significantly worse fit compared to RICLPMcomb_hyp2c.fit (p = 0.4873).

The best fitting model (mother report and Hyperactivity/impulsivity ADHD symptoms) is currently RICLPMcomb2d where cross-lags are constrained to be equal across time.


Constrained grand means (RICLPMcomb_hyp3)

The grand means are the means over all units per occasion. These grand means may be time-varying, or may be fixed to be invariant over time.

RICLPMcomb_hyp3 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
  
  # Constrain the grand means over time
  hye5 + hye7 + hye10 + hye12 ~ mad*1
  sisoe5 + sisoe7 + sisoe10 + sisoe12 ~ msi*1
'
RICLPMcomb_hyp3.fit <- lavaan(RICLPMcomb_hyp3, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMcomb_hyp.fit, RICLPMcomb_hyp3.fit, method = "satorra.bentler.2010") 

If the grand means cannot be constrained to be invariant over time, this implies that on average there is some change in this variable over time, which may reflect some occasion-specific effect, or a developmental trend. By allowing the means to freely vary over time, we account for such average changes over time.

This makes sense as we have shown variation in social isolation over time and other literature has shown variation in ADHD over time.


RI-CLPM: Combined mother and teacher report, Inattention ADHD symptoms

Cross-lagged panel model (CLPMcomb_inat)

CLPMcomb_inat <- '
  # Estimate the lagged effects between the observed variables.
  ine7 + sisoe7 ~ ine5 + sisoe5
  ine10 + sisoe10 ~ ine7 + sisoe7
  ine12 + sisoe12 ~ ine10 + sisoe10

  # Estimate the covariance between the observed variables at the first wave. 
  ine5 ~~ sisoe5 # Covariance
  
  # Estimate the covariances between the residuals of the observed variables.
  ine7 ~~ sisoe7
  ine10 ~~ sisoe10
  ine12 ~~ sisoe12
  
  # Estimate the (residual) variance of the observed variables.
  ine5 ~~ ine5 # Variances
  sisoe5 ~~ sisoe5 
  ine7 ~~ ine7 # Residual variances
  sisoe7 ~~ sisoe7 
  ine10 ~~ ine10 
  sisoe10 ~~ sisoe10 
  ine12 ~~ ine12 
  sisoe12 ~~ sisoe12 
'
CLPMcomb_inat.fit <- lavaan(CLPMcomb_inat, 
                   data = dat, 
                   missing = 'ML',
                   meanstructure = TRUE, 
                   int.ov.free = TRUE,
                   se = "robust",
                   estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic 
                   ) 

CLPMcomb_inat.fit.summary <- summary(CLPMcomb_inat.fit, 
                            fit.measures = TRUE,
                            standardized = TRUE)

lavaan 0.6-10 ended normally after 25 iterations

Estimator ML Optimization method NLMINB Number of model parameters 32

Number of observations 2232 Number of missing patterns 9

Model Test User Model: Standard Robust Test Statistic 427.821 236.761 Degrees of freedom 12 12 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.807 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 5717.557 2837.460 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 2.015

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.927 0.920 Tucker-Lewis Index (TLI) 0.829 0.813

Robust Comparative Fit Index (CFI) 0.928 Robust Tucker-Lewis Index (TLI) 0.833

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -26620.848 -26620.848 Scaling correction factor 2.604 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.387 for the MLR correction

Akaike (AIC) 53305.696 53305.696 Bayesian (BIC) 53488.437 53488.437 Sample-size adjusted Bayesian (BIC) 53386.768 53386.768

Root Mean Square Error of Approximation:

RMSEA 0.125 0.092 90 Percent confidence interval - lower 0.115 0.084 90 Percent confidence interval - upper 0.135 0.099 P-value RMSEA <= 0.05 0.000 0.000

Robust RMSEA 0.123 90 Percent confidence interval - lower 0.110 90 Percent confidence interval - upper 0.137

Standardized Root Mean Square Residual:

SRMR 0.070 0.070

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all ine7 ~
ine5 0.485 0.031 15.678 0.000 0.485 0.517 sisoe5 0.063 0.034 1.838 0.066 0.063 0.053 sisoe7 ~
ine5 0.106 0.021 4.925 0.000 0.106 0.128 sisoe5 0.460 0.043 10.722 0.000 0.460 0.443 ine10 ~
ine7 0.468 0.034 13.944 0.000 0.468 0.463 sisoe7 0.090 0.033 2.763 0.006 0.090 0.079 sisoe10 ~
ine7 0.135 0.026 5.118 0.000 0.135 0.139 sisoe7 0.488 0.036 13.523 0.000 0.488 0.443 ine12 ~
ine10 0.576 0.035 16.596 0.000 0.576 0.571 sisoe10 0.057 0.027 2.093 0.036 0.057 0.054 sisoe12 ~
ine10 0.104 0.026 3.978 0.000 0.104 0.102 sisoe10 0.571 0.033 17.487 0.000 0.571 0.540

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all ine5 ~~
sisoe5 0.627 0.074 8.476 0.000 0.627 0.388 .ine7 ~~
.sisoe7 0.286 0.038 7.432 0.000 0.286 0.251 .ine10 ~~
.sisoe10 0.345 0.049 7.080 0.000 0.345 0.264 .ine12 ~~
.sisoe12 0.358 0.047 7.563 0.000 0.358 0.293

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .ine7 0.242 0.032 7.544 0.000 0.242 0.181 .sisoe7 0.365 0.032 11.238 0.000 0.365 0.310 .ine10 0.315 0.029 10.726 0.000 0.315 0.233 .sisoe10 0.437 0.029 14.996 0.000 0.437 0.337 .ine12 0.203 0.025 7.971 0.000 0.203 0.149 .sisoe12 0.328 0.027 12.044 0.000 0.328 0.239 ine5 0.877 0.030 29.074 0.000 0.877 0.615 sisoe5 0.813 0.024 33.882 0.000 0.813 0.717

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all ine5 2.029 0.124 16.409 0.000 2.029 1.000 sisoe5 1.285 0.102 12.618 0.000 1.285 1.000 .ine7 1.268 0.072 17.515 0.000 1.268 0.709 .sisoe7 1.028 0.063 16.317 0.000 1.028 0.743 .ine10 1.373 0.088 15.578 0.000 1.373 0.753 .sisoe10 1.246 0.076 16.435 0.000 1.246 0.740 .ine12 1.203 0.086 13.926 0.000 1.203 0.648 .sisoe12 1.238 0.081 15.303 0.000 1.238 0.657

#Table of model fit 
CLPMcomb_inat.fit.summary.fit <- table.model.fit(CLPMcomb_inat.fit.summary)
CLPMcomb_inat.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
CLPMcomb_inat.fit.summary.reg <- table.model.coef(model = CLPMcomb_inat.fit.summary, type = "CLPM", constraints = "No")
CLPMcomb_inat.fit.summary.reg
CLPMcomb_inat.fit.summary.fit %>%
  select(-aic, -bic, -chisq ) %>%
  mutate_if(is.numeric, round, 2)

Constrained cross-lagged panel model (CLPMcomb_inat2)

CLPMcomb_inat2 <- '
  # Estimate the lagged effects between the observed variables - constrained
  ine7 ~ ine5 + d*sisoe5 
  sisoe7 ~ c*ine5 + sisoe5
  
  ine10 ~ ine7 + d*sisoe7
  sisoe10 ~ c*ine7 + sisoe7
  
  ine12 ~ ine10 + d*sisoe10
  sisoe12 ~ c*ine10 + sisoe10

  # Estimate the covariance between the observed variables at the first wave. 
  ine5 ~~ sisoe5 # Covariance
  
  # Estimate the covariances between the residuals of the observed variables.
  ine7 ~~ sisoe7
  ine10 ~~ sisoe10
  ine12 ~~ sisoe12
  
  # Estimate the (residual) variance of the observed variables.
  ine5 ~~ ine5 # Variances
  sisoe5 ~~ sisoe5 
  ine7 ~~ ine7 # Residual variances
  sisoe7 ~~ sisoe7 
  ine10 ~~ ine10 
  sisoe10 ~~ sisoe10 
  ine12 ~~ ine12 
  sisoe12 ~~ sisoe12 
'
CLPMcomb_inat2.fit <- lavaan(CLPMcomb_inat2, 
                   data = dat, 
                   missing = 'ML',
                   meanstructure = TRUE, 
                   int.ov.free = TRUE,
                   se = "robust",
                   estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic 
                   ) 

CLPMcomb_inat2.fit.summary <- summary(CLPMcomb_inat2.fit, 
                            fit.measures = TRUE,
                            standardized = TRUE)

lavaan 0.6-10 ended normally after 23 iterations

Estimator ML Optimization method NLMINB Number of model parameters 32 Number of equality constraints 4

Number of observations 2232 Number of missing patterns 9

Model Test User Model: Standard Robust Test Statistic 431.172 232.207 Degrees of freedom 16 16 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.857 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 5717.557 2837.460 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 2.015

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.927 0.923 Tucker-Lewis Index (TLI) 0.872 0.865

Robust Comparative Fit Index (CFI) 0.929 Robust Tucker-Lewis Index (TLI) 0.876

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -26622.523 -26622.523 Scaling correction factor 2.354 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.387 for the MLR correction

Akaike (AIC) 53301.047 53301.047 Bayesian (BIC) 53460.945 53460.945 Sample-size adjusted Bayesian (BIC) 53371.985 53371.985

Root Mean Square Error of Approximation:

RMSEA 0.108 0.078 90 Percent confidence interval - lower 0.099 0.071 90 Percent confidence interval - upper 0.117 0.084 P-value RMSEA <= 0.05 0.000 0.000

Robust RMSEA 0.106 90 Percent confidence interval - lower 0.094 90 Percent confidence interval - upper 0.118

Standardized Root Mean Square Residual:

SRMR 0.071 0.071

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all ine7 ~
ine5 0.486 0.029 16.480 0.000 0.486 0.517 sisoe5 (d) 0.068 0.016 4.154 0.000 0.068 0.058 sisoe7 ~
ine5 (c) 0.114 0.014 8.228 0.000 0.114 0.137 sisoe5 0.457 0.041 11.190 0.000 0.457 0.440 ine10 ~
ine7 0.469 0.031 15.021 0.000 0.469 0.467 sisoe7 (d) 0.068 0.016 4.154 0.000 0.068 0.060 sisoe10 ~
ine7 (c) 0.114 0.014 8.228 0.000 0.114 0.118 sisoe7 0.492 0.034 14.454 0.000 0.492 0.448 ine12 ~
ine10 0.575 0.033 17.274 0.000 0.575 0.567 sisoe10 (d) 0.068 0.016 4.154 0.000 0.068 0.065 sisoe12 ~
ine10 (c) 0.114 0.014 8.228 0.000 0.114 0.111 sisoe10 0.571 0.030 18.951 0.000 0.571 0.537

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all ine5 ~~
sisoe5 0.627 0.074 8.476 0.000 0.627 0.388 .ine7 ~~
.sisoe7 0.286 0.039 7.429 0.000 0.286 0.250 .ine10 ~~
.sisoe10 0.345 0.049 7.071 0.000 0.345 0.264 .ine12 ~~
.sisoe12 0.358 0.047 7.556 0.000 0.358 0.293

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .ine7 0.237 0.026 9.142 0.000 0.237 0.177 .sisoe7 0.360 0.030 12.104 0.000 0.360 0.305 .ine10 0.332 0.025 13.209 0.000 0.332 0.247 .sisoe10 0.449 0.027 16.407 0.000 0.449 0.348 .ine12 0.193 0.022 8.816 0.000 0.193 0.142 .sisoe12 0.321 0.026 12.416 0.000 0.321 0.234 ine5 0.877 0.030 29.074 0.000 0.877 0.615 sisoe5 0.813 0.024 33.882 0.000 0.813 0.717

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all ine5 2.029 0.124 16.409 0.000 2.029 1.000 sisoe5 1.285 0.102 12.618 0.000 1.285 1.000 .ine7 1.268 0.072 17.514 0.000 1.268 0.707 .sisoe7 1.029 0.063 16.326 0.000 1.029 0.741 .ine10 1.374 0.088 15.581 0.000 1.374 0.758 .sisoe10 1.247 0.076 16.405 0.000 1.247 0.746 .ine12 1.204 0.086 13.936 0.000 1.204 0.647 .sisoe12 1.238 0.081 15.312 0.000 1.238 0.656

#Table of model fit 
CLPMcomb_inat2.fit.summary.fit <- table.model.fit(CLPMcomb_inat2.fit.summary)
CLPMcomb_inat2.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
CLPMcomb_inat2.fit.summary.reg <- table.model.coef(model = CLPMcomb_inat2.fit.summary, type = "CLPM", constraints = "Yes")
CLPMcomb_inat2.fit.summary.reg
CLPMcomb_inat2.fit.summary.reg %>% 
  select(lhs, op, rhs, std.all, pvalue) %>%
  mutate_if(is.numeric, round, 2)
CLPMcomb_inat2.fit.summary.fit %>%
  select(-aic, -bic, -chisq ) %>%
  mutate_if(is.numeric, round, 2)
lavTestLRT(CLPMcomb_inat.fit, CLPMcomb_inat2.fit, method = "satorra.bentler.2010")

The basic RI-CLPM model (RICLPMcomb_inat)

The code for specifying the basic RI-CLPM is given below.

RICLPMcomb_inat <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Estimate the lagged effects between the within-person centered variables
  wad7 + wsi7 ~ wad5 + wsi5
  wad10 + wsi10 ~ wad7 + wsi7
  wad12 + wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMcomb_inat.fit <- lavaan(RICLPMcomb_inat,     # model
                     data = dat,           # data
                     missing = 'ML',       # how to handle missing data 
                     meanstructure = TRUE, # adds intercepts/means to the model for both observed and latent variables
                     se = "robust",        # robust standard errors
                     int.ov.free = TRUE,   # if FALSE, the intercepts of the observed variables are fixed to zero
                     estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
)

RICLPMcomb_inat.fit.summary <- summary(RICLPMcomb_inat.fit, 
                                    fit.measures = TRUE,
                                    standardized = TRUE)

lavaan 0.6-10 ended normally after 56 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35

Number of observations 2232 Number of missing patterns 9

Model Test User Model: Standard Robust Test Statistic 66.126 39.909 Degrees of freedom 9 9 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.657 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 5717.557 2837.460 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 2.015

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.990 0.989 Tucker-Lewis Index (TLI) 0.969 0.966

Robust Comparative Fit Index (CFI) 0.991 Robust Tucker-Lewis Index (TLI) 0.972

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -26440.001 -26440.001 Scaling correction factor 2.575 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.387 for the MLR correction

Akaike (AIC) 52950.001 52950.001 Bayesian (BIC) 53149.874 53149.874 Sample-size adjusted Bayesian (BIC) 53038.674 53038.674

Root Mean Square Error of Approximation:

RMSEA 0.053 0.039 90 Percent confidence interval - lower 0.042 0.030 90 Percent confidence interval - upper 0.066 0.049 P-value RMSEA <= 0.05 0.302 0.964

Robust RMSEA 0.050 90 Percent confidence interval - lower 0.035 90 Percent confidence interval - upper 0.067

Standardized Root Mean Square Residual:

SRMR 0.030 0.030

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
ine5 1.000 0.906 0.633 ine7 1.000 0.906 0.683 ine10 1.000 0.906 0.671 ine12 1.000 0.906 0.667 RIsi =~
sisoe5 1.000 0.680 0.593 sisoe7 1.000 0.680 0.579 sisoe10 1.000 0.680 0.526 sisoe12 1.000 0.680 0.503 wad5 =~
ine5 1.000 1.107 0.774 wad7 =~
ine7 1.000 0.969 0.730 wad10 =~
ine10 1.000 1.001 0.742 wad12 =~
ine12 1.000 1.013 0.745 wsi5 =~
sisoe5 1.000 0.923 0.805 wsi7 =~
sisoe7 1.000 0.957 0.815 wsi10 =~
sisoe10 1.000 1.097 0.850 wsi12 =~
sisoe12 1.000 1.169 0.865

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.154 0.049 3.165 0.002 0.176 0.176 wsi5 0.029 0.045 0.644 0.520 0.027 0.027 wsi7 ~
wad5 0.071 0.036 1.983 0.047 0.082 0.082 wsi5 0.216 0.060 3.595 0.000 0.209 0.209 wad10 ~
wad7 0.032 0.064 0.506 0.613 0.031 0.031 wsi7 0.079 0.054 1.459 0.145 0.076 0.076 wsi10 ~
wad7 0.075 0.048 1.550 0.121 0.066 0.066 wsi7 0.285 0.058 4.954 0.000 0.249 0.249 wad12 ~
wad10 0.246 0.056 4.395 0.000 0.243 0.243 wsi10 0.037 0.039 0.944 0.345 0.040 0.040 wsi12 ~
wad10 0.014 0.046 0.317 0.752 0.012 0.012 wsi10 0.437 0.044 9.962 0.000 0.410 0.410

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.310 0.068 4.563 0.000 0.303 0.303 .wad7 ~~
.wsi7 0.198 0.047 4.255 0.000 0.224 0.224 .wad10 ~~
.wsi10 0.276 0.058 4.794 0.000 0.262 0.262 .wad12 ~~
.wsi12 0.268 0.047 5.749 0.000 0.257 0.257 RIad ~~
RIsi 0.342 0.041 8.395 0.000 0.555 0.555

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .ine5 0.877 0.030 29.074 0.000 0.877 0.613 .ine7 0.718 0.029 25.145 0.000 0.718 0.541 .ine10 0.725 0.029 25.060 0.000 0.725 0.537 .ine12 0.673 0.029 23.126 0.000 0.673 0.495 .sisoe5 0.813 0.024 33.882 0.000 0.813 0.709 .sisoe7 0.831 0.025 33.075 0.000 0.831 0.708 .sisoe10 0.939 0.028 33.708 0.000 0.939 0.728 .sisoe12 0.941 0.029 31.924 0.000 0.941 0.696 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 0.820 0.068 12.096 0.000 1.000 1.000 RIsi 0.462 0.058 8.030 0.000 1.000 1.000 wad5 1.225 0.098 12.506 0.000 1.000 1.000 wsi5 0.852 0.102 8.352 0.000 1.000 1.000 .wad7 0.906 0.077 11.694 0.000 0.965 0.965 .wsi7 0.861 0.073 11.792 0.000 0.939 0.939 .wad10 0.994 0.101 9.851 0.000 0.992 0.992 .wsi10 1.115 0.081 13.822 0.000 0.926 0.926 .wad12 0.957 0.080 12.029 0.000 0.934 0.934 .wsi12 1.133 0.082 13.841 0.000 0.829 0.829 .ine5 0.000 0.000 0.000 .ine7 0.000 0.000 0.000 .ine10 0.000 0.000 0.000 .ine12 0.000 0.000 0.000 .sisoe5 0.000 0.000 0.000 .sisoe7 0.000 0.000 0.000 .sisoe10 0.000 0.000 0.000 .sisoe12 0.000 0.000 0.000

#Table of model fit 
RICLPMcomb_inat.fit.summary.fit <- table.model.fit(RICLPMcomb_inat.fit.summary)
#Table of regression coefficients and covariances (concurrent associations)
RICLPMcomb_inat.fit.summary.reg <- table.model.coef(model = RICLPMcomb_inat.fit.summary, type = "RICLPM", constraints = "No")

RI-CLPM Constraints over time

Imposing constraints to the model can be achieved through pre-multiplication. It means that we have to prepend the number that we want to fix the parameter to, and an asterisk, to the parameter in the model specification. For example, F =~ 0*x1 fixes the factor loading of ite x1 to factor F to 0. Using pre-multiplication we can also constrain parameters to be the same by giving the the same label. Below we specify an RI-CLPM with the following constraints:

  1. fixed auto-regressive and cross-lagged relations over time, wx2 ~ a*wx1 + b*wy1; ...
  2. time-invariant (residual) (co-)variances in the within-person part wx2 ~~ cov*wy2; ..., wx2 ~~ vx*wx2; ..., and wy2 ~~ vy*wy2; ...
  3. constrained grand means over time, x1 + ... ~ mx*1 and y1 + ... ~ my*1

Fixed autoregressive and cross-lagged relations over time (RICLPMcomb_inat2)

a = lag in ad b = lag in si c = cross lag ad->si d = cross lag si->ad

Constraining all lag and crosslag parameters at once (RICLPMcomb2)

RICLPMcomb_inat2 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + d*wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ a*wad7 + d*wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ a*wad10 + d*wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMcomb_inat2.fit <- lavaan(RICLPMcomb_inat2, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMcomb_inat.fit, RICLPMcomb_inat2.fit, method = "satorra.bentler.2010")

RICLPMcomb_inat2 is significantly worse fit compared to RICLPMcomb_inat.

Constraining lag in ADHD parameter (RICLPMcomb_inat2a)

Now we will test the constraints based on the following steps recommended by Curran and Bauer: 1. Estimate the baseline model where all parameters are freely estimated (The basic RI-CLPM) 2. Impose equlaity constraints on one set of stabilities (within variable lags). Use LRT tests to see if he fit becomes significantly worse. 3. Impose equality constraints on the next set of stabilities. Compare this to wither model 1 (baseline/basic) if step 2 was significant. Compare to model 2 if step 2 was non-significant. Non-sig LRT = not significantly worse fit 4. Repeat for first set of cross-lags 5. Repeat for second set of cross-lags

RICLPMcomb_inat2a <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  
  wad10 ~ a*wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  
  wad12 ~ a*wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMcomb_inat2a.fit <- lavaan(RICLPMcomb_inat2a, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMcomb_inat.fit, RICLPMcomb_inat2a.fit, method = "satorra.bentler.2010")

RICLPMcomb_inat2a is significantly worse fit compared to RICLPMcomb_inat. Now we will constrain the other set of stability coefficients: lag in si (b)

Constraining lag in social isolation parameter (RICLPMcomb_inat2b)

RICLPMcomb_inat2b <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + b*wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + b*wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMcomb_inat2b.fit <- lavaan(RICLPMcomb_inat2b, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMcomb_inat.fit, RICLPMcomb_inat2b.fit, method = "satorra.bentler.2010")

RICLPMcomb_inat2b is significantly worse fit compared to RICLPMcomb_inat. Now we will constrain the other set of stability coefficients: cross lag ad->si (c)

Constraining cross lag in ADHD to social isolation parameter (RICLPMcomb_inat2c)

RICLPMcomb_inat2c <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ c*wad5 + wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ c*wad7 + wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ c*wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMcomb_inat2c.fit <- lavaan(RICLPMcomb_inat2c, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMcomb_inat.fit, RICLPMcomb_inat2c.fit, method = "satorra.bentler.2010")

RICLPMcomb_inat2c is NOT significantly worse fit compared to RICLPMcomb_inat (p = 0.5174). Now we will constrain the other set of stability coefficients: cross lag si->ad (d) but comparing that model to this one.

Constraining cross lag in social isolation to ADHD parameter (RICLPMcomb_inat2d) - compared to RICLPMcomb_inat2c

Thus, constraining both sets of lags are tested in this model.

RICLPMcomb_inat2d <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + d*wsi5 
  wsi7 ~ c*wad5 + wsi5
  
  wad10 ~ wad7 + d*wsi7
  wsi10 ~ c*wad7 + wsi7
  
  wad12 ~ wad10 + d*wsi10
  wsi12 ~ c*wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMcomb_inat2d.fit <- lavaan(RICLPMcomb_inat2d, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 

RICLPMcomb_inat2d.fit.summary <- summary(RICLPMcomb_inat2d.fit, 
                                      fit.measures = TRUE,
                                      standardized = TRUE)

lavaan 0.6-10 ended normally after 54 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35 Number of equality constraints 4

Number of observations 2232 Number of missing patterns 9

Model Test User Model: Standard Robust Test Statistic 70.654 40.019 Degrees of freedom 13 13 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.765 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 5717.557 2837.460 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 2.015

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.990 0.990 Tucker-Lewis Index (TLI) 0.978 0.979

Robust Comparative Fit Index (CFI) 0.992 Robust Tucker-Lewis Index (TLI) 0.982

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -26442.265 -26442.265 Scaling correction factor 2.345 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.387 for the MLR correction

Akaike (AIC) 52946.529 52946.529 Bayesian (BIC) 53123.559 53123.559 Sample-size adjusted Bayesian (BIC) 53025.067 53025.067

Root Mean Square Error of Approximation:

RMSEA 0.045 0.031 90 Percent confidence interval - lower 0.035 0.023 90 Percent confidence interval - upper 0.055 0.039 P-value RMSEA <= 0.05 0.794 1.000

Robust RMSEA 0.041 90 Percent confidence interval - lower 0.027 90 Percent confidence interval - upper 0.055

Standardized Root Mean Square Residual:

SRMR 0.031 0.031

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
ine5 1.000 0.907 0.636 ine7 1.000 0.907 0.685 ine10 1.000 0.907 0.673 ine12 1.000 0.907 0.666 RIsi =~
sisoe5 1.000 0.685 0.596 sisoe7 1.000 0.685 0.584 sisoe10 1.000 0.685 0.533 sisoe12 1.000 0.685 0.506 wad5 =~
ine5 1.000 1.102 0.772 wad7 =~
ine7 1.000 0.964 0.728 wad10 =~
ine10 1.000 0.997 0.740 wad12 =~
ine12 1.000 1.018 0.746 wsi5 =~
sisoe5 1.000 0.923 0.803 wsi7 =~
sisoe7 1.000 0.951 0.811 wsi10 =~
sisoe10 1.000 1.088 0.846 wsi12 =~
sisoe12 1.000 1.168 0.863

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.145 0.048 3.013 0.003 0.166 0.166 wsi5 (d) 0.033 0.029 1.144 0.253 0.032 0.032 wsi7 ~
wad5 (c) 0.045 0.027 1.666 0.096 0.053 0.053 wsi5 0.221 0.057 3.890 0.000 0.215 0.215 wad10 ~
wad7 0.034 0.063 0.540 0.589 0.033 0.033 wsi7 (d) 0.033 0.029 1.144 0.253 0.031 0.031 wsi10 ~
wad7 (c) 0.045 0.027 1.666 0.096 0.040 0.040 wsi7 0.277 0.055 5.031 0.000 0.242 0.242 wad12 ~
wad10 0.256 0.052 4.900 0.000 0.251 0.251 wsi10 (d) 0.033 0.029 1.144 0.253 0.035 0.035 wsi12 ~
wad10 (c) 0.045 0.027 1.666 0.096 0.039 0.039 wsi10 0.428 0.041 10.454 0.000 0.399 0.399

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.300 0.064 4.680 0.000 0.294 0.294 .wad7 ~~
.wsi7 0.179 0.045 3.956 0.000 0.205 0.205 .wad10 ~~
.wsi10 0.262 0.053 4.971 0.000 0.250 0.250 .wad12 ~~
.wsi12 0.275 0.045 6.126 0.000 0.263 0.263 RIad ~~
RIsi 0.355 0.040 8.989 0.000 0.572 0.572

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .ine5 0.877 0.030 29.074 0.000 0.877 0.614 .ine7 0.718 0.029 25.144 0.000 0.718 0.542 .ine10 0.725 0.029 25.062 0.000 0.725 0.538 .ine12 0.673 0.029 23.130 0.000 0.673 0.493 .sisoe5 0.813 0.024 33.882 0.000 0.813 0.707 .sisoe7 0.831 0.025 33.073 0.000 0.831 0.709 .sisoe10 0.939 0.028 33.697 0.000 0.939 0.731 .sisoe12 0.941 0.029 31.914 0.000 0.941 0.695 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 0.824 0.066 12.419 0.000 1.000 1.000 RIsi 0.469 0.056 8.397 0.000 1.000 1.000 wad5 1.215 0.097 12.536 0.000 1.000 1.000 wsi5 0.853 0.100 8.535 0.000 1.000 1.000 .wad7 0.901 0.079 11.382 0.000 0.968 0.968 .wsi7 0.854 0.071 12.045 0.000 0.944 0.944 .wad10 0.992 0.098 10.121 0.000 0.997 0.997 .wsi10 1.108 0.080 13.880 0.000 0.936 0.936 .wad12 0.965 0.079 12.187 0.000 0.931 0.931 .wsi12 1.134 0.082 13.887 0.000 0.831 0.831 .ine5 0.000 0.000 0.000 .ine7 0.000 0.000 0.000 .ine10 0.000 0.000 0.000 .ine12 0.000 0.000 0.000 .sisoe5 0.000 0.000 0.000 .sisoe7 0.000 0.000 0.000 .sisoe10 0.000 0.000 0.000 .sisoe12 0.000 0.000 0.000

#Table of model fit 
RICLPMcomb_inat2d.fit.summary.fit <- table.model.fit(RICLPMcomb_inat2d.fit.summary)
RICLPMcomb_inat2d.fit.summary.fit %>% mutate_if(is.numeric, round, 2)
#Table of regression coefficients and covariances (concurrent associations)
RICLPMcomb_inat2d.fit.summary.reg <- table.model.coef(model = RICLPMcomb_inat2d.fit.summary, type = "RICLPM", constraints = "Yes")
RICLPMcomb_inat2d.fit.summary.reg %>% select(lhs, op, rhs, std.all, pvalue) %>% mutate_if(is.numeric, round, 3)
lavTestLRT(RICLPMcomb_inat2c.fit, RICLPMcomb_inat2d.fit, method = "satorra.bentler.2010") #comparing to other best fitting model

RICLPMcomb_inat2d is NOT significantly worse fit compared to RICLPMcomb_inat2c.fit (p = 0.6351).

The best fitting model (mother report and inattention ADHD symptoms) is currently RICLPMcomb2d where cross-lags are constrained to be equal across time.


Constrained grand means (RICLPMcomb_inat3)

The grand means are the means over all units per occasion. These grand means may be time-varying, or may be fixed to be invariant over time.

RICLPMcomb_inat3 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
  
  # Constrain the grand means over time
  ine5 + ine7 + ine10 + ine12 ~ mad*1
  sisoe5 + sisoe7 + sisoe10 + sisoe12 ~ msi*1
'
RICLPMcomb_inat3.fit <- lavaan(RICLPMcomb_inat3, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMcomb_inat.fit, RICLPMcomb_inat3.fit, method = "satorra.bentler.2010") 

If the grand means cannot be constrained to be invariant over time, this implies that on average there is some change in this variable over time, which may reflect some occasion-specific effect, or a developmental trend. By allowing the means to freely vary over time, we account for such average changes over time.

This makes sense as we have shown variation in social isolation over time and other literature has shown variation in ADHD over time.


RI-CLPM: Isolation is combined mother and teacher report, total ADHD symptoms is teacher report

Cross-lagged panel model (CLPMadt)

CLPMadt <- '
  # Estimate the lagged effects between the observed variables.
  tadhdet7 + sisoe7 ~ tadhdet5 + sisoe5
  tadhdet10 + sisoe10 ~ tadhdet7 + sisoe7
  tadhdet12 + sisoe12 ~ tadhdet10 + sisoe10

  # Estimate the covariance between the observed variables at the first wave. 
  tadhdet5 ~~ sisoe5 # Covariance
  
  # Estimate the covariances between the residuals of the observed variables.
  tadhdet7 ~~ sisoe7
  tadhdet10 ~~ sisoe10
  tadhdet12 ~~ sisoe12
  
  # Estimate the (residual) variance of the observed variables.
  tadhdet5 ~~ tadhdet5 # Variances
  sisoe5 ~~ sisoe5 
  tadhdet7 ~~ tadhdet7 # Residual variances
  sisoe7 ~~ sisoe7 
  tadhdet10 ~~ tadhdet10 
  sisoe10 ~~ sisoe10 
  tadhdet12 ~~ tadhdet12 
  sisoe12 ~~ sisoe12 
'
CLPMadt.fit <- lavaan(CLPMadt, 
                   data = dat, 
                   missing = 'ML',
                   meanstructure = TRUE, 
                   int.ov.free = TRUE,
                   se = "robust",
                   estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic 
                   ) 

CLPMadt.fit.summary <- summary(CLPMadt.fit, 
                            fit.measures = TRUE,
                            standardized = TRUE)

lavaan 0.6-10 ended normally after 33 iterations

Estimator ML Optimization method NLMINB Number of model parameters 32

Number of observations 2232 Number of missing patterns 38

Model Test User Model: Standard Robust Test Statistic 258.391 120.910 Degrees of freedom 12 12 P-value (Chi-square) 0.000 0.000 Scaling correction factor 2.137 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 3602.277 1545.659 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 2.331

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.931 0.928 Tucker-Lewis Index (TLI) 0.839 0.833

Robust Comparative Fit Index (CFI) 0.934 Robust Tucker-Lewis Index (TLI) 0.846

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -30073.753 -30073.753 Scaling correction factor 3.343 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 3.014 for the MLR correction

Akaike (AIC) 60211.506 60211.506 Bayesian (BIC) 60394.247 60394.247 Sample-size adjusted Bayesian (BIC) 60292.578 60292.578

Root Mean Square Error of Approximation:

RMSEA 0.096 0.064 90 Percent confidence interval - lower 0.086 0.057 90 Percent confidence interval - upper 0.106 0.071 P-value RMSEA <= 0.05 0.000 0.001

Robust RMSEA 0.093 90 Percent confidence interval - lower 0.079 90 Percent confidence interval - upper 0.109

Standardized Root Mean Square Residual:

SRMR 0.064 0.064

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all tadhdet7 ~
tadhdet5 0.319 0.038 8.291 0.000 0.319 0.327 sisoe5 0.070 0.063 1.118 0.263 0.070 0.032 sisoe7 ~
tadhdet5 0.047 0.013 3.670 0.000 0.047 0.103 sisoe5 0.477 0.042 11.380 0.000 0.477 0.460 tadhdet10 ~
tadhdet7 0.296 0.043 6.881 0.000 0.296 0.336 sisoe7 0.090 0.057 1.588 0.112 0.090 0.048 sisoe10 ~
tadhdet7 0.045 0.016 2.851 0.004 0.045 0.088 sisoe7 0.517 0.036 14.477 0.000 0.517 0.469 tadhdet12 ~
tadhdet10 0.328 0.054 6.063 0.000 0.328 0.353 sisoe10 0.101 0.049 2.053 0.040 0.101 0.064 sisoe12 ~
tadhdet10 0.034 0.019 1.762 0.078 0.034 0.055 sisoe10 0.595 0.032 18.462 0.000 0.595 0.562

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all tadhdet5 ~~
sisoe5 0.935 0.141 6.618 0.000 0.935 0.319 .tadhdet7 ~~
.sisoe7 0.539 0.089 6.047 0.000 0.539 0.224 .tadhdet10 ~~
.sisoe10 0.561 0.100 5.627 0.000 0.561 0.241 .tadhdet12 ~~
.sisoe12 0.548 0.092 5.942 0.000 0.548 0.257

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .tadhdet7 0.537 0.067 8.065 0.000 0.537 0.213 .sisoe7 0.397 0.032 12.543 0.000 0.397 0.337 .tadhdet10 0.397 0.054 7.352 0.000 0.397 0.179 .sisoe10 0.468 0.028 16.500 0.000 0.468 0.361 .tadhdet12 0.286 0.048 5.981 0.000 0.286 0.139 .sisoe12 0.357 0.027 13.206 0.000 0.357 0.260 tadhdet5 0.987 0.057 17.381 0.000 0.987 0.383 sisoe5 0.813 0.024 33.882 0.000 0.813 0.717

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all tadhdet5 6.658 0.561 11.870 0.000 6.658 1.000 sisoe5 1.285 0.102 12.618 0.000 1.285 1.000 .tadhdet7 5.596 0.470 11.911 0.000 5.596 0.885 .sisoe7 1.035 0.064 16.191 0.000 1.035 0.748 .tadhdet10 4.292 0.429 10.014 0.000 4.292 0.876 .sisoe10 1.262 0.077 16.427 0.000 1.262 0.749 .tadhdet12 3.629 0.399 9.099 0.000 3.629 0.858 .sisoe12 1.249 0.081 15.345 0.000 1.249 0.663

#Table of model fit 
CLPMadt.fit.summary.fit <- table.model.fit(CLPMadt.fit.summary)
CLPMadt.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
CLPMadt.fit.summary.reg <- table.model.coef(model = CLPMadt.fit.summary, type = "CLPM", constraints = "No")
CLPMadt.fit.summary.reg %>% select(lhs, op, rhs, pvalue, std.all) %>% mutate_if(is.numeric, round, 3)

The basic RI-CLPM model (RICLPMadt)

The code for specifying the basic RI-CLPM is given below.

RICLPMadt <- '
  # Create between components (rando intercepts treated as factors here)
  RIad =~ 1*tadhdet5 + 1*tadhdet7 + 1*tadhdet10 + 1*tadhdet12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhdet5
  wad7 =~ 1*tadhdet7
  wad10 =~ 1*tadhdet10 
  wad12 =~ 1*tadhdet12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Estimate the lagged effects between the within-person centered variables
  wad7 + wsi7 ~ wad5 + wsi5
  wad10 + wsi10 ~ wad7 + wsi7
  wad12 + wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadt.fit <- lavaan(RICLPMadt,               # model
                     data = dat,           # data
                     missing = 'ML',       # how to handle missing data 
                     meanstructure = TRUE, # adds intercepts/means to the model for both observed and latent variables
                     se = "robust",        # robust standard errors
                     int.ov.free = TRUE,   # if FALSE, the intercepts of the observed variables are fixed to zero
                     estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
)

RICLPMadt.fit.summary <- summary(RICLPMadt.fit, 
                              fit.measures = TRUE,
                              standardized = TRUE)

lavaan 0.6-10 ended normally after 88 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35

Number of observations 2232 Number of missing patterns 38

Model Test User Model: Standard Robust Test Statistic 61.305 31.493 Degrees of freedom 9 9 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.947 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 3602.277 1545.659 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 2.331

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.985 0.985 Tucker-Lewis Index (TLI) 0.954 0.954

Robust Comparative Fit Index (CFI) 0.988 Robust Tucker-Lewis Index (TLI) 0.961

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -29975.210 -29975.210 Scaling correction factor 3.289 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 3.014 for the MLR correction

Akaike (AIC) 60020.420 60020.420 Bayesian (BIC) 60220.292 60220.292 Sample-size adjusted Bayesian (BIC) 60109.092 60109.092

Root Mean Square Error of Approximation:

RMSEA 0.051 0.033 90 Percent confidence interval - lower 0.039 0.025 90 Percent confidence interval - upper 0.063 0.043 P-value RMSEA <= 0.05 0.419 0.999

Robust RMSEA 0.047 90 Percent confidence interval - lower 0.030 90 Percent confidence interval - upper 0.065

Standardized Root Mean Square Residual:

SRMR 0.030 0.030

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
tadhdet5 1.000 1.131 0.442 tadhdet7 1.000 1.131 0.451 tadhdet10 1.000 1.131 0.512 tadhdet12 1.000 1.131 0.548 RIsi =~
sisoe5 1.000 0.677 0.594 sisoe7 1.000 0.677 0.577 sisoe10 1.000 0.677 0.524 sisoe12 1.000 0.677 0.497 wad5 =~
tadhdet5 1.000 2.295 0.897 wad7 =~
tadhdet7 1.000 2.238 0.892 wad10 =~
tadhdet10 1.000 1.896 0.859 wad12 =~
tadhdet12 1.000 1.729 0.837 wsi5 =~
sisoe5 1.000 0.916 0.804 wsi7 =~
sisoe7 1.000 0.957 0.816 wsi10 =~
sisoe10 1.000 1.101 0.852 wsi12 =~
sisoe12 1.000 1.180 0.867

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.165 0.048 3.433 0.001 0.169 0.169 wsi5 -0.089 0.106 -0.836 0.403 -0.036 -0.036 wsi7 ~
wad5 0.035 0.019 1.789 0.074 0.083 0.083 wsi5 0.218 0.063 3.456 0.001 0.209 0.209 wad10 ~
wad7 0.123 0.061 2.029 0.042 0.145 0.145 wsi7 -0.064 0.087 -0.740 0.460 -0.032 -0.032 wsi10 ~
wad7 0.028 0.021 1.343 0.179 0.057 0.057 wsi7 0.295 0.059 4.970 0.000 0.256 0.256 wad12 ~
wad10 0.124 0.073 1.704 0.088 0.136 0.136 wsi10 -0.014 0.080 -0.178 0.859 -0.009 -0.009 wsi12 ~
wad10 0.008 0.029 0.273 0.785 0.013 0.013 wsi10 0.449 0.044 10.164 0.000 0.419 0.419

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.470 0.126 3.727 0.000 0.224 0.224 .wad7 ~~
.wsi7 0.406 0.100 4.046 0.000 0.198 0.198 .wad10 ~~
.wsi10 0.415 0.113 3.685 0.000 0.209 0.209 .wad12 ~~
.wsi12 0.402 0.100 4.025 0.000 0.219 0.219 RIad ~~
RIsi 0.399 0.074 5.368 0.000 0.521 0.521

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .tadhdet5 0.987 0.057 17.432 0.000 0.987 0.386 .tadhdet7 0.910 0.056 16.302 0.000 0.910 0.363 .tadhdet10 0.737 0.051 14.327 0.000 0.737 0.334 .tadhdet12 0.617 0.048 12.804 0.000 0.617 0.298 .sisoe5 0.813 0.024 33.882 0.000 0.813 0.714 .sisoe7 0.831 0.025 33.054 0.000 0.831 0.709 .sisoe10 0.939 0.028 33.692 0.000 0.939 0.727 .sisoe12 0.941 0.029 31.931 0.000 0.941 0.692 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 1.280 0.203 6.306 0.000 1.000 1.000 RIsi 0.458 0.059 7.714 0.000 1.000 1.000 wad5 5.267 0.510 10.322 0.000 1.000 1.000 wsi5 0.839 0.104 8.102 0.000 1.000 1.000 .wad7 4.872 0.469 10.379 0.000 0.973 0.973 .wsi7 0.862 0.075 11.455 0.000 0.942 0.942 .wad10 3.523 0.433 8.132 0.000 0.980 0.980 .wsi10 1.122 0.081 13.784 0.000 0.925 0.925 .wad12 2.934 0.401 7.318 0.000 0.982 0.982 .wsi12 1.144 0.082 13.996 0.000 0.822 0.822 .tadhdet5 0.000 0.000 0.000 .tadhdet7 0.000 0.000 0.000 .tadhdet10 0.000 0.000 0.000 .tadhdet12 0.000 0.000 0.000 .sisoe5 0.000 0.000 0.000 .sisoe7 0.000 0.000 0.000 .sisoe10 0.000 0.000 0.000 .sisoe12 0.000 0.000 0.000

#Table of model fit 
RICLPMadt.fit.summary.fit <- table.model.fit(RICLPMadt.fit.summary)
#Table of regression coefficients and covariances (concurrent associations)
RICLPMadt.fit.summary.reg <- table.model.coef(model = RICLPMadt.fit.summary, type = "RICLPM", constraints = "No")

Constraining all lag and crosslag parameters at once (RICLPMadt2)

RICLPMadt2 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhdet5 + 1*tadhdet7 + 1*tadhdet10 + 1*tadhdet12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhdet5
  wad7 =~ 1*tadhdet7
  wad10 =~ 1*tadhdet10 
  wad12 =~ 1*tadhdet12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  
  # Constrainetd lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + d*wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ a*wad7 + d*wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ a*wad10 + d*wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadt2.fit <- lavaan(RICLPMadt2, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 

RICLPMadt2.fit.summary <- summary(RICLPMadt2.fit, 
                              fit.measures = TRUE,
                              standardized = TRUE)

lavaan 0.6-10 ended normally after 79 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35 Number of equality constraints 8

Number of observations 2232 Number of missing patterns 38

Model Test User Model: Standard Robust Test Statistic 99.059 42.710 Degrees of freedom 17 17 P-value (Chi-square) 0.000 0.001 Scaling correction factor 2.319 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 3602.277 1545.659 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 2.331

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.977 0.983 Tucker-Lewis Index (TLI) 0.962 0.972

Robust Comparative Fit Index (CFI) 0.983 Robust Tucker-Lewis Index (TLI) 0.972

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -29994.087 -29994.087 Scaling correction factor 2.663 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 3.014 for the MLR correction

Akaike (AIC) 60042.174 60042.174 Bayesian (BIC) 60196.362 60196.362 Sample-size adjusted Bayesian (BIC) 60110.579 60110.579

Root Mean Square Error of Approximation:

RMSEA 0.047 0.026 90 Percent confidence interval - lower 0.038 0.020 90 Percent confidence interval - upper 0.056 0.032 P-value RMSEA <= 0.05 0.726 1.000

Robust RMSEA 0.040 90 Percent confidence interval - lower 0.025 90 Percent confidence interval - upper 0.055

Standardized Root Mean Square Residual:

SRMR 0.039 0.039

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
tadhdet5 1.000 1.128 0.442 tadhdet7 1.000 1.128 0.451 tadhdet10 1.000 1.128 0.508 tadhdet12 1.000 1.128 0.545 RIsi =~
sisoe5 1.000 0.638 0.555 sisoe7 1.000 0.638 0.527 sisoe10 1.000 0.638 0.492 sisoe12 1.000 0.638 0.486 wad5 =~
tadhdet5 1.000 2.286 0.897 wad7 =~
tadhdet7 1.000 2.231 0.892 wad10 =~
tadhdet10 1.000 1.914 0.862 wad12 =~
tadhdet12 1.000 1.736 0.839 wsi5 =~
sisoe5 1.000 0.955 0.832 wsi7 =~
sisoe7 1.000 1.028 0.850 wsi10 =~
sisoe10 1.000 1.130 0.871 wsi12 =~
sisoe12 1.000 1.147 0.874

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 (a) 0.141 0.039 3.603 0.000 0.144 0.144 wsi5 (d) -0.061 0.062 -0.985 0.325 -0.026 -0.026 wsi7 ~
wad5 (c) 0.018 0.015 1.208 0.227 0.040 0.040 wsi5 (b) 0.365 0.042 8.646 0.000 0.339 0.339 wad10 ~
wad7 (a) 0.141 0.039 3.603 0.000 0.164 0.164 wsi7 (d) -0.061 0.062 -0.985 0.325 -0.033 -0.033 wsi10 ~
wad7 (c) 0.018 0.015 1.208 0.227 0.036 0.036 wsi7 (b) 0.365 0.042 8.646 0.000 0.332 0.332 wad12 ~
wad10 (a) 0.141 0.039 3.603 0.000 0.155 0.155 wsi10 (d) -0.061 0.062 -0.985 0.325 -0.039 -0.039 wsi12 ~
wad10 (c) 0.018 0.015 1.208 0.227 0.030 0.030 wsi10 (b) 0.365 0.042 8.646 0.000 0.360 0.360

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.467 0.116 4.026 0.000 0.214 0.214 .wad7 ~~
.wsi7 0.415 0.093 4.461 0.000 0.195 0.195 .wad10 ~~
.wsi10 0.400 0.113 3.521 0.000 0.199 0.199 .wad12 ~~
.wsi12 0.375 0.098 3.845 0.000 0.205 0.205 RIad ~~
RIsi 0.419 0.077 5.463 0.000 0.582 0.582

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .tadhdet5 0.988 0.057 17.424 0.000 0.988 0.388 .tadhdet7 0.910 0.056 16.286 0.000 0.910 0.364 .tadhdet10 0.738 0.051 14.430 0.000 0.738 0.332 .tadhdet12 0.616 0.048 12.709 0.000 0.616 0.298 .sisoe5 0.813 0.024 33.882 0.000 0.813 0.708 .sisoe7 0.831 0.025 33.053 0.000 0.831 0.687 .sisoe10 0.939 0.028 33.720 0.000 0.939 0.724 .sisoe12 0.941 0.029 31.929 0.000 0.941 0.717 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 1.271 0.205 6.207 0.000 1.000 1.000 RIsi 0.407 0.059 6.941 0.000 1.000 1.000 wad5 5.227 0.506 10.323 0.000 1.000 1.000 wsi5 0.912 0.102 8.905 0.000 1.000 1.000 .wad7 4.878 0.460 10.604 0.000 0.980 0.980 .wsi7 0.927 0.067 13.801 0.000 0.877 0.877 .wad10 3.566 0.409 8.718 0.000 0.974 0.974 .wsi10 1.128 0.084 13.422 0.000 0.884 0.884 .wad12 2.942 0.372 7.916 0.000 0.977 0.977 .wsi12 1.138 0.083 13.640 0.000 0.865 0.865 .tadhdet5 0.000 0.000 0.000 .tadhdet7 0.000 0.000 0.000 .tadhdet10 0.000 0.000 0.000 .tadhdet12 0.000 0.000 0.000 .sisoe5 0.000 0.000 0.000 .sisoe7 0.000 0.000 0.000 .sisoe10 0.000 0.000 0.000 .sisoe12 0.000 0.000 0.000

#Table of model fit 
RICLPMadt2.fit.summary.fit <- table.model.fit(RICLPMadt2.fit.summary)
RICLPMadt2.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
RICLPMadt2.fit.summary.reg <- table.model.coef(model = RICLPMadt2.fit.summary, type = "RICLPM", constraints = "Yes")
RICLPMadt2.fit.summary.reg %>% select(lhs, op, rhs, pvalue, std.all) %>% mutate_if(is.numeric, round, 3)
lavTestLRT(RICLPMadt.fit, RICLPMadt2.fit, method = "satorra.bentler.2010")

RICLPMadt2 is not significantly fit compared to RICLPMadt according to the Chi square test (p = 0.09885)

The best fitting model (mother report and total ADHD symptoms) is currently RICLPMadt2 where both autoregressives and cross-lags are constrained to be equal across time.


Constrainetd grand means (RICLPMadt3)

The grand means are the means over all units per occasion. These grand means may be time-varying, or may be fixed to be invariant over time.

RICLPMadt3 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhdet5 + 1*tadhdet7 + 1*tadhdet10 + 1*tadhdet12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhdet5
  wad7 =~ 1*tadhdet7
  wad10 =~ 1*tadhdet10 
  wad12 =~ 1*tadhdet12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrainetd lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
  
  # Constrain the grand means over time
  tadhdet5 + tadhdet7 + tadhdet10 + tadhdet12 ~ mad*1
  sisoe5 + sisoe7 + sisoe10 + sisoe12 ~ msi*1
'
RICLPMadt3.fit <- lavaan(RICLPMadt3, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMadt.fit, RICLPMadt3.fit, method = "satorra.bentler.2010") 

If the grand means cannot be constrainetd to be invariant over time, this implies that on average there is some change in this variable over time, which may reflect some occasion-specific effect, or a developmental trend. By allowing the means to freely vary over time, we account for such average changes over time.

This makes sense as we have shown variation in social isolation over time and other literature has shown variation in ADHD over time.


RI-CLPM: Isolation is combined mother and teacher report, Hyperactive/Impulsive ADHD is teacher report only

The basic RI-CLPM model (RICLPMadt_hyp)

The code for specifying the basic RI-CLPM is given below.

RICLPMadt_hyp <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hyet5 + 1*hyet7 + 1*hyet10 + 1*hyet12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*hyet5
  wad7 =~ 1*hyet7
  wad10 =~ 1*hyet10 
  wad12 =~ 1*hyet12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Estimate the lagged effects between the within-person centered variables
  wad7 + wsi7 ~ wad5 + wsi5
  wad10 + wsi10 ~ wad7 + wsi7
  wad12 + wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadt_hyp.fit <- lavaan(RICLPMadt_hyp,       # model
                     data = dat,           # data
                     missing = 'ML',       # how to handle missing data 
                     meanstructure = TRUE, # adds intercepts/means to the model for both observed and latent variables
                     se = "robust",        # robust standard errors
                     int.ov.free = TRUE,   # if FALSE, the intercepts of the observed variables are fixed to zero
                     estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
)

RICLPMadt_hyp.fit.summary <- summary(RICLPMadt_hyp.fit, 
                                  fit.measures = TRUE,
                                  standardized = TRUE)

lavaan 0.6-10 ended normally after 45 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35

Number of observations 2232 Number of missing patterns 38

Model Test User Model: Standard Robust Test Statistic 49.188 25.066 Degrees of freedom 9 9 P-value (Chi-square) 0.000 0.003 Scaling correction factor 1.962 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 3237.022 1403.931 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 2.306

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.987 0.988 Tucker-Lewis Index (TLI) 0.961 0.964

Robust Comparative Fit Index (CFI) 0.990 Robust Tucker-Lewis Index (TLI) 0.969

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -25320.990 -25320.990 Scaling correction factor 3.421 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 3.123 for the MLR correction

Akaike (AIC) 50711.980 50711.980 Bayesian (BIC) 50911.853 50911.853 Sample-size adjusted Bayesian (BIC) 50800.652 50800.652

Root Mean Square Error of Approximation:

RMSEA 0.045 0.028 90 Percent confidence interval - lower 0.033 0.019 90 Percent confidence interval - upper 0.057 0.038 P-value RMSEA <= 0.05 0.740 1.000

Robust RMSEA 0.040 90 Percent confidence interval - lower 0.022 90 Percent confidence interval - upper 0.058

Standardized Root Mean Square Residual:

SRMR 0.026 0.026

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
hyet5 1.000 0.559 0.404 hyet7 1.000 0.559 0.419 hyet10 1.000 0.559 0.488 hyet12 1.000 0.559 0.497 RIsi =~
sisoe5 1.000 0.688 0.604 sisoe7 1.000 0.688 0.588 sisoe10 1.000 0.688 0.531 sisoe12 1.000 0.688 0.505 wad5 =~
hyet5 1.000 1.266 0.915 wad7 =~
hyet7 1.000 1.211 0.908 wad10 =~
hyet10 1.000 0.999 0.873 wad12 =~
hyet12 1.000 0.976 0.868 wsi5 =~
sisoe5 1.000 0.909 0.797 wsi7 =~
sisoe7 1.000 0.947 0.809 wsi10 =~
sisoe10 1.000 1.097 0.847 wsi12 =~
sisoe12 1.000 1.176 0.863

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.148 0.047 3.187 0.001 0.155 0.155 wsi5 -0.005 0.060 -0.086 0.932 -0.004 -0.004 wsi7 ~
wad5 0.051 0.031 1.611 0.107 0.068 0.068 wsi5 0.211 0.062 3.402 0.001 0.203 0.203 wad10 ~
wad7 0.090 0.061 1.490 0.136 0.109 0.109 wsi7 -0.070 0.046 -1.515 0.130 -0.066 -0.066 wsi10 ~
wad7 0.052 0.038 1.364 0.172 0.057 0.057 wsi7 0.286 0.059 4.842 0.000 0.247 0.247 wad12 ~
wad10 0.171 0.088 1.935 0.053 0.175 0.175 wsi10 -0.026 0.037 -0.681 0.496 -0.029 -0.029 wsi12 ~
wad10 0.030 0.047 0.633 0.527 0.025 0.025 wsi10 0.443 0.043 10.270 0.000 0.413 0.413

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.172 0.061 2.804 0.005 0.149 0.149 .wad7 ~~
.wsi7 0.202 0.058 3.507 0.000 0.183 0.183 .wad10 ~~
.wsi10 0.182 0.055 3.285 0.001 0.173 0.173 .wad12 ~~
.wsi12 0.144 0.051 2.830 0.005 0.141 0.141 RIad ~~
RIsi 0.174 0.039 4.516 0.000 0.452 0.452

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .hyet5 0.478 0.030 15.702 0.000 0.478 0.345 .hyet7 0.437 0.030 14.600 0.000 0.437 0.328 .hyet10 0.333 0.027 12.510 0.000 0.333 0.291 .hyet12 0.298 0.026 11.352 0.000 0.298 0.265 .sisoe5 0.813 0.024 33.882 0.000 0.813 0.713 .sisoe7 0.831 0.025 33.056 0.000 0.831 0.710 .sisoe10 0.940 0.028 33.689 0.000 0.940 0.726 .sisoe12 0.941 0.029 31.936 0.000 0.941 0.691 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 0.313 0.058 5.360 0.000 1.000 1.000 RIsi 0.473 0.058 8.185 0.000 1.000 1.000 wad5 1.602 0.149 10.779 0.000 1.000 1.000 wsi5 0.826 0.100 8.257 0.000 1.000 1.000 .wad7 1.432 0.144 9.922 0.000 0.976 0.976 .wsi7 0.852 0.075 11.370 0.000 0.950 0.950 .wad10 0.985 0.134 7.359 0.000 0.986 0.986 .wsi10 1.119 0.081 13.734 0.000 0.930 0.930 .wad12 0.924 0.132 7.021 0.000 0.970 0.970 .wsi12 1.142 0.082 13.973 0.000 0.825 0.825 .hyet5 0.000 0.000 0.000 .hyet7 0.000 0.000 0.000 .hyet10 0.000 0.000 0.000 .hyet12 0.000 0.000 0.000 .sisoe5 0.000 0.000 0.000 .sisoe7 0.000 0.000 0.000 .sisoe10 0.000 0.000 0.000 .sisoe12 0.000 0.000 0.000

#Table of model fit 
RICLPMadt_hyp.fit.summary.fit <- table.model.fit(RICLPMadt_hyp.fit.summary)
#Table of regression coefficients and covariances (concurrent associations)
RICLPMadt_hyp.fit.summary.reg <- table.model.coef(model = RICLPMadt_hyp.fit.summary, type = "RICLPM", constraints = "No")

RI-CLPM Constraints over time

Fixed autoregressive and cross-lagged relations over time (RICLPMadt_hyp2)

a = lag in ad b = lag in si c = cross lag ad->si d = cross lag si->ad

Constraining all lag and crosslag parameters at once (RICLPMadt2)

RICLPMadt_hyp2 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hyet5 + 1*hyet7 + 1*hyet10 + 1*hyet12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*hyet5
  wad7 =~ 1*hyet7
  wad10 =~ 1*hyet10 
  wad12 =~ 1*hyet12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  
  # Constrainetd lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + d*wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ a*wad7 + d*wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ a*wad10 + d*wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadt_hyp2.fit <- lavaan(RICLPMadt_hyp2, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 

RICLPMadt_hyp2.fit.summary <- summary(RICLPMadt_hyp2.fit, 
                                    fit.measures = TRUE,
                                    standardized = TRUE)

lavaan 0.6-10 ended normally after 40 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35 Number of equality constraints 8

Number of observations 2232 Number of missing patterns 38

Model Test User Model: Standard Robust Test Statistic 96.335 41.067 Degrees of freedom 17 17 P-value (Chi-square) 0.000 0.001 Scaling correction factor 2.346 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 3237.022 1403.931 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 2.306

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.975 0.983 Tucker-Lewis Index (TLI) 0.959 0.971

Robust Comparative Fit Index (CFI) 0.982 Robust Tucker-Lewis Index (TLI) 0.971

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -25344.563 -25344.563 Scaling correction factor 2.786 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 3.123 for the MLR correction

Akaike (AIC) 50743.127 50743.127 Bayesian (BIC) 50897.315 50897.315 Sample-size adjusted Bayesian (BIC) 50811.531 50811.531

Root Mean Square Error of Approximation:

RMSEA 0.046 0.025 90 Percent confidence interval - lower 0.037 0.019 90 Percent confidence interval - upper 0.055 0.032 P-value RMSEA <= 0.05 0.772 1.000

Robust RMSEA 0.039 90 Percent confidence interval - lower 0.024 90 Percent confidence interval - upper 0.054

Standardized Root Mean Square Residual:

SRMR 0.037 0.037

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
hyet5 1.000 0.561 0.405 hyet7 1.000 0.561 0.420 hyet10 1.000 0.561 0.485 hyet12 1.000 0.561 0.502 RIsi =~
sisoe5 1.000 0.645 0.562 sisoe7 1.000 0.645 0.533 sisoe10 1.000 0.645 0.497 sisoe12 1.000 0.645 0.492 wad5 =~
hyet5 1.000 1.264 0.914 wad7 =~
hyet7 1.000 1.210 0.907 wad10 =~
hyet10 1.000 1.011 0.875 wad12 =~
hyet12 1.000 0.965 0.865 wsi5 =~
sisoe5 1.000 0.949 0.827 wsi7 =~
sisoe7 1.000 1.025 0.846 wsi10 =~
sisoe10 1.000 1.128 0.868 wsi12 =~
sisoe12 1.000 1.143 0.871

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 (a) 0.133 0.041 3.274 0.001 0.139 0.139 wsi5 (d) -0.037 0.031 -1.203 0.229 -0.029 -0.029 wsi7 ~
wad5 (c) 0.036 0.025 1.458 0.145 0.045 0.045 wsi5 (b) 0.362 0.042 8.656 0.000 0.336 0.336 wad10 ~
wad7 (a) 0.133 0.041 3.274 0.001 0.159 0.159 wsi7 (d) -0.037 0.031 -1.203 0.229 -0.038 -0.038 wsi10 ~
wad7 (c) 0.036 0.025 1.458 0.145 0.039 0.039 wsi7 (b) 0.362 0.042 8.656 0.000 0.329 0.329 wad12 ~
wad10 (a) 0.133 0.041 3.274 0.001 0.139 0.139 wsi10 (d) -0.037 0.031 -1.203 0.229 -0.044 -0.044 wsi12 ~
wad10 (c) 0.036 0.025 1.458 0.145 0.032 0.032 wsi10 (b) 0.362 0.042 8.656 0.000 0.357 0.357

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.173 0.057 3.044 0.002 0.144 0.144 .wad7 ~~
.wsi7 0.201 0.052 3.867 0.000 0.174 0.174 .wad10 ~~
.wsi10 0.182 0.055 3.291 0.001 0.172 0.172 .wad12 ~~
.wsi12 0.128 0.051 2.523 0.012 0.126 0.126 RIad ~~
RIsi 0.183 0.038 4.770 0.000 0.505 0.505

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .hyet5 0.478 0.030 15.688 0.000 0.478 0.346 .hyet7 0.437 0.030 14.584 0.000 0.437 0.327 .hyet10 0.334 0.027 12.594 0.000 0.334 0.289 .hyet12 0.298 0.026 11.245 0.000 0.298 0.267 .sisoe5 0.813 0.024 33.882 0.000 0.813 0.708 .sisoe7 0.831 0.025 33.063 0.000 0.831 0.687 .sisoe10 0.940 0.028 33.714 0.000 0.940 0.723 .sisoe12 0.941 0.029 31.940 0.000 0.941 0.717 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 0.314 0.057 5.542 0.000 1.000 1.000 RIsi 0.417 0.058 7.164 0.000 1.000 1.000 wad5 1.597 0.148 10.819 0.000 1.000 1.000 wsi5 0.901 0.100 8.981 0.000 1.000 1.000 .wad7 1.437 0.140 10.252 0.000 0.981 0.981 .wsi7 0.925 0.067 13.859 0.000 0.881 0.881 .wad10 0.998 0.129 7.717 0.000 0.975 0.975 .wsi10 1.128 0.084 13.394 0.000 0.886 0.886 .wad12 0.913 0.125 7.306 0.000 0.981 0.981 .wsi12 1.134 0.084 13.579 0.000 0.868 0.868 .hyet5 0.000 0.000 0.000 .hyet7 0.000 0.000 0.000 .hyet10 0.000 0.000 0.000 .hyet12 0.000 0.000 0.000 .sisoe5 0.000 0.000 0.000 .sisoe7 0.000 0.000 0.000 .sisoe10 0.000 0.000 0.000 .sisoe12 0.000 0.000 0.000

#Table of model fit 
RICLPMadt_hyp2.fit.summary.fit <- table.model.fit(RICLPMadt_hyp2.fit.summary)
RICLPMadt_hyp2.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
RICLPMadt_hyp2.fit.summary.reg <- table.model.coef(model = RICLPMadt_hyp2.fit.summary, type = "RICLPM", constraints = "Yes")
RICLPMadt_hyp2.fit.summary.reg %>% select(lhs, op, rhs, pvalue, std.all) %>% mutate_if(is.numeric, round, 3)
lavTestLRT(RICLPMadt_hyp.fit, RICLPMadt_hyp2.fit, method = "satorra.bentler.2010")

RICLPMadt_hyp2 is significantly worse fit compared to RICLPMadt_hyp. However, p = 0.042 which is very close to being non-significant. As the Chi square p value is often inflated for large samples, we will accept this model as the best fitting.

The best fitting model (mother report and Hyperactivity/impulsivity ADHD symptoms) is currently RICLPMadt2 where cross-lags are constrained to be equal across time.

Constrainetd grand means (RICLPMadt_hyp3)

The grand means are the means over all units per occasion. These grand means may be time-varying, or may be fixed to be invariant over time.

RICLPMadt_hyp3 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hyet5 + 1*hyet7 + 1*hyet10 + 1*hyet12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*hyet5
  wad7 =~ 1*hyet7
  wad10 =~ 1*hyet10 
  wad12 =~ 1*hyet12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrainetd lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
  
  # Constrain the grand means over time
  hyet5 + hyet7 + hyet10 + hyet12 ~ mad*1
  sisoe5 + sisoe7 + sisoe10 + sisoe12 ~ msi*1
'
RICLPMadt_hyp3.fit <- lavaan(RICLPMadt_hyp3, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMadt_hyp.fit, RICLPMadt_hyp3.fit, method = "satorra.bentler.2010") 

If the grand means cannot be constrainetd to be invariant over time, this implies that on average there is some change in this variable over time, which may reflect some occasion-specific effect, or a developmental trend. By allowing the means to freely vary over time, we account for such average changes over time.

This makes sense as we have shown variation in social isolation over time and other literature has shown variation in ADHD over time.


RI-CLPM: Isolation is combined mother and teacher report, Inattention ADHD is teacher report only

The basic RI-CLPM model (RICLPMadt_inat)

The code for specifying the basic RI-CLPM is given below.

RICLPMadt_inat <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*inet5 + 1*inet7 + 1*inet10 + 1*inet12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*inet5
  wad7 =~ 1*inet7
  wad10 =~ 1*inet10 
  wad12 =~ 1*inet12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Estimate the lagged effects between the within-person centered variables
  wad7 + wsi7 ~ wad5 + wsi5
  wad10 + wsi10 ~ wad7 + wsi7
  wad12 + wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadt_inat.fit <- lavaan(RICLPMadt_inat,     # model
                     data = dat,           # data
                     missing = 'ML',       # how to handle missing data 
                     meanstructure = TRUE, # adds intercepts/means to the model for both observed and latent variables
                     se = "robust",        # robust standard errors
                     int.ov.free = TRUE,   # if FALSE, the intercepts of the observed variables are fixed to zero
                     estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
)

RICLPMadt_inat.fit.summary <- summary(RICLPMadt_inat.fit, 
                                    fit.measures = TRUE,
                                    standardized = TRUE)

lavaan 0.6-10 ended normally after 66 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35

Number of observations 2232 Number of missing patterns 38

Model Test User Model: Standard Robust Test Statistic 66.844 32.172 Degrees of freedom 9 9 P-value (Chi-square) 0.000 0.000 Scaling correction factor 2.078 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 3514.978 1513.915 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 2.322

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.983 0.984 Tucker-Lewis Index (TLI) 0.948 0.951

Robust Comparative Fit Index (CFI) 0.986 Robust Tucker-Lewis Index (TLI) 0.957

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -25907.023 -25907.023 Scaling correction factor 3.211 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.979 for the MLR correction

Akaike (AIC) 51884.047 51884.047 Bayesian (BIC) 52083.920 52083.920 Sample-size adjusted Bayesian (BIC) 51972.719 51972.719

Root Mean Square Error of Approximation:

RMSEA 0.054 0.034 90 Percent confidence interval - lower 0.042 0.025 90 Percent confidence interval - upper 0.066 0.043 P-value RMSEA <= 0.05 0.287 0.999

Robust RMSEA 0.049 90 Percent confidence interval - lower 0.031 90 Percent confidence interval - upper 0.068

Standardized Root Mean Square Residual:

SRMR 0.031 0.031

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
inet5 1.000 0.638 0.439 inet7 1.000 0.638 0.441 inet10 1.000 0.638 0.487 inet12 1.000 0.638 0.529 RIsi =~
sisoe5 1.000 0.681 0.599 sisoe7 1.000 0.681 0.582 sisoe10 1.000 0.681 0.527 sisoe12 1.000 0.681 0.500 wad5 =~
inet5 1.000 1.305 0.898 wad7 =~
inet7 1.000 1.298 0.897 wad10 =~
inet10 1.000 1.143 0.873 wad12 =~
inet12 1.000 1.023 0.848 wsi5 =~
sisoe5 1.000 0.912 0.801 wsi7 =~
sisoe7 1.000 0.952 0.813 wsi10 =~
sisoe10 1.000 1.100 0.850 wsi12 =~
sisoe12 1.000 1.179 0.866

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.173 0.051 3.374 0.001 0.174 0.174 wsi5 -0.087 0.057 -1.530 0.126 -0.061 -0.061 wsi7 ~
wad5 0.054 0.034 1.599 0.110 0.074 0.074 wsi5 0.211 0.064 3.306 0.001 0.202 0.202 wad10 ~
wad7 0.092 0.054 1.686 0.092 0.104 0.104 wsi7 0.013 0.054 0.245 0.806 0.011 0.011 wsi10 ~
wad7 0.043 0.033 1.293 0.196 0.051 0.051 wsi7 0.294 0.059 4.989 0.000 0.255 0.255 wad12 ~
wad10 0.059 0.061 0.972 0.331 0.066 0.066 wsi10 0.033 0.050 0.659 0.510 0.035 0.035 wsi12 ~
wad10 -0.000 0.047 -0.006 0.995 -0.000 -0.000 wsi10 0.451 0.044 10.320 0.000 0.420 0.420

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.289 0.074 3.885 0.000 0.243 0.243 .wad7 ~~
.wsi7 0.200 0.053 3.740 0.000 0.169 0.169 .wad10 ~~
.wsi10 0.242 0.069 3.524 0.000 0.201 0.201 .wad12 ~~
.wsi12 0.283 0.060 4.732 0.000 0.260 0.260 RIad ~~
RIsi 0.228 0.040 5.689 0.000 0.525 0.525

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .inet5 0.510 0.032 15.736 0.000 0.510 0.351 .inet7 0.473 0.032 14.834 0.000 0.473 0.327 .inet10 0.403 0.030 13.232 0.000 0.403 0.308 .inet12 0.327 0.028 11.623 0.000 0.327 0.271 .sisoe5 0.813 0.024 33.882 0.000 0.813 0.714 .sisoe7 0.831 0.025 33.053 0.000 0.831 0.710 .sisoe10 0.939 0.028 33.692 0.000 0.939 0.726 .sisoe12 0.941 0.029 31.931 0.000 0.941 0.691 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 0.407 0.063 6.424 0.000 1.000 1.000 RIsi 0.464 0.058 7.985 0.000 1.000 1.000 wad5 1.703 0.162 10.513 0.000 1.000 1.000 wsi5 0.831 0.103 8.099 0.000 1.000 1.000 .wad7 1.635 0.158 10.342 0.000 0.971 0.971 .wsi7 0.858 0.075 11.377 0.000 0.947 0.947 .wad10 1.292 0.151 8.540 0.000 0.989 0.989 .wsi10 1.122 0.081 13.789 0.000 0.928 0.928 .wad12 1.039 0.136 7.633 0.000 0.993 0.993 .wsi12 1.145 0.082 13.958 0.000 0.823 0.823 .inet5 0.000 0.000 0.000 .inet7 0.000 0.000 0.000 .inet10 0.000 0.000 0.000 .inet12 0.000 0.000 0.000 .sisoe5 0.000 0.000 0.000 .sisoe7 0.000 0.000 0.000 .sisoe10 0.000 0.000 0.000 .sisoe12 0.000 0.000 0.000

#Table of model fit 
RICLPMadt_inat.fit.summary.fit <- table.model.fit(RICLPMadt_inat.fit.summary)
#Table of regression coefficients and covariances (concurrent associations)
RICLPMadt_inat.fit.summary.reg <- table.model.coef(model = RICLPMadt_inat.fit.summary, type = "RICLPM", constraints = "No")

RI-CLPM Constraints over time

Fixed autoregressive and cross-lagged relations over time (RICLPMadt_inat2)

a = lag in ad b = lag in si c = cross lag ad->si d = cross lag si->ad

Constraining all lag and crosslag parameters at once (RICLPMadt2)

RICLPMadt_inat2 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*inet5 + 1*inet7 + 1*inet10 + 1*inet12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*inet5
  wad7 =~ 1*inet7
  wad10 =~ 1*inet10 
  wad12 =~ 1*inet12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrainetd lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + d*wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ a*wad7 + d*wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ a*wad10 + d*wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadt_inat2.fit <- lavaan(RICLPMadt_inat2, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 

RICLPMadt_inat2.fit.summary <- summary(RICLPMadt_inat2.fit, 
                                      fit.measures = TRUE,
                                      standardized = TRUE)

lavaan 0.6-10 ended normally after 53 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35 Number of equality constraints 8

Number of observations 2232 Number of missing patterns 38

Model Test User Model: Standard Robust Test Statistic 114.872 49.160 Degrees of freedom 17 17 P-value (Chi-square) 0.000 0.000 Scaling correction factor 2.337 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 3514.978 1513.915 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 2.322

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.972 0.978 Tucker-Lewis Index (TLI) 0.954 0.964

Robust Comparative Fit Index (CFI) 0.978 Robust Tucker-Lewis Index (TLI) 0.964

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -25931.037 -25931.037 Scaling correction factor 2.610 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.979 for the MLR correction

Akaike (AIC) 51916.074 51916.074 Bayesian (BIC) 52070.262 52070.262 Sample-size adjusted Bayesian (BIC) 51984.479 51984.479

Root Mean Square Error of Approximation:

RMSEA 0.051 0.029 90 Percent confidence interval - lower 0.042 0.023 90 Percent confidence interval - upper 0.060 0.035 P-value RMSEA <= 0.05 0.423 1.000

Robust RMSEA 0.045 90 Percent confidence interval - lower 0.030 90 Percent confidence interval - upper 0.059

Standardized Root Mean Square Residual:

SRMR 0.042 0.042

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
inet5 1.000 0.639 0.443 inet7 1.000 0.639 0.445 inet10 1.000 0.639 0.484 inet12 1.000 0.639 0.526 RIsi =~
sisoe5 1.000 0.641 0.557 sisoe7 1.000 0.641 0.530 sisoe10 1.000 0.641 0.494 sisoe12 1.000 0.641 0.488 wad5 =~
inet5 1.000 1.294 0.897 wad7 =~
inet7 1.000 1.287 0.896 wad10 =~
inet10 1.000 1.155 0.875 wad12 =~
inet12 1.000 1.034 0.851 wsi5 =~
sisoe5 1.000 0.954 0.830 wsi7 =~
sisoe7 1.000 1.025 0.848 wsi10 =~
sisoe10 1.000 1.127 0.869 wsi12 =~
sisoe12 1.000 1.145 0.873

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 (a) 0.110 0.036 3.010 0.003 0.110 0.110 wsi5 (d) -0.013 0.037 -0.351 0.726 -0.010 -0.010 wsi7 ~
wad5 (c) 0.021 0.025 0.821 0.412 0.026 0.026 wsi5 (b) 0.365 0.043 8.567 0.000 0.340 0.340 wad10 ~
wad7 (a) 0.110 0.036 3.010 0.003 0.122 0.122 wsi7 (d) -0.013 0.037 -0.351 0.726 -0.012 -0.012 wsi10 ~
wad7 (c) 0.021 0.025 0.821 0.412 0.024 0.024 wsi7 (b) 0.365 0.043 8.567 0.000 0.332 0.332 wad12 ~
wad10 (a) 0.110 0.036 3.010 0.003 0.122 0.122 wsi10 (d) -0.013 0.037 -0.351 0.726 -0.014 -0.014 wsi12 ~
wad10 (c) 0.021 0.025 0.821 0.412 0.021 0.021 wsi10 (b) 0.365 0.043 8.567 0.000 0.359 0.359

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.287 0.071 4.067 0.000 0.232 0.232 .wad7 ~~
.wsi7 0.216 0.051 4.272 0.000 0.176 0.176 .wad10 ~~
.wsi10 0.222 0.069 3.212 0.001 0.183 0.183 .wad12 ~~
.wsi12 0.268 0.059 4.586 0.000 0.245 0.245 RIad ~~
RIsi 0.240 0.043 5.553 0.000 0.586 0.586

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .inet5 0.510 0.032 15.731 0.000 0.510 0.354 .inet7 0.474 0.032 14.797 0.000 0.474 0.330 .inet10 0.404 0.030 13.302 0.000 0.404 0.306 .inet12 0.326 0.028 11.569 0.000 0.326 0.269 .sisoe5 0.813 0.024 33.882 0.000 0.813 0.707 .sisoe7 0.831 0.025 33.048 0.000 0.831 0.688 .sisoe10 0.939 0.028 33.721 0.000 0.939 0.725 .sisoe12 0.941 0.029 31.927 0.000 0.941 0.717 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 0.408 0.065 6.258 0.000 1.000 1.000 RIsi 0.411 0.058 7.098 0.000 1.000 1.000 wad5 1.674 0.162 10.335 0.000 1.000 1.000 wsi5 0.911 0.102 8.930 0.000 1.000 1.000 .wad7 1.637 0.157 10.452 0.000 0.988 0.988 .wsi7 0.924 0.067 13.724 0.000 0.880 0.880 .wad10 1.314 0.144 9.094 0.000 0.985 0.985 .wsi10 1.127 0.084 13.350 0.000 0.887 0.887 .wad12 1.053 0.129 8.153 0.000 0.985 0.985 .wsi12 1.138 0.084 13.618 0.000 0.868 0.868 .inet5 0.000 0.000 0.000 .inet7 0.000 0.000 0.000 .inet10 0.000 0.000 0.000 .inet12 0.000 0.000 0.000 .sisoe5 0.000 0.000 0.000 .sisoe7 0.000 0.000 0.000 .sisoe10 0.000 0.000 0.000 .sisoe12 0.000 0.000 0.000

#Table of model fit 
RICLPMadt_inat2.fit.summary.fit <- table.model.fit(RICLPMadt_inat2.fit.summary)
RICLPMadt_inat2.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
RICLPMadt_inat2.fit.summary.reg <- table.model.coef(model = RICLPMadt_inat2.fit.summary, type = "RICLPM", constraints = "Yes")
RICLPMadt_inat2.fit.summary.reg %>% select(lhs, op, rhs, pvalue, std.all) %>% mutate_if(is.numeric, round, 3)
lavTestLRT(RICLPMadt_inat.fit, RICLPMadt_inat2.fit, method = "satorra.bentler.2010")

RICLPMadt_inat2 is significantly worse (p = 0.02499) fit compared to RICLPMadt_inat. **However, there was no large change (over 0.01) in model fit - therefore we will keep this as the best fitting model.

Difference in fit: RICLPMadt_inat2 RICLPMadt_inat Robust Comparative Fit Index (CFI) 0.978 0.986 (0.008) Robust Tucker-Lewis Index (TLI) 0.964 0.957 (-0.007) - better fit Robust RMSEA 0.045 0.049 (0.004) SRMR 0.042 0.031 (0.011)

The best fitting model (mother report and inattention ADHD symptoms) is currently RICLPMadt2 where autoregressives and cross-lags are constrained to be equal across time.

Constrainetd grand means (RICLPMadt_inat3)

The grand means are the means over all units per occasion. These grand means may be time-varying, or may be fixed to be invariant over time.

RICLPMadt_inat3 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*inet5 + 1*inet7 + 1*inet10 + 1*inet12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*inet5
  wad7 =~ 1*inet7
  wad10 =~ 1*inet10 
  wad12 =~ 1*inet12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrainetd lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
  
  # Constrain the grand means over time
  inet5 + inet7 + inet10 + inet12 ~ mad*1
  sisoe5 + sisoe7 + sisoe10 + sisoe12 ~ msi*1
'
RICLPMadt_inat3.fit <- lavaan(RICLPMadt_inat3, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMadt_inat.fit, RICLPMadt_inat3.fit, method = "satorra.bentler.2010") 

If the grand means cannot be constrainetd to be invariant over time, this implies that on average there is some change in this variable over time, which may reflect some occasion-specific effect, or a developmental trend. By allowing the means to freely vary over time, we account for such average changes over time.

This makes sense as we have shown variation in social isolation over time and other literature has shown variation in ADHD over time.


RI-CLPM: Isolation is combined mother and teacher report, total ADHD symptoms is mother report

Cross-lagged panel model (CLPMadm)

CLPMadm <- '
  # Estimate the lagged effects between the observed variables.
  tadhdem7 + sisoe7 ~ tadhdem5 + sisoe5
  tadhdem10 + sisoe10 ~ tadhdem7 + sisoe7
  tadhdem12 + sisoe12 ~ tadhdem10 + sisoe10

  # Estimate the covariance between the observed variables at the first wave. 
  tadhdem5 ~~ sisoe5 # Covariance
  
  # Estimate the covariances between the residuals of the observed variables.
  tadhdem7 ~~ sisoe7
  tadhdem10 ~~ sisoe10
  tadhdem12 ~~ sisoe12
  
  # Estimate the (residual) variance of the observed variables.
  tadhdem5 ~~ tadhdem5 # Variances
  sisoe5 ~~ sisoe5 
  tadhdem7 ~~ tadhdem7 # Residual variances
  sisoe7 ~~ sisoe7 
  tadhdem10 ~~ tadhdem10 
  sisoe10 ~~ sisoe10 
  tadhdem12 ~~ tadhdem12 
  sisoe12 ~~ sisoe12 
'
CLPMadm.fit <- lavaan(CLPMadm, 
                   data = dat, 
                   missing = 'ML',
                   meanstructure = TRUE, 
                   int.ov.free = TRUE,
                   se = "robust",
                   estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic 
                   ) 

CLPMadm.fit.summary <- summary(CLPMadm.fit, 
                            fit.measures = TRUE,
                            standardized = TRUE)

lavaan 0.6-10 ended normally after 44 iterations

Estimator ML Optimization method NLMINB Number of model parameters 32

Number of observations 2232 Number of missing patterns 12

Model Test User Model: Standard Robust Test Statistic 409.350 240.204 Degrees of freedom 12 12 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.704 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 6380.859 3452.175 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.848

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.937 0.933 Tucker-Lewis Index (TLI) 0.854 0.844

Robust Comparative Fit Index (CFI) 0.939 Robust Tucker-Lewis Index (TLI) 0.857

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -34734.629 -34734.629 Scaling correction factor 2.259 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.108 for the MLR correction

Akaike (AIC) 69533.259 69533.259 Bayesian (BIC) 69716.000 69716.000 Sample-size adjusted Bayesian (BIC) 69614.331 69614.331

Root Mean Square Error of Approximation:

RMSEA 0.122 0.092 90 Percent confidence interval - lower 0.112 0.085 90 Percent confidence interval - upper 0.132 0.100 P-value RMSEA <= 0.05 0.000 0.000

Robust RMSEA 0.120 90 Percent confidence interval - lower 0.107 90 Percent confidence interval - upper 0.134

Standardized Root Mean Square Residual:

SRMR 0.058 0.058

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all tadhdem7 ~
tadhdem5 0.538 0.023 23.142 0.000 0.538 0.578 sisoe5 0.335 0.078 4.276 0.000 0.335 0.103 sisoe7 ~
tadhdem5 0.036 0.007 4.964 0.000 0.036 0.122 sisoe5 0.476 0.043 11.029 0.000 0.476 0.459 tadhdem10 ~
tadhdem7 0.486 0.027 18.134 0.000 0.486 0.524 sisoe7 0.330 0.078 4.241 0.000 0.330 0.113 sisoe10 ~
tadhdem7 0.049 0.008 6.024 0.000 0.049 0.138 sisoe7 0.497 0.035 14.097 0.000 0.497 0.450 tadhdem12 ~
tadhdem10 0.698 0.026 26.433 0.000 0.698 0.696 sisoe10 0.073 0.058 1.257 0.209 0.073 0.028 sisoe12 ~
tadhdem10 0.053 0.009 5.625 0.000 0.053 0.131 sisoe10 0.563 0.032 17.678 0.000 0.563 0.532

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all tadhdem5 ~~
sisoe5 1.274 0.138 9.234 0.000 1.274 0.283 .tadhdem7 ~~
.sisoe7 0.499 0.083 5.988 0.000 0.499 0.169 .tadhdem10 ~~
.sisoe10 0.658 0.097 6.762 0.000 0.658 0.210 .tadhdem12 ~~
.sisoe12 0.547 0.098 5.553 0.000 0.547 0.203

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .tadhdem7 0.542 0.079 6.859 0.000 0.542 0.147 .sisoe7 0.323 0.033 9.728 0.000 0.323 0.275 .tadhdem10 0.640 0.072 8.904 0.000 0.640 0.187 .sisoe10 0.399 0.030 13.395 0.000 0.399 0.307 .tadhdem12 0.435 0.060 7.200 0.000 0.435 0.127 .sisoe12 0.296 0.028 10.491 0.000 0.296 0.216 tadhdem5 3.368 0.084 40.093 0.000 3.368 0.849 sisoe5 0.813 0.024 33.882 0.000 0.813 0.717

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all tadhdem5 15.740 0.603 26.122 0.000 15.740 1.000 sisoe5 1.285 0.102 12.618 0.000 1.285 1.000 .tadhdem7 8.452 0.414 20.438 0.000 8.452 0.621 .sisoe7 1.029 0.062 16.607 0.000 1.029 0.743 .tadhdem10 7.910 0.396 19.994 0.000 7.910 0.675 .sisoe10 1.245 0.076 16.287 0.000 1.245 0.739 .tadhdem12 5.900 0.355 16.603 0.000 5.900 0.501 .sisoe12 1.226 0.080 15.285 0.000 1.226 0.651

#Table of model fit 
CLPMadm.fit.summary.fit <- table.model.fit(CLPMadm.fit.summary)
CLPMadm.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
CLPMadm.fit.summary.reg <- table.model.coef(model = CLPMadm.fit.summary, type = "CLPM", constraints = "No")
CLPMadm.fit.summary.reg %>% select(lhs, op, rhs, pvalue, std.all) %>% mutate_if(is.numeric, round, 3)

The basic RI-CLPM model (RICLPMadm)

The code for specifying the basic RI-CLPM is given below.

RICLPMadm <- '
  # Create between components (rando intercepts treated as factors here)
  RIad =~ 1*tadhdem5 + 1*tadhdem7 + 1*tadhdem10 + 1*tadhdem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhdem5
  wad7 =~ 1*tadhdem7
  wad10 =~ 1*tadhdem10 
  wad12 =~ 1*tadhdem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Estimate the lagged effects between the within-person centered variables
  wad7 + wsi7 ~ wad5 + wsi5
  wad10 + wsi10 ~ wad7 + wsi7
  wad12 + wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadm.fit <- lavaan(RICLPMadm,               # model
                     data = dat,           # data
                     missing = 'ML',       # how to handle missing data 
                     meanstructure = TRUE, # adds intercepts/means to the model for both observed and latent variables
                     se = "robust",        # robust standard errors
                     int.ov.free = TRUE,   # if FALSE, the intercepts of the observed variables are fixed to zero
                     estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
)

RICLPMadm.fit.summary <- summary(RICLPMadm.fit, 
                              fit.measures = TRUE,
                              standardized = TRUE)

lavaan 0.6-10 ended normally after 97 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35

Number of observations 2232 Number of missing patterns 12

Model Test User Model: Standard Robust Test Statistic 61.152 41.052 Degrees of freedom 9 9 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.490 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 6380.859 3452.175 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.848

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.992 0.991 Tucker-Lewis Index (TLI) 0.974 0.971

Robust Comparative Fit Index (CFI) 0.992 Robust Tucker-Lewis Index (TLI) 0.977

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -34560.530 -34560.530 Scaling correction factor 2.267 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.108 for the MLR correction

Akaike (AIC) 69191.061 69191.061 Bayesian (BIC) 69390.934 69390.934 Sample-size adjusted Bayesian (BIC) 69279.733 69279.733

Root Mean Square Error of Approximation:

RMSEA 0.051 0.040 90 Percent confidence interval - lower 0.039 0.030 90 Percent confidence interval - upper 0.063 0.050 P-value RMSEA <= 0.05 0.423 0.944

Robust RMSEA 0.049 90 Percent confidence interval - lower 0.034 90 Percent confidence interval - upper 0.064

Standardized Root Mean Square Residual:

SRMR 0.028 0.028

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
tadhdem5 1.000 2.565 0.637 tadhdem7 1.000 2.565 0.706 tadhdem10 1.000 2.565 0.751 tadhdem12 1.000 2.565 0.750 RIsi =~
sisoe5 1.000 0.684 0.597 sisoe7 1.000 0.684 0.584 sisoe10 1.000 0.684 0.528 sisoe12 1.000 0.684 0.504 wad5 =~
tadhdem5 1.000 3.106 0.771 wad7 =~
tadhdem7 1.000 2.574 0.708 wad10 =~
tadhdem10 1.000 2.258 0.661 wad12 =~
tadhdem12 1.000 2.260 0.661 wsi5 =~
sisoe5 1.000 0.919 0.802 wsi7 =~
sisoe7 1.000 0.950 0.811 wsi10 =~
sisoe10 1.000 1.099 0.849 wsi12 =~
sisoe12 1.000 1.172 0.864

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.229 0.037 6.256 0.000 0.276 0.276 wsi5 0.257 0.110 2.335 0.020 0.092 0.092 wsi7 ~
wad5 0.021 0.012 1.783 0.075 0.070 0.070 wsi5 0.218 0.061 3.573 0.000 0.210 0.210 wad10 ~
wad7 0.015 0.063 0.244 0.807 0.018 0.018 wsi7 0.318 0.140 2.278 0.023 0.134 0.134 wsi10 ~
wad7 0.040 0.017 2.393 0.017 0.095 0.095 wsi7 0.283 0.058 4.865 0.000 0.244 0.244 wad12 ~
wad10 0.303 0.067 4.536 0.000 0.303 0.303 wsi10 0.130 0.087 1.494 0.135 0.063 0.063 wsi12 ~
wad10 0.028 0.023 1.252 0.211 0.055 0.055 wsi10 0.427 0.042 10.299 0.000 0.401 0.401

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.550 0.124 4.420 0.000 0.193 0.193 .wad7 ~~
.wsi7 0.329 0.105 3.134 0.002 0.145 0.145 .wad10 ~~
.wsi10 0.605 0.121 5.009 0.000 0.256 0.256 .wad12 ~~
.wsi12 0.430 0.091 4.729 0.000 0.189 0.189 RIad ~~
RIsi 0.834 0.105 7.920 0.000 0.475 0.475

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .tadhdem5 3.368 0.084 40.095 0.000 3.368 0.836 .tadhdem7 2.626 0.079 33.389 0.000 2.626 0.723 .tadhdem10 2.193 0.073 29.922 0.000 2.193 0.642 .tadhdem12 2.032 0.073 27.731 0.000 2.032 0.594 .sisoe5 0.813 0.024 33.882 0.000 0.813 0.710 .sisoe7 0.832 0.025 33.068 0.000 0.832 0.710 .sisoe10 0.940 0.028 33.701 0.000 0.940 0.726 .sisoe12 0.941 0.029 31.939 0.000 0.941 0.693 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 6.579 0.484 13.596 0.000 1.000 1.000 RIsi 0.468 0.057 8.265 0.000 1.000 1.000 wad5 9.646 0.510 18.912 0.000 1.000 1.000 wsi5 0.844 0.098 8.590 0.000 1.000 1.000 .wad7 6.001 0.410 14.621 0.000 0.906 0.906 .wsi7 0.853 0.074 11.545 0.000 0.945 0.945 .wad10 5.002 0.513 9.746 0.000 0.981 0.981 .wsi10 1.115 0.081 13.836 0.000 0.923 0.923 .wad12 4.564 0.306 14.935 0.000 0.893 0.893 .wsi12 1.133 0.082 13.893 0.000 0.824 0.824 .tadhdem5 0.000 0.000 0.000 .tadhdem7 0.000 0.000 0.000 .tadhdem10 0.000 0.000 0.000 .tadhdem12 0.000 0.000 0.000 .sisoe5 0.000 0.000 0.000 .sisoe7 0.000 0.000 0.000 .sisoe10 0.000 0.000 0.000 .sisoe12 0.000 0.000 0.000

#Table of model fit 
RICLPMadm.fit.summary.fit <- table.model.fit(RICLPMadm.fit.summary)
#Table of regression coefficients and covariances (concurrent associations)
RICLPMadm.fit.summary.reg <- table.model.coef(model = RICLPMadm.fit.summary, type = "RICLPM", constraints = "No")

Constraining all lag and crosslag parameters at once (RICLPMadm2)

RICLPMadm2 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhdem5 + 1*tadhdem7 + 1*tadhdem10 + 1*tadhdem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhdem5
  wad7 =~ 1*tadhdem7
  wad10 =~ 1*tadhdem10 
  wad12 =~ 1*tadhdem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  
  # Constrainemd lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + d*wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ a*wad7 + d*wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ a*wad10 + d*wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadm2.fit <- lavaan(RICLPMadm2, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMadm.fit, RICLPMadm2.fit, method = "satorra.bentler.2010")

RICLPMadm2 is significantly worse fit compared to RICLPMadm according to the Chi square test.

Constraining lag in ADHD parameter (RICLPMadm2a)

Now we will test the constraints based on the following steps recommended by Curran and Bauer: 1. Estimate the baseline model where all parameters are freely estimated (The basic RI-CLPM) 2. Impose equlaity constraints on one set of stabilities (within variable lags). Use LRT tests to see if he fit becomes significantly worse. 3. Impose equality constraints on the next set of stabilities. Compare this to wither model 1 (baseline/basic) if step 2 was significant. Compare to model 2 if step 2 was non-significant. Non-sig LRT = not significantly worse fit 4. Repeat for first set of cross-lags 5. Repeat for second set of cross-lags

RICLPMadm2a <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhdem5 + 1*tadhdem7 + 1*tadhdem10 + 1*tadhdem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhdem5
  wad7 =~ 1*tadhdem7
  wad10 =~ 1*tadhdem10 
  wad12 =~ 1*tadhdem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  
  wad10 ~ a*wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  
  wad12 ~ a*wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadm2a.fit <- lavaan(RICLPMadm2a, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMadm.fit, RICLPMadm2a.fit, method = "satorra.bentler.2010")

Constraining lag in social isolation parameter (RICLPMadm2b)

RICLPMadm2b <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhdem5 + 1*tadhdem7 + 1*tadhdem10 + 1*tadhdem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhdem5
  wad7 =~ 1*tadhdem7
  wad10 =~ 1*tadhdem10 
  wad12 =~ 1*tadhdem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + b*wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + b*wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadm2b.fit <- lavaan(RICLPMadm2b, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMadm.fit, RICLPMadm2b.fit, method = "satorra.bentler.2010")

RICLPMadm2b is significantly worse fit compared to RICLPMadm. Now we will constrain the other set of stability coefficients: cross lag ad->si (c)

Constraining cross lag in ADHD to social isolation parameter (RICLPMadm2c)

RICLPMadm2c <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhdem5 + 1*tadhdem7 + 1*tadhdem10 + 1*tadhdem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhdem5
  wad7 =~ 1*tadhdem7
  wad10 =~ 1*tadhdem10 
  wad12 =~ 1*tadhdem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ c*wad5 + wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ c*wad7 + wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ c*wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadm2c.fit <- lavaan(RICLPMadm2c, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMadm.fit, RICLPMadm2c.fit, method = "satorra.bentler.2010")

RICLPMadm2c is NOT significantly worse fit compared to RICLPMadm (p = 0.6336). Now we will constrain the other set of stability coefficients: cross lag si->ad (d) but comparing that model to this one.

Constraining cross lag in social isolation to ADHD parameter (RICLPMadm2d) - compared to RICLPMadm2c

Thus, constraining both sets of lags are tested in this model.

RICLPMadm2d <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhdem5 + 1*tadhdem7 + 1*tadhdem10 + 1*tadhdem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhdem5
  wad7 =~ 1*tadhdem7
  wad10 =~ 1*tadhdem10 
  wad12 =~ 1*tadhdem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + d*wsi5 
  wsi7 ~ c*wad5 + wsi5
  
  wad10 ~ wad7 + d*wsi7
  wsi10 ~ c*wad7 + wsi7
  
  wad12 ~ wad10 + d*wsi10
  wsi12 ~ c*wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadm2d.fit <- lavaan(RICLPMadm2d, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 

RICLPMadm2d.fit.summary <- summary(RICLPMadm2d.fit, 
                                fit.measures = TRUE,
                                standardized = TRUE)

lavaan 0.6-10 ended normally after 92 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35 Number of equality constraints 4

Number of observations 2232 Number of missing patterns 12

Model Test User Model: Standard Robust Test Statistic 68.628 42.312 Degrees of freedom 13 13 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.622 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 6380.859 3452.175 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.848

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.991 0.991 Tucker-Lewis Index (TLI) 0.981 0.982

Robust Comparative Fit Index (CFI) 0.992 Robust Tucker-Lewis Index (TLI) 0.984

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -34564.268 -34564.268 Scaling correction factor 2.048 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.108 for the MLR correction

Akaike (AIC) 69190.537 69190.537 Bayesian (BIC) 69367.567 69367.567 Sample-size adjusted Bayesian (BIC) 69269.075 69269.075

Root Mean Square Error of Approximation:

RMSEA 0.044 0.032 90 Percent confidence interval - lower 0.034 0.024 90 Percent confidence interval - upper 0.054 0.040 P-value RMSEA <= 0.05 0.829 1.000

Robust RMSEA 0.040 90 Percent confidence interval - lower 0.027 90 Percent confidence interval - upper 0.054

Standardized Root Mean Square Residual:

SRMR 0.030 0.030

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
tadhdem5 1.000 2.585 0.640 tadhdem7 1.000 2.585 0.711 tadhdem10 1.000 2.585 0.760 tadhdem12 1.000 2.585 0.754 RIsi =~
sisoe5 1.000 0.697 0.606 sisoe7 1.000 0.697 0.596 sisoe10 1.000 0.697 0.540 sisoe12 1.000 0.697 0.513 wad5 =~
tadhdem5 1.000 3.103 0.768 wad7 =~
tadhdem7 1.000 2.554 0.703 wad10 =~
tadhdem10 1.000 2.214 0.650 wad12 =~
tadhdem12 1.000 2.250 0.657 wsi5 =~
sisoe5 1.000 0.914 0.795 wsi7 =~
sisoe7 1.000 0.940 0.803 wsi10 =~
sisoe10 1.000 1.087 0.842 wsi12 =~
sisoe12 1.000 1.167 0.859

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.229 0.036 6.295 0.000 0.279 0.279 wsi5 (d) 0.177 0.071 2.498 0.012 0.063 0.063 wsi7 ~
wad5 (c) 0.023 0.010 2.255 0.024 0.075 0.075 wsi5 0.200 0.058 3.457 0.001 0.195 0.195 wad10 ~
wad7 0.001 0.063 0.014 0.988 0.001 0.001 wsi7 (d) 0.177 0.071 2.498 0.012 0.075 0.075 wsi10 ~
wad7 (c) 0.023 0.010 2.255 0.024 0.053 0.053 wsi7 0.270 0.054 4.981 0.000 0.233 0.233 wad12 ~
wad10 0.286 0.064 4.444 0.000 0.281 0.281 wsi10 (d) 0.177 0.071 2.498 0.012 0.085 0.085 wsi12 ~
wad10 (c) 0.023 0.010 2.255 0.024 0.043 0.043 wsi10 0.429 0.041 10.416 0.000 0.400 0.400

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.530 0.118 4.504 0.000 0.187 0.187 .wad7 ~~
.wsi7 0.268 0.102 2.638 0.008 0.120 0.120 .wad10 ~~
.wsi10 0.556 0.108 5.126 0.000 0.239 0.239 .wad12 ~~
.wsi12 0.432 0.087 4.991 0.000 0.190 0.190 RIad ~~
RIsi 0.891 0.100 8.887 0.000 0.495 0.495

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .tadhdem5 3.368 0.084 40.096 0.000 3.368 0.834 .tadhdem7 2.626 0.079 33.388 0.000 2.626 0.722 .tadhdem10 2.193 0.073 29.929 0.000 2.193 0.644 .tadhdem12 2.032 0.073 27.728 0.000 2.032 0.593 .sisoe5 0.813 0.024 33.882 0.000 0.813 0.708 .sisoe7 0.831 0.025 33.082 0.000 0.831 0.711 .sisoe10 0.940 0.028 33.688 0.000 0.940 0.728 .sisoe12 0.941 0.029 31.927 0.000 0.941 0.692 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 6.684 0.466 14.327 0.000 1.000 1.000 RIsi 0.485 0.056 8.694 0.000 1.000 1.000 wad5 9.627 0.505 19.081 0.000 1.000 1.000 wsi5 0.835 0.097 8.574 0.000 1.000 1.000 .wad7 5.946 0.411 14.456 0.000 0.912 0.912 .wsi7 0.840 0.071 11.823 0.000 0.951 0.951 .wad10 4.872 0.508 9.581 0.000 0.994 0.994 .wsi10 1.109 0.080 13.853 0.000 0.939 0.939 .wad12 4.566 0.307 14.850 0.000 0.902 0.902 .wsi12 1.130 0.081 13.892 0.000 0.830 0.830 .tadhdem5 0.000 0.000 0.000 .tadhdem7 0.000 0.000 0.000 .tadhdem10 0.000 0.000 0.000 .tadhdem12 0.000 0.000 0.000 .sisoe5 0.000 0.000 0.000 .sisoe7 0.000 0.000 0.000 .sisoe10 0.000 0.000 0.000 .sisoe12 0.000 0.000 0.000

#Table of model fit 
RICLPMadm2d.fit.summary.fit <- table.model.fit(RICLPMadm2d.fit.summary)
RICLPMadm2d.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
RICLPMadm2d.fit.summary.reg <- table.model.coef(model = RICLPMadm2d.fit.summary, type = "RICLPM", constraints = "Yes")
RICLPMadm2d.fit.summary.reg %>% select(lhs, op, rhs, pvalue, std.all) %>% mutate_if(is.numeric, round, 3)
lavTestLRT(RICLPMadm2c.fit, RICLPMadm2d.fit, method = "satorra.bentler.2010") #comparing to other best fitting model

RICLPMadm2d is NOT significantly worse fit compared to RICLPMadm2c (p = 0.2709).

The best fitting model (mother report and total ADHD symptoms) is currently RICLPMadm2d where cross-lags are constrained to be equal across time.


Constrainemd grand means (RICLPMadm3)

The grand means are the means over all units per occasion. These grand means may be time-varying, or may be fixed to be invariant over time.

RICLPMadm3 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhdem5 + 1*tadhdem7 + 1*tadhdem10 + 1*tadhdem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhdem5
  wad7 =~ 1*tadhdem7
  wad10 =~ 1*tadhdem10 
  wad12 =~ 1*tadhdem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrainemd lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
  
  # Constrain the grand means over time
  tadhdem5 + tadhdem7 + tadhdem10 + tadhdem12 ~ mad*1
  sisoe5 + sisoe7 + sisoe10 + sisoe12 ~ msi*1
'
RICLPMadm3.fit <- lavaan(RICLPMadm3, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMadm.fit, RICLPMadm3.fit, method = "satorra.bentler.2010") 

If the grand means cannot be constrained to be invariant over time, this implies that on average there is some change in this variable over time, which may reflect some occasion-specific effect, or a developmental trend. By allowing the means to freely vary over time, we account for such average changes over time.

This makes sense as we have shown variation in social isolation over time and other literature has shown variation in ADHD over time.


RI-CLPM: Isolation is combined mother and teacher report, Hyperactive/Impulsive ADHD is mother report only

The basic RI-CLPM model (RICLPMadm_hyp)

The code for specifying the basic RI-CLPM is given below.

RICLPMadm_hyp <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hyem5 + 1*hyem7 + 1*hyem10 + 1*hyem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*hyem5
  wad7 =~ 1*hyem7
  wad10 =~ 1*hyem10 
  wad12 =~ 1*hyem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Estimate the lagged effects between the within-person centered variables
  wad7 + wsi7 ~ wad5 + wsi5
  wad10 + wsi10 ~ wad7 + wsi7
  wad12 + wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadm_hyp.fit <- lavaan(RICLPMadm_hyp,       # model
                     data = dat,           # data
                     missing = 'ML',       # how to handle missing data 
                     meanstructure = TRUE, # adds intercepts/means to the model for both observed and latent variables
                     se = "robust",        # robust standard errors
                     int.ov.free = TRUE,   # if FALSE, the intercepts of the observed variables are fixed to zero
                     estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
)

RICLPMadm_hyp.fit.summary <- summary(RICLPMadm_hyp.fit, 
                                  fit.measures = TRUE,
                                  standardized = TRUE)

lavaan 0.6-10 ended normally after 81 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35

Number of observations 2232 Number of missing patterns 12

Model Test User Model: Standard Robust Test Statistic 41.630 29.530 Degrees of freedom 9 9 P-value (Chi-square) 0.000 0.001 Scaling correction factor 1.410 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 5943.680 3467.312 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.714

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.994 0.994 Tucker-Lewis Index (TLI) 0.983 0.981

Robust Comparative Fit Index (CFI) 0.995 Robust Tucker-Lewis Index (TLI) 0.985

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -30257.922 -30257.922 Scaling correction factor 2.111 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 1.968 for the MLR correction

Akaike (AIC) 60585.844 60585.844 Bayesian (BIC) 60785.717 60785.717 Sample-size adjusted Bayesian (BIC) 60674.517 60674.517

Root Mean Square Error of Approximation:

RMSEA 0.040 0.032 90 Percent confidence interval - lower 0.028 0.021 90 Percent confidence interval - upper 0.053 0.043 P-value RMSEA <= 0.05 0.890 0.997

Robust RMSEA 0.038 90 Percent confidence interval - lower 0.023 90 Percent confidence interval - upper 0.054

Standardized Root Mean Square Residual:

SRMR 0.023 0.023

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
hyem5 1.000 1.481 0.608 hyem7 1.000 1.481 0.667 hyem10 1.000 1.481 0.741 hyem12 1.000 1.481 0.751 RIsi =~
sisoe5 1.000 0.692 0.606 sisoe7 1.000 0.692 0.592 sisoe10 1.000 0.692 0.534 sisoe12 1.000 0.692 0.508 wad5 =~
hyem5 1.000 1.933 0.794 wad7 =~
hyem7 1.000 1.652 0.745 wad10 =~
hyem10 1.000 1.342 0.672 wad12 =~
hyem12 1.000 1.301 0.660 wsi5 =~
sisoe5 1.000 0.910 0.796 wsi7 =~
sisoe7 1.000 0.942 0.806 wsi10 =~
sisoe10 1.000 1.096 0.845 wsi12 =~
sisoe12 1.000 1.175 0.862

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.268 0.031 8.617 0.000 0.314 0.314 wsi5 0.126 0.066 1.925 0.054 0.070 0.070 wsi7 ~
wad5 0.031 0.017 1.819 0.069 0.064 0.064 wsi5 0.208 0.062 3.369 0.001 0.201 0.201 wad10 ~
wad7 0.063 0.048 1.300 0.194 0.077 0.077 wsi7 0.193 0.074 2.586 0.010 0.135 0.135 wsi10 ~
wad7 0.053 0.023 2.350 0.019 0.081 0.081 wsi7 0.282 0.059 4.809 0.000 0.243 0.243 wad12 ~
wad10 0.246 0.062 3.938 0.000 0.253 0.253 wsi10 0.071 0.049 1.437 0.151 0.060 0.060 wsi12 ~
wad10 0.067 0.035 1.942 0.052 0.077 0.077 wsi10 0.424 0.040 10.478 0.000 0.396 0.396

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.249 0.064 3.866 0.000 0.141 0.141 .wad7 ~~
.wsi7 0.153 0.058 2.609 0.009 0.106 0.106 .wad10 ~~
.wsi10 0.322 0.066 4.876 0.000 0.230 0.230 .wad12 ~~
.wsi12 0.215 0.053 4.065 0.000 0.161 0.161 RIad ~~
RIsi 0.404 0.056 7.241 0.000 0.394 0.394

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .hyem5 2.160 0.051 42.247 0.000 2.160 0.887 .hyem7 1.681 0.048 35.123 0.000 1.681 0.758 .hyem10 1.228 0.043 28.616 0.000 1.228 0.615 .hyem12 1.104 0.042 26.133 0.000 1.104 0.560 .sisoe5 0.813 0.024 33.882 0.000 0.813 0.711 .sisoe7 0.832 0.025 33.061 0.000 0.832 0.711 .sisoe10 0.939 0.028 33.695 0.000 0.939 0.725 .sisoe12 0.941 0.029 31.954 0.000 0.941 0.690 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 2.193 0.145 15.171 0.000 1.000 1.000 RIsi 0.479 0.056 8.482 0.000 1.000 1.000 wad5 3.735 0.169 22.105 0.000 1.000 1.000 wsi5 0.828 0.097 8.527 0.000 1.000 1.000 .wad7 2.431 0.134 18.161 0.000 0.891 0.891 .wsi7 0.845 0.074 11.392 0.000 0.952 0.952 .wad10 1.752 0.155 11.321 0.000 0.973 0.973 .wsi10 1.115 0.081 13.744 0.000 0.929 0.929 .wad12 1.566 0.104 14.986 0.000 0.924 0.924 .wsi12 1.134 0.081 14.007 0.000 0.822 0.822 .hyem5 0.000 0.000 0.000 .hyem7 0.000 0.000 0.000 .hyem10 0.000 0.000 0.000 .hyem12 0.000 0.000 0.000 .sisoe5 0.000 0.000 0.000 .sisoe7 0.000 0.000 0.000 .sisoe10 0.000 0.000 0.000 .sisoe12 0.000 0.000 0.000

#Table of model fit 
RICLPMadm_hyp.fit.summary.fit <- table.model.fit(RICLPMadm_hyp.fit.summary)
#Table of regression coefficients and covariances (concurrent associations)
RICLPMadm_hyp.fit.summary.reg <- table.model.coef(model = RICLPMadm_hyp.fit.summary, type = "RICLPM", constraints = "No")

RI-CLPM Constraints over time

Fixed autoregressive and cross-lagged relations over time (RICLPMadm_hyp2)

a = lag in ad b = lag in si c = cross lag ad->si d = cross lag si->ad

Constraining all lag and crosslag parameters at once (RICLPMadm2)

RICLPMadm_hyp2 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hyem5 + 1*hyem7 + 1*hyem10 + 1*hyem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*hyem5
  wad7 =~ 1*hyem7
  wad10 =~ 1*hyem10 
  wad12 =~ 1*hyem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  
  # Constrainemd lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + d*wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ a*wad7 + d*wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ a*wad10 + d*wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadm_hyp2.fit <- lavaan(RICLPMadm_hyp2, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMadm_hyp.fit, RICLPMadm_hyp2.fit, method = "satorra.bentler.2010")

RICLPMadm_hyp2 is significantly worse fit compared to RICLPMadm_hyp.

Constraining lag in ADHD parameter (RICLPMadm_hyp2a)

Now we will test the constraints based on the following steps recommended by Curran and Bauer: 1. Estimate the baseline model where all parameters are freely estimated (The basic RI-CLPM) 2. Impose equlaity constraints on one set of stabilities (within variable lags). Use LRT tests to see if he fit becomes significantly worse. 3. Impose equality constraints on the next set of stabilities. Compare this to wither model 1 (baseline/basic) if step 2 was significant. Compare to model 2 if step 2 was non-significant. Non-sig LRT = not significantly worse fit 4. Repeat for first set of cross-lags 5. Repeat for second set of cross-lags

RICLPMadm_hyp2a <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hyem5 + 1*hyem7 + 1*hyem10 + 1*hyem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*hyem5
  wad7 =~ 1*hyem7
  wad10 =~ 1*hyem10 
  wad12 =~ 1*hyem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  
  wad10 ~ a*wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  
  wad12 ~ a*wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadm_hyp2a.fit <- lavaan(RICLPMadm_hyp2a, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMadm_hyp.fit, RICLPMadm_hyp2a.fit, method = "satorra.bentler.2010")

Constraining lag in social isolation parameter (RICLPMadm_hyp2b)

RICLPMadm_hyp2b <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hyem5 + 1*hyem7 + 1*hyem10 + 1*hyem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*hyem5
  wad7 =~ 1*hyem7
  wad10 =~ 1*hyem10 
  wad12 =~ 1*hyem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + b*wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + b*wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadm_hyp2b.fit <- lavaan(RICLPMadm_hyp2b, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMadm_hyp.fit, RICLPMadm_hyp2b.fit, method = "satorra.bentler.2010")

RICLPMadm_hyp2b is significantly worse fit compared to RICLPMadm_hyp. Now we will constrain the other set of stability coefficients: cross lag ad->si (c)

Constraining cross lag in ADHD to social isolation parameter (RICLPMadm_hyp2c)

RICLPMadm_hyp2c <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hyem5 + 1*hyem7 + 1*hyem10 + 1*hyem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*hyem5
  wad7 =~ 1*hyem7
  wad10 =~ 1*hyem10 
  wad12 =~ 1*hyem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ c*wad5 + wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ c*wad7 + wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ c*wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadm_hyp2c.fit <- lavaan(RICLPMadm_hyp2c, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMadm_hyp.fit, RICLPMadm_hyp2c.fit, method = "satorra.bentler.2010")

RICLPMadm_hyp2c is NOT significantly worse fit compared to RICLPMadm_hyp (p = 0.4853). Now we will constrain the other set of stability coefficients: cross lag si->ad (d) but comparing that model to this one.

Constraining cross lag in social isolation to ADHD parameter (RICLPMadm_hyp2d) - compared to RICLPMadm_hyp2c

Thus, constraining both sets of lags are tested in this model.

RICLPMadm_hyp2d <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hyem5 + 1*hyem7 + 1*hyem10 + 1*hyem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*hyem5
  wad7 =~ 1*hyem7
  wad10 =~ 1*hyem10 
  wad12 =~ 1*hyem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + d*wsi5 
  wsi7 ~ c*wad5 + wsi5
  
  wad10 ~ wad7 + d*wsi7
  wsi10 ~ c*wad7 + wsi7
  
  wad12 ~ wad10 + d*wsi10
  wsi12 ~ c*wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadm_hyp2d.fit <- lavaan(RICLPMadm_hyp2d, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 

RICLPMadm_hyp2d.fit.summary <- summary(RICLPMadm_hyp2d.fit, 
                                fit.measures = TRUE,
                                standardized = TRUE)

lavaan 0.6-10 ended normally after 72 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35 Number of equality constraints 4

Number of observations 2232 Number of missing patterns 12

Model Test User Model: Standard Robust Test Statistic 49.603 33.856 Degrees of freedom 13 13 P-value (Chi-square) 0.000 0.001 Scaling correction factor 1.465 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 5943.680 3467.312 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.714

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.994 0.994 Tucker-Lewis Index (TLI) 0.987 0.987

Robust Comparative Fit Index (CFI) 0.995 Robust Tucker-Lewis Index (TLI) 0.989

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -30261.909 -30261.909 Scaling correction factor 1.930 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 1.968 for the MLR correction

Akaike (AIC) 60585.817 60585.817 Bayesian (BIC) 60762.848 60762.848 Sample-size adjusted Bayesian (BIC) 60664.356 60664.356

Root Mean Square Error of Approximation:

RMSEA 0.036 0.027 90 Percent confidence interval - lower 0.025 0.018 90 Percent confidence interval - upper 0.046 0.036 P-value RMSEA <= 0.05 0.988 1.000

Robust RMSEA 0.032 90 Percent confidence interval - lower 0.019 90 Percent confidence interval - upper 0.046

Standardized Root Mean Square Residual:

SRMR 0.026 0.026

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
hyem5 1.000 1.496 0.612 hyem7 1.000 1.496 0.673 hyem10 1.000 1.496 0.752 hyem12 1.000 1.496 0.758 RIsi =~
sisoe5 1.000 0.698 0.609 sisoe7 1.000 0.698 0.597 sisoe10 1.000 0.698 0.540 sisoe12 1.000 0.698 0.512 wad5 =~
hyem5 1.000 1.933 0.791 wad7 =~
hyem7 1.000 1.644 0.740 wad10 =~
hyem10 1.000 1.312 0.659 wad12 =~
hyem12 1.000 1.289 0.653 wsi5 =~
sisoe5 1.000 0.909 0.793 wsi7 =~
sisoe7 1.000 0.938 0.802 wsi10 =~
sisoe10 1.000 1.088 0.842 wsi12 =~
sisoe12 1.000 1.170 0.859

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.267 0.031 8.661 0.000 0.314 0.314 wsi5 (d) 0.105 0.042 2.496 0.013 0.058 0.058 wsi7 ~
wad5 (c) 0.037 0.015 2.530 0.011 0.076 0.076 wsi5 0.199 0.060 3.320 0.001 0.192 0.192 wad10 ~
wad7 0.050 0.049 1.032 0.302 0.063 0.063 wsi7 (d) 0.105 0.042 2.496 0.013 0.075 0.075 wsi10 ~
wad7 (c) 0.037 0.015 2.530 0.011 0.056 0.056 wsi7 0.272 0.055 4.907 0.000 0.235 0.235 wad12 ~
wad10 0.217 0.063 3.465 0.001 0.221 0.221 wsi10 (d) 0.105 0.042 2.496 0.013 0.088 0.088 wsi12 ~
wad10 (c) 0.037 0.015 2.530 0.011 0.042 0.042 wsi10 0.433 0.041 10.463 0.000 0.403 0.403

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.250 0.060 4.151 0.000 0.142 0.142 .wad7 ~~
.wsi7 0.127 0.058 2.203 0.028 0.089 0.089 .wad10 ~~
.wsi10 0.301 0.063 4.775 0.000 0.219 0.219 .wad12 ~~
.wsi12 0.205 0.050 4.079 0.000 0.154 0.154 RIad ~~
RIsi 0.430 0.054 7.943 0.000 0.412 0.412

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .hyem5 2.160 0.051 42.248 0.000 2.160 0.884 .hyem7 1.681 0.048 35.121 0.000 1.681 0.756 .hyem10 1.228 0.043 28.622 0.000 1.228 0.617 .hyem12 1.104 0.042 26.130 0.000 1.104 0.559 .sisoe5 0.813 0.024 33.882 0.000 0.813 0.710 .sisoe7 0.831 0.025 33.078 0.000 0.831 0.711 .sisoe10 0.940 0.028 33.688 0.000 0.940 0.727 .sisoe12 0.941 0.029 31.940 0.000 0.941 0.691 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 2.238 0.142 15.779 0.000 1.000 1.000 RIsi 0.487 0.056 8.694 0.000 1.000 1.000 wad5 3.735 0.167 22.345 0.000 1.000 1.000 wsi5 0.825 0.097 8.512 0.000 1.000 1.000 .wad7 2.413 0.133 18.101 0.000 0.893 0.893 .wsi7 0.838 0.073 11.546 0.000 0.953 0.953 .wad10 1.703 0.156 10.917 0.000 0.989 0.989 .wsi10 1.112 0.081 13.778 0.000 0.939 0.939 .wad12 1.552 0.106 14.700 0.000 0.934 0.934 .wsi12 1.134 0.081 13.942 0.000 0.828 0.828 .hyem5 0.000 0.000 0.000 .hyem7 0.000 0.000 0.000 .hyem10 0.000 0.000 0.000 .hyem12 0.000 0.000 0.000 .sisoe5 0.000 0.000 0.000 .sisoe7 0.000 0.000 0.000 .sisoe10 0.000 0.000 0.000 .sisoe12 0.000 0.000 0.000

#Table of model fit 
RICLPMadm_hyp2d.fit.summary.fit <- table.model.fit(RICLPMadm_hyp2d.fit.summary)
RICLPMadm_hyp2d.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
RICLPMadm_hyp2d.fit.summary.reg <- table.model.coef(model = RICLPMadm_hyp2d.fit.summary, type = "RICLPM", constraints = "Yes")
RICLPMadm_hyp2d.fit.summary.reg %>% select(lhs, op, rhs, pvalue, std.all) %>% mutate_if(is.numeric, round, 3)
lavTestLRT(RICLPMadm_hyp2c.fit, RICLPMadm_hyp2d.fit, method = "satorra.bentler.2010") #comparing to other best fitting model

RICLPMadm_hyp2d is NOT significantly worse fit compared to RICLPMadm_hyp2c (0.2131).

The best fitting model (mother report and total ADHD symptoms) is currently RICLPMadm_hyp2d where cross-lags are constrained to be equal across time.

Constrainemd grand means (RICLPMadm_hyp3)

The grand means are the means over all units per occasion. These grand means may be time-varying, or may be fixed to be invariant over time.

RICLPMadm_hyp3 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hyem5 + 1*hyem7 + 1*hyem10 + 1*hyem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*hyem5
  wad7 =~ 1*hyem7
  wad10 =~ 1*hyem10 
  wad12 =~ 1*hyem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrainemd lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
  
  # Constrain the grand means over time
  hyem5 + hyem7 + hyem10 + hyem12 ~ mad*1
  sisoe5 + sisoe7 + sisoe10 + sisoe12 ~ msi*1
'
RICLPMadm_hyp3.fit <- lavaan(RICLPMadm_hyp3, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMadm_hyp.fit, RICLPMadm_hyp3.fit, method = "satorra.bentler.2010") 

If the grand means cannot be constrainemd to be invariant over time, this implies that on average there is some change in this variable over time, which may reflect some occasion-specific effect, or a developmental trend. By allowing the means to freely vary over time, we account for such average changes over time.

This makes sense as we have shown variation in social isolation over time and other literature has shown variation in ADHD over time.


RI-CLPM: Isolation is combined mother and teacher report, Inattention ADHD is mother report only

The basic RI-CLPM model (RICLPMadm_inat)

The code for specifying the basic RI-CLPM is given below.

RICLPMadm_inat <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*inem5 + 1*inem7 + 1*inem10 + 1*inem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*inem5
  wad7 =~ 1*inem7
  wad10 =~ 1*inem10 
  wad12 =~ 1*inem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Estimate the lagged effects between the within-person centered variables
  wad7 + wsi7 ~ wad5 + wsi5
  wad10 + wsi10 ~ wad7 + wsi7
  wad12 + wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadm_inat.fit <- lavaan(RICLPMadm_inat,     # model
                     data = dat,           # data
                     missing = 'ML',       # how to handle missing data 
                     meanstructure = TRUE, # adds intercepts/means to the model for both observed and latent variables
                     se = "robust",        # robust standard errors
                     int.ov.free = TRUE,   # if FALSE, the intercepts of the observed variables are fixed to zero
                     estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
)

RICLPMadm_inat.fit.summary <- summary(RICLPMadm_inat.fit, 
                                    fit.measures = TRUE,
                                    standardized = TRUE)

lavaan 0.6-10 ended normally after 72 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35

Number of observations 2232 Number of missing patterns 12

Model Test User Model: Standard Robust Test Statistic 63.704 39.499 Degrees of freedom 9 9 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.613 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 5599.312 2890.544 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.937

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.990 0.989 Tucker-Lewis Index (TLI) 0.969 0.967

Robust Comparative Fit Index (CFI) 0.991 Robust Tucker-Lewis Index (TLI) 0.972

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -29082.509 -29082.509 Scaling correction factor 2.396 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.236 for the MLR correction

Akaike (AIC) 58235.018 58235.018 Bayesian (BIC) 58434.891 58434.891 Sample-size adjusted Bayesian (BIC) 58323.691 58323.691

Root Mean Square Error of Approximation:

RMSEA 0.052 0.039 90 Percent confidence interval - lower 0.041 0.029 90 Percent confidence interval - upper 0.065 0.049 P-value RMSEA <= 0.05 0.359 0.965

Robust RMSEA 0.049 90 Percent confidence interval - lower 0.034 90 Percent confidence interval - upper 0.066

Standardized Root Mean Square Residual:

SRMR 0.028 0.028

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
inem5 1.000 1.232 0.620 inem7 1.000 1.232 0.687 inem10 1.000 1.232 0.689 inem12 1.000 1.232 0.679 RIsi =~
sisoe5 1.000 0.687 0.600 sisoe7 1.000 0.687 0.587 sisoe10 1.000 0.687 0.531 sisoe12 1.000 0.687 0.507 wad5 =~
inem5 1.000 1.558 0.784 wad7 =~
inem7 1.000 1.304 0.727 wad10 =~
inem10 1.000 1.295 0.725 wad12 =~
inem12 1.000 1.330 0.734 wsi5 =~
sisoe5 1.000 0.917 0.800 wsi7 =~
sisoe7 1.000 0.949 0.810 wsi10 =~
sisoe10 1.000 1.098 0.848 wsi12 =~
sisoe12 1.000 1.169 0.862

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.149 0.042 3.521 0.000 0.178 0.178 wsi5 0.131 0.059 2.219 0.026 0.092 0.092 wsi7 ~
wad5 0.030 0.026 1.182 0.237 0.050 0.050 wsi5 0.219 0.060 3.632 0.000 0.212 0.212 wad10 ~
wad7 0.011 0.065 0.170 0.865 0.011 0.011 wsi7 0.109 0.076 1.444 0.149 0.080 0.080 wsi10 ~
wad7 0.070 0.035 1.994 0.046 0.084 0.084 wsi7 0.284 0.058 4.890 0.000 0.245 0.245 wad12 ~
wad10 0.337 0.055 6.085 0.000 0.329 0.329 wsi10 0.071 0.046 1.520 0.129 0.058 0.058 wsi12 ~
wad10 0.026 0.036 0.738 0.460 0.029 0.029 wsi10 0.434 0.043 10.171 0.000 0.407 0.407

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.276 0.074 3.736 0.000 0.193 0.193 .wad7 ~~
.wsi7 0.171 0.056 3.048 0.002 0.146 0.146 .wad10 ~~
.wsi10 0.281 0.065 4.333 0.000 0.206 0.206 .wad12 ~~
.wsi12 0.237 0.049 4.851 0.000 0.179 0.179 RIad ~~
RIsi 0.437 0.055 7.889 0.000 0.516 0.516

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .inem5 1.208 0.041 29.147 0.000 1.208 0.608 .inem7 0.944 0.039 24.262 0.000 0.944 0.527 .inem10 0.965 0.038 25.160 0.000 0.965 0.540 .inem12 0.928 0.039 23.952 0.000 0.928 0.512 .sisoe5 0.813 0.024 33.882 0.000 0.813 0.709 .sisoe7 0.832 0.025 33.068 0.000 0.832 0.710 .sisoe10 0.940 0.028 33.706 0.000 0.940 0.726 .sisoe12 0.941 0.029 31.930 0.000 0.941 0.694 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 1.517 0.130 11.663 0.000 1.000 1.000 RIsi 0.472 0.056 8.452 0.000 1.000 1.000 wad5 2.427 0.154 15.762 0.000 1.000 1.000 wsi5 0.841 0.099 8.488 0.000 1.000 1.000 .wad7 1.620 0.129 12.550 0.000 0.953 0.953 .wsi7 0.854 0.074 11.527 0.000 0.949 0.949 .wad10 1.667 0.156 10.681 0.000 0.993 0.993 .wsi10 1.116 0.080 13.858 0.000 0.926 0.926 .wad12 1.557 0.101 15.382 0.000 0.880 0.880 .wsi12 1.132 0.082 13.820 0.000 0.828 0.828 .inem5 0.000 0.000 0.000 .inem7 0.000 0.000 0.000 .inem10 0.000 0.000 0.000 .inem12 0.000 0.000 0.000 .sisoe5 0.000 0.000 0.000 .sisoe7 0.000 0.000 0.000 .sisoe10 0.000 0.000 0.000 .sisoe12 0.000 0.000 0.000

#Table of model fit 
RICLPMadm_inat.fit.summary.fit <- table.model.fit(RICLPMadm_inat.fit.summary)
#Table of regression coefficients and covariances (concurrent associations)
RICLPMadm_inat.fit.summary.reg <- table.model.coef(model = RICLPMadm_inat.fit.summary, type = "RICLPM", constraints = "No")

RI-CLPM Constraints over time

Fixed autoregressive and cross-lagged relations over time (RICLPMadm_inat2)

a = lag in ad b = lag in si c = cross lag ad->si d = cross lag si->ad

Constraining all lag and crosslag parameters at once (RICLPMadm2)

RICLPMadm_inat2 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*inem5 + 1*inem7 + 1*inem10 + 1*inem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*inem5
  wad7 =~ 1*inem7
  wad10 =~ 1*inem10 
  wad12 =~ 1*inem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrainemd lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + d*wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ a*wad7 + d*wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ a*wad10 + d*wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadm_inat2.fit <- lavaan(RICLPMadm_inat2, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMadm_inat.fit, RICLPMadm_inat2.fit, method = "satorra.bentler.2010")

RICLPMadm_inat2 is significantly worse fit compared to RICLPMadm_inat.

Constraining lag in ADHD parameter (RICLPMadm_inat2a)

Now we will test the constraints based on the following steps recommended by Curran and Bauer: 1. Estimate the baseline model where all parameters are freely estimated (The basic RI-CLPM) 2. Impose equlaity constraints on one set of stabilities (within variable lags). Use LRT tests to see if he fit becomes significantly worse. 3. Impose equality constraints on the next set of stabilities. Compare this to wither model 1 (baseline/basic) if step 2 was significant. Compare to model 2 if step 2 was non-significant. Non-sig LRT = not significantly worse fit 4. Repeat for first set of cross-lags 5. Repeat for second set of cross-lags

RICLPMadm_inat2a <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*inem5 + 1*inem7 + 1*inem10 + 1*inem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*inem5
  wad7 =~ 1*inem7
  wad10 =~ 1*inem10 
  wad12 =~ 1*inem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  
  wad10 ~ a*wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  
  wad12 ~ a*wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadm_inat2a.fit <- lavaan(RICLPMadm_inat2a, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMadm_inat.fit, RICLPMadm_inat2a.fit, method = "satorra.bentler.2010")

Constraining lag in social isolation parameter (RICLPMadm_inat2b)

RICLPMadm_inat2b <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*inem5 + 1*inem7 + 1*inem10 + 1*inem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*inem5
  wad7 =~ 1*inem7
  wad10 =~ 1*inem10 
  wad12 =~ 1*inem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + b*wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + b*wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadm_inat2b.fit <- lavaan(RICLPMadm_inat2b, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMadm_inat.fit, RICLPMadm_inat2b.fit, method = "satorra.bentler.2010")

RICLPMadm_inat2b is significantly worse fit compared to RICLPMadm_inat. Now we will constrain the other set of stability coefficients: cross lag ad->si (c)

Constraining cross lag in ADHD to social isolation parameter (RICLPMadm_inat2c)

RICLPMadm_inat2c <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*inem5 + 1*inem7 + 1*inem10 + 1*inem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*inem5
  wad7 =~ 1*inem7
  wad10 =~ 1*inem10 
  wad12 =~ 1*inem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ c*wad5 + wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ c*wad7 + wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ c*wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadm_inat2c.fit <- lavaan(RICLPMadm_inat2c, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMadm_inat.fit, RICLPMadm_inat2c.fit, method = "satorra.bentler.2010")

RICLPMadm_inat2c is NOT significantly worse fit compared to RICLPMadm_inat (p = 0.5649). Now we will constrain the other set of stability coefficients: cross lag si->ad (d) but comparing that model to this one.

Constraining cross lag in social isolation to ADHD parameter (RICLPMadm_inat2d) - compared to RICLPMadm_inat2c

Thus, constraining both sets of lags are tested in this model.

RICLPMadm_inat2d <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*inem5 + 1*inem7 + 1*inem10 + 1*inem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*inem5
  wad7 =~ 1*inem7
  wad10 =~ 1*inem10 
  wad12 =~ 1*inem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + d*wsi5 
  wsi7 ~ c*wad5 + wsi5
  
  wad10 ~ wad7 + d*wsi7
  wsi10 ~ c*wad7 + wsi7
  
  wad12 ~ wad10 + d*wsi10
  wsi12 ~ c*wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMadm_inat2d.fit <- lavaan(RICLPMadm_inat2d, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 

RICLPMadm_inat2d.fit.summary <- summary(RICLPMadm_inat2d.fit, 
                                fit.measures = TRUE,
                                standardized = TRUE)

lavaan 0.6-10 ended normally after 67 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35 Number of equality constraints 4

Number of observations 2232 Number of missing patterns 12

Model Test User Model: Standard Robust Test Statistic 67.655 38.876 Degrees of freedom 13 13 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.740 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 5599.312 2890.544 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.937

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.990 0.991 Tucker-Lewis Index (TLI) 0.979 0.981

Robust Comparative Fit Index (CFI) 0.992 Robust Tucker-Lewis Index (TLI) 0.983

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -29084.484 -29084.484 Scaling correction factor 2.164 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.236 for the MLR correction

Akaike (AIC) 58230.969 58230.969 Bayesian (BIC) 58407.999 58407.999 Sample-size adjusted Bayesian (BIC) 58309.507 58309.507

Root Mean Square Error of Approximation:

RMSEA 0.043 0.030 90 Percent confidence interval - lower 0.034 0.022 90 Percent confidence interval - upper 0.054 0.038 P-value RMSEA <= 0.05 0.844 1.000

Robust RMSEA 0.039 90 Percent confidence interval - lower 0.025 90 Percent confidence interval - upper 0.054

Standardized Root Mean Square Residual:

SRMR 0.029 0.029

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
inem5 1.000 1.236 0.622 inem7 1.000 1.236 0.691 inem10 1.000 1.236 0.692 inem12 1.000 1.236 0.680 RIsi =~
sisoe5 1.000 0.698 0.608 sisoe7 1.000 0.698 0.595 sisoe10 1.000 0.698 0.540 sisoe12 1.000 0.698 0.514 wad5 =~
inem5 1.000 1.556 0.783 wad7 =~
inem7 1.000 1.294 0.723 wad10 =~
inem10 1.000 1.290 0.722 wad12 =~
inem12 1.000 1.333 0.733 wsi5 =~
sisoe5 1.000 0.912 0.794 wsi7 =~
sisoe7 1.000 0.942 0.803 wsi10 =~
sisoe10 1.000 1.088 0.842 wsi12 =~
sisoe12 1.000 1.166 0.858

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.151 0.043 3.531 0.000 0.181 0.181 wsi5 (d) 0.081 0.036 2.253 0.024 0.057 0.057 wsi7 ~
wad5 (c) 0.034 0.019 1.729 0.084 0.056 0.056 wsi5 0.205 0.058 3.546 0.000 0.199 0.199 wad10 ~
wad7 0.001 0.064 0.016 0.987 0.001 0.001 wsi7 (d) 0.081 0.036 2.253 0.024 0.059 0.059 wsi10 ~
wad7 (c) 0.034 0.019 1.729 0.084 0.040 0.040 wsi7 0.278 0.055 5.037 0.000 0.241 0.241 wad12 ~
wad10 0.338 0.052 6.458 0.000 0.327 0.327 wsi10 (d) 0.081 0.036 2.253 0.024 0.066 0.066 wsi12 ~
wad10 (c) 0.034 0.019 1.729 0.084 0.037 0.037 wsi10 0.430 0.042 10.345 0.000 0.401 0.401

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.263 0.070 3.764 0.000 0.185 0.185 .wad7 ~~
.wsi7 0.148 0.052 2.826 0.005 0.127 0.127 .wad10 ~~
.wsi10 0.261 0.057 4.575 0.000 0.192 0.192 .wad12 ~~
.wsi12 0.242 0.047 5.186 0.000 0.182 0.182 RIad ~~
RIsi 0.458 0.055 8.384 0.000 0.532 0.532

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .inem5 1.208 0.041 29.148 0.000 1.208 0.608 .inem7 0.944 0.039 24.265 0.000 0.944 0.528 .inem10 0.965 0.038 25.166 0.000 0.965 0.540 .inem12 0.928 0.039 23.951 0.000 0.928 0.511 .sisoe5 0.813 0.024 33.882 0.000 0.813 0.708 .sisoe7 0.831 0.025 33.074 0.000 0.831 0.710 .sisoe10 0.940 0.028 33.692 0.000 0.940 0.727 .sisoe12 0.941 0.029 31.922 0.000 0.941 0.693 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 1.527 0.127 12.000 0.000 1.000 1.000 RIsi 0.487 0.056 8.761 0.000 1.000 1.000 wad5 2.421 0.152 15.951 0.000 1.000 1.000 wsi5 0.831 0.097 8.579 0.000 1.000 1.000 .wad7 1.607 0.130 12.387 0.000 0.960 0.960 .wsi7 0.845 0.071 11.917 0.000 0.953 0.953 .wad10 1.657 0.152 10.884 0.000 0.996 0.996 .wsi10 1.110 0.080 13.877 0.000 0.938 0.938 .wad12 1.564 0.101 15.462 0.000 0.880 0.880 .wsi12 1.130 0.082 13.838 0.000 0.832 0.832 .inem5 0.000 0.000 0.000 .inem7 0.000 0.000 0.000 .inem10 0.000 0.000 0.000 .inem12 0.000 0.000 0.000 .sisoe5 0.000 0.000 0.000 .sisoe7 0.000 0.000 0.000 .sisoe10 0.000 0.000 0.000 .sisoe12 0.000 0.000 0.000

#Table of model fit 
RICLPMadm_inat2d.fit.summary.fit <- table.model.fit(RICLPMadm_inat2d.fit.summary)
RICLPMadm_inat2d.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
RICLPMadm_inat2d.fit.summary.reg <- table.model.coef(model = RICLPMadm_inat2d.fit.summary, type = "RICLPM", constraints = "Yes")
RICLPMadm_inat2d.fit.summary.reg %>% select(lhs, op, rhs, pvalue, std.all) %>% mutate_if(is.numeric, round, 3)
lavTestLRT(RICLPMadm_inat2c.fit, RICLPMadm_inat2d.fit, method = "satorra.bentler.2010") #comparing to other best fitting model

RICLPMadm_inat2d is NOT significantly worse fit compared to RICLPMadm_inat2c (0.6671).

The best fitting model (mother report and total ADHD symptoms) is currently RICLPMadm_inat2d where cross-lags are constrained to be equal across time.

Constrainemd grand means (RICLPMadm_inat3)

The grand means are the means over all units per occasion. These grand means may be time-varying, or may be fixed to be invariant over time.

RICLPMadm_inat3 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*inem5 + 1*inem7 + 1*inem10 + 1*inem12 #x
  RIsi =~ 1*sisoe5 + 1*sisoe7 + 1*sisoe10 + 1*sisoe12 #y

  # Create within-person centered variables
  wad5 =~ 1*inem5
  wad7 =~ 1*inem7
  wad10 =~ 1*inem10 
  wad12 =~ 1*inem12
  wsi5 =~ 1*sisoe5
  wsi7 =~ 1*sisoe7
  wsi10 =~ 1*sisoe10
  wsi12 =~ 1*sisoe12
  
  # Constrainemd lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
  
  # Constrain the grand means over time
  inem5 + inem7 + inem10 + inem12 ~ mad*1
  sisoe5 + sisoe7 + sisoe10 + sisoe12 ~ msi*1
'
RICLPMadm_inat3.fit <- lavaan(RICLPMadm_inat3, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMadm_inat.fit, RICLPMadm_inat3.fit, method = "satorra.bentler.2010") 

If the grand means cannot be constrainemd to be invariant over time, this implies that on average there is some change in this variable over time, which may reflect some occasion-specific effect, or a developmental trend. By allowing the means to freely vary over time, we account for such average changes over time.

This makes sense as we have shown variation in social isolation over time and other literature has shown variation in ADHD over time.


RI-CLPM: Total ADHD is combined mother and teacher report, isolation is teacher report

Cross-lagged panel model (CLPMsit)

CLPMsit <- '
  # Estimate the lagged effects between the observed variables.
  tadhde7 + sisoet7 ~ tadhde5 + sisoet5
  tadhde10 + sisoet10 ~ tadhde7 + sisoet7
  tadhde12 + sisoet12 ~ tadhde10 + sisoet10

  # Estimate the covariance between the observed variables at the first wave. 
  tadhde5 ~~ sisoet5 # Covariance
  
  # Estimate the covariances between the residuals of the observed variables.
  tadhde7 ~~ sisoet7
  tadhde10 ~~ sisoet10
  tadhde12 ~~ sisoet12
  
  # Estimate the (residual) variance of the observed variables.
  tadhde5 ~~ tadhde5 # Variances
  sisoet5 ~~ sisoet5 
  tadhde7 ~~ tadhde7 # Residual variances
  sisoet7 ~~ sisoet7 
  tadhde10 ~~ tadhde10 
  sisoet10 ~~ sisoet10 
  tadhde12 ~~ tadhde12 
  sisoet12 ~~ sisoet12 
'
CLPMsit.fit <- lavaan(CLPMsit, 
                   data = dat, 
                   missing = 'ML',
                   meanstructure = TRUE, 
                   int.ov.free = TRUE,
                   se = "robust",
                   estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic 
                   ) 

CLPMsit.fit.summary <- summary(CLPMsit.fit, 
                            fit.measures = TRUE,
                            standardized = TRUE)

lavaan 0.6-10 ended normally after 36 iterations

Estimator ML Optimization method NLMINB Number of model parameters 32

Number of observations 2232 Number of missing patterns 39

Model Test User Model: Standard Robust Test Statistic 381.502 220.037 Degrees of freedom 12 12 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.734 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 4387.281 2253.068 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.947

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.915 0.907 Tucker-Lewis Index (TLI) 0.802 0.782

Robust Comparative Fit Index (CFI) 0.917 Robust Tucker-Lewis Index (TLI) 0.806

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -32173.935 -32173.935 Scaling correction factor 2.585 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.353 for the MLR correction

Akaike (AIC) 64411.869 64411.869 Bayesian (BIC) 64594.610 64594.610 Sample-size adjusted Bayesian (BIC) 64492.941 64492.941

Root Mean Square Error of Approximation:

RMSEA 0.117 0.088 90 Percent confidence interval - lower 0.107 0.081 90 Percent confidence interval - upper 0.128 0.096 P-value RMSEA <= 0.05 0.000 0.000

Robust RMSEA 0.116 90 Percent confidence interval - lower 0.103 90 Percent confidence interval - upper 0.130

Standardized Root Mean Square Residual:

SRMR 0.064 0.064

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all tadhde7 ~
tadhde5 0.544 0.027 20.358 0.000 0.544 0.579 sisoet5 0.087 0.050 1.745 0.081 0.087 0.042 sisoet7 ~
tadhde5 0.061 0.012 5.097 0.000 0.061 0.129 sisoet5 0.278 0.046 6.075 0.000 0.278 0.267 tadhde10 ~
tadhde7 0.533 0.029 18.450 0.000 0.533 0.557 sisoet7 0.045 0.049 0.937 0.349 0.045 0.024 sisoet10 ~
tadhde7 0.104 0.018 5.928 0.000 0.104 0.184 sisoet7 0.261 0.040 6.615 0.000 0.261 0.232 tadhde12 ~
tadhde10 0.673 0.034 19.817 0.000 0.673 0.654 sisoet10 -0.056 0.045 -1.252 0.210 -0.056 -0.032 sisoet12 ~
tadhde10 0.088 0.019 4.612 0.000 0.088 0.145 sisoet10 0.319 0.037 8.506 0.000 0.319 0.314

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all tadhde5 ~~
sisoet5 1.002 0.146 6.862 0.000 1.002 0.289 .tadhde7 ~~
.sisoet7 0.487 0.088 5.559 0.000 0.487 0.189 .tadhde10 ~~
.sisoet10 0.709 0.109 6.503 0.000 0.709 0.249 .tadhde12 ~~
.sisoet12 0.627 0.115 5.449 0.000 0.627 0.232

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .tadhde7 0.533 0.055 9.690 0.000 0.533 0.205 .sisoet7 0.338 0.036 9.401 0.000 0.338 0.258 .tadhde10 0.569 0.051 11.224 0.000 0.569 0.229 .sisoet10 0.394 0.036 10.985 0.000 0.394 0.267 .tadhde12 0.443 0.045 9.805 0.000 0.443 0.173 .sisoet12 0.409 0.038 10.904 0.000 0.409 0.273 tadhde5 2.250 0.059 38.460 0.000 2.250 0.814 sisoet5 0.629 0.028 22.570 0.000 0.629 0.502

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all tadhde5 7.641 0.397 19.265 0.000 7.641 1.000 sisoet5 1.571 0.134 11.706 0.000 1.571 1.000 .tadhde7 4.369 0.238 18.344 0.000 4.369 0.648 .sisoet7 1.528 0.115 13.314 0.000 1.528 0.892 .tadhde10 4.202 0.269 15.645 0.000 4.202 0.682 .sisoet10 1.933 0.154 12.555 0.000 1.933 0.889 .tadhde12 3.820 0.279 13.712 0.000 3.820 0.585 .sisoet12 1.908 0.142 13.468 0.000 1.908 0.850

#Table of model fit 
CLPMsit.fit.summary.fit <- table.model.fit(CLPMsit.fit.summary)
CLPMsit.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
CLPMsit.fit.summary.reg <- table.model.coef(model = CLPMsit.fit.summary, type = "CLPM", constraints = "No")
CLPMsit.fit.summary.reg %>% select(lhs, op, rhs, pvalue, std.all) %>% mutate_if(is.numeric, round, 3)

The basic RI-CLPM model (RICLPMsit)

The code for specifying the basic RI-CLPM is given below.

RICLPMsit <- '
  # Create between components (rando intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Estimate the lagged effects between the within-person centered variables
  wad7 + wsi7 ~ wad5 + wsi5
  wad10 + wsi10 ~ wad7 + wsi7
  wad12 + wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsit.fit <- lavaan(RICLPMsit,               # model
                     data = dat,           # data
                     missing = 'ML',       # how to handle missing data 
                     meanstructure = TRUE, # adds intercepts/means to the model for both observed and latent variables
                     se = "robust",        # robust standard errors
                     int.ov.free = TRUE,   # if FALSE, the intercepts of the observed variables are fixed to zero
                     estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
)

RICLPMsit.fit.summary <- summary(RICLPMsit.fit, 
                              fit.measures = TRUE,
                              standardized = TRUE)

lavaan 0.6-10 ended normally after 96 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35

Number of observations 2232 Number of missing patterns 39

Model Test User Model: Standard Robust Test Statistic 45.288 26.858 Degrees of freedom 9 9 P-value (Chi-square) 0.000 0.001 Scaling correction factor 1.686 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 4387.281 2253.068 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.947

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.992 0.992 Tucker-Lewis Index (TLI) 0.974 0.975

Robust Comparative Fit Index (CFI) 0.993 Robust Tucker-Lewis Index (TLI) 0.978

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -32005.828 -32005.828 Scaling correction factor 2.524 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.353 for the MLR correction

Akaike (AIC) 64081.655 64081.655 Bayesian (BIC) 64281.528 64281.528 Sample-size adjusted Bayesian (BIC) 64170.327 64170.327

Root Mean Square Error of Approximation:

RMSEA 0.043 0.030 90 Percent confidence interval - lower 0.031 0.020 90 Percent confidence interval - upper 0.055 0.040 P-value RMSEA <= 0.05 0.826 1.000

Robust RMSEA 0.039 90 Percent confidence interval - lower 0.022 90 Percent confidence interval - upper 0.056

Standardized Root Mean Square Residual:

SRMR 0.029 0.029

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
tadhde5 1.000 1.814 0.648 tadhde7 1.000 1.814 0.707 tadhde10 1.000 1.814 0.729 tadhde12 1.000 1.814 0.715 RIsi =~
sisoet5 1.000 0.597 0.473 sisoet7 1.000 0.597 0.456 sisoet10 1.000 0.597 0.407 sisoet12 1.000 0.597 0.404 wad5 =~
tadhde5 1.000 2.135 0.762 wad7 =~
tadhde7 1.000 1.813 0.707 wad10 =~
tadhde10 1.000 1.703 0.684 wad12 =~
tadhde12 1.000 1.773 0.699 wsi5 =~
sisoet5 1.000 1.113 0.881 wsi7 =~
sisoet7 1.000 1.166 0.890 wsi10 =~
sisoet10 1.000 1.341 0.914 wsi12 =~
sisoet12 1.000 1.352 0.915

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.203 0.038 5.315 0.000 0.239 0.239 wsi5 0.101 0.068 1.490 0.136 0.062 0.062 wsi7 ~
wad5 0.037 0.020 1.832 0.067 0.067 0.067 wsi5 0.106 0.063 1.694 0.090 0.101 0.101 wad10 ~
wad7 0.074 0.063 1.165 0.244 0.078 0.078 wsi7 0.048 0.065 0.739 0.460 0.033 0.033 wsi10 ~
wad7 0.092 0.037 2.505 0.012 0.125 0.125 wsi7 0.099 0.058 1.709 0.087 0.086 0.086 wad12 ~
wad10 0.263 0.069 3.811 0.000 0.253 0.253 wsi10 -0.020 0.058 -0.350 0.726 -0.015 -0.015 wsi12 ~
wad10 0.028 0.037 0.749 0.454 0.035 0.035 wsi10 0.214 0.046 4.702 0.000 0.212 0.212

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.568 0.115 4.930 0.000 0.239 0.239 .wad7 ~~
.wsi7 0.357 0.100 3.578 0.000 0.177 0.177 .wad10 ~~
.wsi10 0.634 0.125 5.073 0.000 0.283 0.283 .wad12 ~~
.wsi12 0.421 0.108 3.883 0.000 0.186 0.186 RIad ~~
RIsi 0.526 0.074 7.126 0.000 0.486 0.486

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .tadhde5 2.250 0.059 38.460 0.000 2.250 0.803 .tadhde7 1.812 0.055 32.726 0.000 1.812 0.706 .tadhde10 1.565 0.053 29.466 0.000 1.565 0.629 .tadhde12 1.453 0.055 26.662 0.000 1.453 0.573 .sisoet5 0.631 0.028 22.609 0.000 0.631 0.499 .sisoet7 0.651 0.029 22.259 0.000 0.651 0.497 .sisoet10 0.753 0.034 21.922 0.000 0.753 0.513 .sisoet12 0.785 0.036 22.023 0.000 0.785 0.531 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 3.291 0.239 13.745 0.000 1.000 1.000 RIsi 0.357 0.052 6.857 0.000 1.000 1.000 wad5 4.559 0.316 14.431 0.000 1.000 1.000 wsi5 1.239 0.127 9.751 0.000 1.000 1.000 .wad7 3.066 0.239 12.830 0.000 0.932 0.932 .wsi7 1.335 0.124 10.745 0.000 0.982 0.982 .wad10 2.876 0.322 8.934 0.000 0.992 0.992 .wsi10 1.750 0.151 11.557 0.000 0.973 0.973 .wad12 2.949 0.258 11.450 0.000 0.938 0.938 .wsi12 1.735 0.143 12.090 0.000 0.949 0.949 .tadhde5 0.000 0.000 0.000 .tadhde7 0.000 0.000 0.000 .tadhde10 0.000 0.000 0.000 .tadhde12 0.000 0.000 0.000 .sisoet5 0.000 0.000 0.000 .sisoet7 0.000 0.000 0.000 .sisoet10 0.000 0.000 0.000 .sisoet12 0.000 0.000 0.000

#Table of model fit 
RICLPMsit.fit.summary.fit <- table.model.fit(RICLPMsit.fit.summary)
#Table of regression coefficients and covariances (concurrent associations)
RICLPMsit.fit.summary.reg <- table.model.coef(model = RICLPMsit.fit.summary, type = "RICLPM", constraints = "No")
RICLPMsit.fit.summary.reg %>% select(lhs, op, rhs, pvalue, std.all) %>% mutate_if(is.numeric, round, 3)

Constraining all lag and crosslag parameters at once (RICLPMsit2)

RICLPMsit2 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  
  # Constrainetd lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + d*wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ a*wad7 + d*wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ a*wad10 + d*wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsit2.fit <- lavaan(RICLPMsit2, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 

RICLPMsit2.fit.summary <- summary(RICLPMsit2.fit, 
                              fit.measures = TRUE,
                              standardized = TRUE)

lavaan 0.6-10 ended normally after 88 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35 Number of equality constraints 8

Number of observations 2232 Number of missing patterns 39

Model Test User Model: Standard Robust Test Statistic 99.639 50.816 Degrees of freedom 17 17 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.961 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 4387.281 2253.068 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.947

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.981 0.985 Tucker-Lewis Index (TLI) 0.969 0.975

Robust Comparative Fit Index (CFI) 0.985 Robust Tucker-Lewis Index (TLI) 0.975

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -32033.003 -32033.003 Scaling correction factor 2.005 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.353 for the MLR correction

Akaike (AIC) 64120.006 64120.006 Bayesian (BIC) 64274.194 64274.194 Sample-size adjusted Bayesian (BIC) 64188.411 64188.411

Root Mean Square Error of Approximation:

RMSEA 0.047 0.030 90 Percent confidence interval - lower 0.038 0.023 90 Percent confidence interval - upper 0.056 0.037 P-value RMSEA <= 0.05 0.716 1.000

Robust RMSEA 0.042 90 Percent confidence interval - lower 0.029 90 Percent confidence interval - upper 0.055

Standardized Root Mean Square Residual:

SRMR 0.035 0.035

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
tadhde5 1.000 1.777 0.638 tadhde7 1.000 1.777 0.688 tadhde10 1.000 1.777 0.699 tadhde12 1.000 1.777 0.713 RIsi =~
sisoet5 1.000 0.590 0.466 sisoet7 1.000 0.590 0.444 sisoet10 1.000 0.590 0.404 sisoet12 1.000 0.590 0.403 wad5 =~
tadhde5 1.000 2.144 0.770 wad7 =~
tadhde7 1.000 1.876 0.726 wad10 =~
tadhde10 1.000 1.820 0.716 wad12 =~
tadhde12 1.000 1.745 0.701 wsi5 =~
sisoet5 1.000 1.119 0.885 wsi7 =~
sisoet7 1.000 1.189 0.896 wsi10 =~
sisoet10 1.000 1.337 0.915 wsi12 =~
sisoet12 1.000 1.339 0.915

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 (a) 0.223 0.033 6.722 0.000 0.255 0.255 wsi5 (d) 0.024 0.036 0.664 0.507 0.014 0.014 wsi7 ~
wad5 (c) 0.052 0.017 3.064 0.002 0.094 0.094 wsi5 (b) 0.145 0.036 4.049 0.000 0.137 0.137 wad10 ~
wad7 (a) 0.223 0.033 6.722 0.000 0.230 0.230 wsi7 (d) 0.024 0.036 0.664 0.507 0.016 0.016 wsi10 ~
wad7 (c) 0.052 0.017 3.064 0.002 0.073 0.073 wsi7 (b) 0.145 0.036 4.049 0.000 0.129 0.129 wad12 ~
wad10 (a) 0.223 0.033 6.722 0.000 0.232 0.232 wsi10 (d) 0.024 0.036 0.664 0.507 0.019 0.019 wsi12 ~
wad10 (c) 0.052 0.017 3.064 0.002 0.071 0.071 wsi10 (b) 0.145 0.036 4.049 0.000 0.145 0.145

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.549 0.107 5.115 0.000 0.229 0.229 .wad7 ~~
.wsi7 0.362 0.093 3.900 0.000 0.171 0.171 .wad10 ~~
.wsi10 0.598 0.114 5.235 0.000 0.256 0.256 .wad12 ~~
.wsi12 0.424 0.106 3.979 0.000 0.190 0.190 RIad ~~
RIsi 0.531 0.069 7.685 0.000 0.507 0.507

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .tadhde5 2.250 0.059 38.460 0.000 2.250 0.808 .tadhde7 1.813 0.055 32.717 0.000 1.813 0.702 .tadhde10 1.563 0.053 29.422 0.000 1.563 0.615 .tadhde12 1.454 0.055 26.608 0.000 1.454 0.584 .sisoet5 0.631 0.028 22.532 0.000 0.631 0.499 .sisoet7 0.652 0.029 22.239 0.000 0.652 0.491 .sisoet10 0.751 0.034 21.990 0.000 0.751 0.514 .sisoet12 0.785 0.036 21.969 0.000 0.785 0.537 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 3.156 0.227 13.875 0.000 1.000 1.000 RIsi 0.348 0.052 6.681 0.000 1.000 1.000 wad5 4.597 0.313 14.677 0.000 1.000 1.000 wsi5 1.252 0.121 10.313 0.000 1.000 1.000 .wad7 3.284 0.224 14.667 0.000 0.933 0.933 .wsi7 1.366 0.115 11.894 0.000 0.967 0.967 .wad10 3.132 0.276 11.361 0.000 0.946 0.946 .wsi10 1.741 0.153 11.390 0.000 0.974 0.974 .wad12 2.873 0.239 12.036 0.000 0.943 0.943 .wsi12 1.736 0.144 12.014 0.000 0.968 0.968 .tadhde5 0.000 0.000 0.000 .tadhde7 0.000 0.000 0.000 .tadhde10 0.000 0.000 0.000 .tadhde12 0.000 0.000 0.000 .sisoet5 0.000 0.000 0.000 .sisoet7 0.000 0.000 0.000 .sisoet10 0.000 0.000 0.000 .sisoet12 0.000 0.000 0.000

#Table of model fit 
RICLPMsit2.fit.summary.fit <- table.model.fit(RICLPMsit2.fit.summary)
RICLPMsit2.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
RICLPMsit2.fit.summary.reg <- table.model.coef(model = RICLPMsit2.fit.summary, type = "RICLPM", constraints = "Yes")
RICLPMsit2.fit.summary.reg %>% select(lhs, op, rhs, pvalue, std.all) %>% mutate_if(is.numeric, round, 3)
lavTestLRT(RICLPMsit.fit, RICLPMsit2.fit, method = "satorra.bentler.2010")

RICLPMsit2 is significantly worse fit compared to RICLPMsit according to the Chi square test (p = 0.005094)

Comparison of fit statistics: Model2 Model Robust Comparative Fit Index (CFI) 0.985 0.993 (0.008) Robust Tucker-Lewis Index (TLI) 0.975 0.978 (0.003) Robust RMSEA 0.042 0.039 (0.003) SRMR 0.035 0.029 (0.006) All change in fit statistics is less than 0.01 - we can accept these constraints. Also the other significance levels are almost non-significant (chi square is likely inflated with large sample size) 2a p = 0.016 2b p = 0.1738 2c p = 0.4859 2d p = 0.065

Constraining lag in ADHD parameter (RICLPMsit2a)

Now we will test the constraints based on the following steps recommended by Curran and Bauer: 1. Estimate the baseline model where all parameters are freely estimated (The basic RI-CLPM) 2. Impose equlaity constraints on one set of stabilities (within variable lags). Use LRT tests to see if he fit becomes significantly worse. 3. Impose equality constraints on the next set of stabilities. Compare this to wither model 1 (baseline/basic) if step 2 was significant. Compare to model 2 if step 2 was non-significant. Non-sig LRT = not significantly worse fit 4. Repeat for first set of cross-lags 5. Repeat for second set of cross-lags

RICLPMsit2a <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  
  wad10 ~ a*wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  
  wad12 ~ a*wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsit2a.fit <- lavaan(RICLPMsit2a, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsit.fit, RICLPMsit2a.fit, method = "satorra.bentler.2010")

Constraining lag in social isolation parameter (RICLPMsit2b)

RICLPMsit2b <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + b*wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + b*wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsit2b.fit <- lavaan(RICLPMsit2b, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsit.fit, RICLPMsit2b.fit, method = "satorra.bentler.2010")

RICLPMsit2b is NOT significantly worse fit (p = 0.1738) compared to RICLPMsit. Now we will constrain the other set of stability coefficients: cross lag ad->si (c) comparing to b!

Constraining cross lag in ADHD to social isolation parameter (RICLPMsit2c)

RICLPMsit2c <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsit2c.fit <- lavaan(RICLPMsit2c, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsit2b.fit, RICLPMsit2c.fit, method = "satorra.bentler.2010")

RICLPMsit2c is NOT significantly worse fit compared to RICLPMsit (p = 0.4859). Now we will constrain the other set of stability coefficients: cross lag si->ad (d) but comparing that model to this one.

Constraining cross lag in social isolation to ADHD parameter (RICLPMsit2d) - compared to RICLPMsit2c, b,c,d lags constrained

Thus, constraining both sets of lags are tested in this model.

RICLPMsit2d <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + d*wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ wad7 + d*wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ wad10 + d*wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsit2d.fit <- lavaan(RICLPMsit2d, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsit2c.fit, RICLPMsit2d.fit, method = "satorra.bentler.2010") #comparing to other best fitting model

RICLPMsit2d is NOT significantly worse fit compared to RICLPMsit2c (p = 0.06539).

The best fitting model (mother report and total ADHD symptoms) is currently RICLPMsit2d where cross-lags and isolation autolag are constrained to be equal across time.


Constrainetd grand means (RICLPMsit3)

The grand means are the means over all units per occasion. These grand means may be time-varying, or may be fixed to be invariant over time.

RICLPMsit3 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Constrainetd lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
  
  # Constrain the grand means over time
  tadhde5 + tadhde7 + tadhde10 + tadhde12 ~ mad*1
  sisoet5 + sisoet7 + sisoet10 + sisoet12 ~ msi*1
'
RICLPMsit3.fit <- lavaan(RICLPMsit3, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsit.fit, RICLPMsit3.fit, method = "satorra.bentler.2010") 

If the grand means cannot be constrained to be invariant over time, this implies that on average there is some change in this variable over time, which may reflect some occasion-specific effect, or a developmental trend. By allowing the means to freely vary over time, we account for such average changes over time.

This makes sense as we have shown variation in social isolation over time and other literature has shown variation in ADHD over time.


RI-CLPM: Hyperactive/Impulsive ADHD is combined mother and teacher report, isolation is teacher report only

The basic RI-CLPM model (RICLPMsit_hyp)

The code for specifying the basic RI-CLPM is given below.

RICLPMsit_hyp <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Estimate the lagged effects between the within-person centered variables
  wad7 + wsi7 ~ wad5 + wsi5
  wad10 + wsi10 ~ wad7 + wsi7
  wad12 + wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsit_hyp.fit <- lavaan(RICLPMsit_hyp,       # model
                     data = dat,           # data
                     missing = 'ML',       # how to handle missing data 
                     meanstructure = TRUE, # adds intercepts/means to the model for both observed and latent variables
                     se = "robust",        # robust standard errors
                     int.ov.free = TRUE,   # if FALSE, the intercepts of the observed variables are fixed to zero
                     estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
)

RICLPMsit_hyp.fit.summary <- summary(RICLPMsit_hyp.fit, 
                                  fit.measures = TRUE,
                                  standardized = TRUE)

lavaan 0.6-10 ended normally after 54 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35

Number of observations 2232 Number of missing patterns 39

Model Test User Model: Standard Robust Test Statistic 37.624 23.919 Degrees of freedom 9 9 P-value (Chi-square) 0.000 0.004 Scaling correction factor 1.573 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 3879.974 2114.195 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.835

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.993 0.993 Tucker-Lewis Index (TLI) 0.977 0.978

Robust Comparative Fit Index (CFI) 0.994 Robust Tucker-Lewis Index (TLI) 0.981

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -27366.252 -27366.252 Scaling correction factor 2.404 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.234 for the MLR correction

Akaike (AIC) 54802.505 54802.505 Bayesian (BIC) 55002.378 55002.378 Sample-size adjusted Bayesian (BIC) 54891.177 54891.177

Root Mean Square Error of Approximation:

RMSEA 0.038 0.027 90 Percent confidence interval - lower 0.026 0.017 90 Percent confidence interval - upper 0.051 0.038 P-value RMSEA <= 0.05 0.941 1.000

Robust RMSEA 0.034 90 Percent confidence interval - lower 0.018 90 Percent confidence interval - upper 0.051

Standardized Root Mean Square Residual:

SRMR 0.026 0.026

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
hye5 1.000 0.989 0.610 hye7 1.000 0.989 0.664 hye10 1.000 0.989 0.712 hye12 1.000 0.989 0.697 RIsi =~
sisoet5 1.000 0.608 0.483 sisoet7 1.000 0.608 0.465 sisoet10 1.000 0.608 0.415 sisoet12 1.000 0.608 0.410 wad5 =~
hye5 1.000 1.285 0.792 wad7 =~
hye7 1.000 1.114 0.748 wad10 =~
hye10 1.000 0.976 0.702 wad12 =~
hye12 1.000 1.018 0.717 wsi5 =~
sisoet5 1.000 1.101 0.875 wsi7 =~
sisoet7 1.000 1.157 0.885 wsi10 =~
sisoet10 1.000 1.334 0.910 wsi12 =~
sisoet12 1.000 1.353 0.912

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.227 0.033 6.815 0.000 0.262 0.262 wsi5 0.057 0.038 1.509 0.131 0.057 0.057 wsi7 ~
wad5 0.070 0.031 2.298 0.022 0.078 0.078 wsi5 0.093 0.064 1.450 0.147 0.089 0.089 wad10 ~
wad7 0.104 0.052 2.010 0.044 0.118 0.118 wsi7 0.036 0.036 1.007 0.314 0.043 0.043 wsi10 ~
wad7 0.169 0.053 3.167 0.002 0.141 0.141 wsi7 0.095 0.058 1.626 0.104 0.082 0.082 wad12 ~
wad10 0.253 0.064 3.946 0.000 0.242 0.242 wsi10 0.011 0.030 0.385 0.700 0.015 0.015 wsi12 ~
wad10 0.064 0.058 1.104 0.270 0.046 0.046 wsi10 0.215 0.045 4.737 0.000 0.212 0.212

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.270 0.061 4.428 0.000 0.191 0.191 .wad7 ~~
.wsi7 0.166 0.057 2.913 0.004 0.135 0.135 .wad10 ~~
.wsi10 0.287 0.063 4.544 0.000 0.226 0.226 .wad12 ~~
.wsi12 0.182 0.061 2.980 0.003 0.140 0.140 RIad ~~
RIsi 0.219 0.037 5.855 0.000 0.363 0.363

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .hye5 1.371 0.034 40.447 0.000 1.371 0.846 .hye7 1.092 0.032 33.964 0.000 1.092 0.733 .hye10 0.835 0.030 28.187 0.000 0.835 0.601 .hye12 0.779 0.031 25.506 0.000 0.779 0.549 .sisoet5 0.631 0.028 22.586 0.000 0.631 0.501 .sisoet7 0.651 0.029 22.219 0.000 0.651 0.498 .sisoet10 0.747 0.034 21.939 0.000 0.747 0.509 .sisoet12 0.781 0.036 21.936 0.000 0.781 0.527 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 0.979 0.068 14.378 0.000 1.000 1.000 RIsi 0.370 0.052 7.086 0.000 1.000 1.000 wad5 1.651 0.097 16.953 0.000 1.000 1.000 wsi5 1.213 0.126 9.626 0.000 1.000 1.000 .wad7 1.144 0.084 13.639 0.000 0.923 0.923 .wsi7 1.317 0.125 10.536 0.000 0.983 0.983 .wad10 0.936 0.097 9.647 0.000 0.983 0.983 .wsi10 1.727 0.150 11.511 0.000 0.970 0.970 .wad12 0.973 0.082 11.834 0.000 0.939 0.939 .wsi12 1.737 0.144 12.023 0.000 0.948 0.948 .hye5 0.000 0.000 0.000 .hye7 0.000 0.000 0.000 .hye10 0.000 0.000 0.000 .hye12 0.000 0.000 0.000 .sisoet5 0.000 0.000 0.000 .sisoet7 0.000 0.000 0.000 .sisoet10 0.000 0.000 0.000 .sisoet12 0.000 0.000 0.000

#Table of model fit 
RICLPMsit_hyp.fit.summary.fit <- table.model.fit(RICLPMsit_hyp.fit.summary)
#Table of regression coefficients and covariances (concurrent associations)
RICLPMsit_hyp.fit.summary.reg <- table.model.coef(model = RICLPMsit_hyp.fit.summary, type = "RICLPM", constraints = "No")

RI-CLPM Constraints over time

Fixed autoregressive and cross-lagged relations over time (RICLPMsit_hyp2)

a = lag in ad b = lag in si c = cross lag ad->si d = cross lag si->ad

Constraining all lag and crosslag parameters at once (RICLPMsit2)

RICLPMsit_hyp2 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  
  # Constrainetd lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + d*wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ a*wad7 + d*wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ a*wad10 + d*wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsit_hyp2.fit <- lavaan(RICLPMsit_hyp2, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 

RICLPMsit_hyp2.fit.summary <- summary(RICLPMsit_hyp2.fit, 
                                    fit.measures = TRUE,
                                    standardized = TRUE)

lavaan 0.6-10 ended normally after 43 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35 Number of equality constraints 8

Number of observations 2232 Number of missing patterns 39

Model Test User Model: Standard Robust Test Statistic 85.390 47.184 Degrees of freedom 17 17 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.810 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 3879.974 2114.195 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.835

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.982 0.986 Tucker-Lewis Index (TLI) 0.971 0.976

Robust Comparative Fit Index (CFI) 0.986 Robust Tucker-Lewis Index (TLI) 0.977

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -27390.135 -27390.135 Scaling correction factor 1.929 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.234 for the MLR correction

Akaike (AIC) 54834.270 54834.270 Bayesian (BIC) 54988.458 54988.458 Sample-size adjusted Bayesian (BIC) 54902.675 54902.675

Root Mean Square Error of Approximation:

RMSEA 0.042 0.028 90 Percent confidence interval - lower 0.034 0.021 90 Percent confidence interval - upper 0.052 0.035 P-value RMSEA <= 0.05 0.910 1.000

Robust RMSEA 0.038 90 Percent confidence interval - lower 0.025 90 Percent confidence interval - upper 0.051

Standardized Root Mean Square Residual:

SRMR 0.033 0.033

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
hye5 1.000 0.972 0.604 hye7 1.000 0.972 0.651 hye10 1.000 0.972 0.684 hye12 1.000 0.972 0.695 RIsi =~
sisoet5 1.000 0.596 0.473 sisoet7 1.000 0.596 0.450 sisoet10 1.000 0.596 0.409 sisoet12 1.000 0.596 0.407 wad5 =~
hye5 1.000 1.284 0.797 wad7 =~
hye7 1.000 1.134 0.759 wad10 =~
hye10 1.000 1.038 0.730 wad12 =~
hye12 1.000 1.005 0.719 wsi5 =~
sisoet5 1.000 1.112 0.881 wsi7 =~
sisoet7 1.000 1.185 0.893 wsi10 =~
sisoet10 1.000 1.330 0.913 wsi12 =~
sisoet12 1.000 1.337 0.913

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 (a) 0.224 0.030 7.549 0.000 0.254 0.254 wsi5 (d) 0.023 0.020 1.154 0.248 0.023 0.023 wsi7 ~
wad5 (c) 0.094 0.026 3.561 0.000 0.102 0.102 wsi5 (b) 0.145 0.037 3.933 0.000 0.136 0.136 wad10 ~
wad7 (a) 0.224 0.030 7.549 0.000 0.245 0.245 wsi7 (d) 0.023 0.020 1.154 0.248 0.027 0.027 wsi10 ~
wad7 (c) 0.094 0.026 3.561 0.000 0.080 0.080 wsi7 (b) 0.145 0.037 3.933 0.000 0.129 0.129 wad12 ~
wad10 (a) 0.224 0.030 7.549 0.000 0.231 0.231 wsi10 (d) 0.023 0.020 1.154 0.248 0.031 0.031 wsi12 ~
wad10 (c) 0.094 0.026 3.561 0.000 0.073 0.073 wsi10 (b) 0.145 0.037 3.933 0.000 0.144 0.144

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.263 0.058 4.514 0.000 0.184 0.184 .wad7 ~~
.wsi7 0.161 0.054 2.956 0.003 0.126 0.126 .wad10 ~~
.wsi10 0.256 0.061 4.193 0.000 0.194 0.194 .wad12 ~~
.wsi12 0.182 0.059 3.071 0.002 0.142 0.142 RIad ~~
RIsi 0.226 0.036 6.353 0.000 0.390 0.390

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .hye5 1.371 0.034 40.447 0.000 1.371 0.851 .hye7 1.093 0.032 33.962 0.000 1.093 0.732 .hye10 0.835 0.030 28.152 0.000 0.835 0.587 .hye12 0.779 0.031 25.449 0.000 0.779 0.557 .sisoet5 0.631 0.028 22.501 0.000 0.631 0.500 .sisoet7 0.652 0.029 22.207 0.000 0.652 0.492 .sisoet10 0.745 0.034 21.996 0.000 0.745 0.511 .sisoet12 0.782 0.036 21.870 0.000 0.782 0.534 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 0.945 0.066 14.348 0.000 1.000 1.000 RIsi 0.356 0.052 6.791 0.000 1.000 1.000 wad5 1.649 0.098 16.864 0.000 1.000 1.000 wsi5 1.237 0.121 10.199 0.000 1.000 1.000 .wad7 1.199 0.080 15.024 0.000 0.933 0.933 .wsi7 1.356 0.115 11.782 0.000 0.966 0.966 .wad10 1.010 0.086 11.726 0.000 0.937 0.937 .wsi10 1.723 0.153 11.265 0.000 0.974 0.974 .wad12 0.953 0.075 12.617 0.000 0.942 0.942 .wsi12 1.734 0.145 11.920 0.000 0.969 0.969 .hye5 0.000 0.000 0.000 .hye7 0.000 0.000 0.000 .hye10 0.000 0.000 0.000 .hye12 0.000 0.000 0.000 .sisoet5 0.000 0.000 0.000 .sisoet7 0.000 0.000 0.000 .sisoet10 0.000 0.000 0.000 .sisoet12 0.000 0.000 0.000

#Table of model fit 
RICLPMsit_hyp2.fit.summary.fit <- table.model.fit(RICLPMsit_hyp2.fit.summary)
RICLPMsit_hyp2.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
RICLPMsit_hyp2.fit.summary.reg <- table.model.coef(model = RICLPMsit_hyp2.fit.summary, type = "RICLPM", constraints = "Yes")
RICLPMsit_hyp2.fit.summary.reg %>% select(lhs, op, rhs, pvalue, std.all) %>% mutate_if(is.numeric, round, 3)
lavTestLRT(RICLPMsit_hyp.fit, RICLPMsit_hyp2.fit, method = "satorra.bentler.2010")

Comparison of fit statistics: Model2 Model Robust Comparative Fit Index (CFI) 0.985 0.993 (0.008) Robust Tucker-Lewis Index (TLI) 0.976 0.980 (0.004) Robust RMSEA 0.037 0.034 (0.003) SRMR 0.033 0.025 (0.008) All change in fit statistics is less than 0.01 - we can accept these constraints. Also the other significance levels are almost non-significant (chi square is likely inflated with large sample size) 2a p = 0.011 2b p = 0.140 2c p = 0.296 2d p = 0.205

We can accept the constrained RICLPMsit_hyp2

Constraining lag in ADHD parameter (RICLPMsit_hyp2a)

Now we will test the constraints based on the following steps recommended by Curran and Bauer: 1. Estimate the baseline model where all parameters are freely estimated (The basic RI-CLPM) 2. Impose equlaity constraints on one set of stabilities (within variable lags). Use LRT tests to see if he fit becomes significantly worse. 3. Impose equality constraints on the next set of stabilities. Compare this to wither model 1 (baseline/basic) if step 2 was significant. Compare to model 2 if step 2 was non-significant. Non-sig LRT = not significantly worse fit 4. Repeat for first set of cross-lags 5. Repeat for second set of cross-lags

RICLPMsit_hyp2a <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  
  wad10 ~ a*wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  
  wad12 ~ a*wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsit_hyp2a.fit <- lavaan(RICLPMsit_hyp2a, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsit_hyp.fit, RICLPMsit_hyp2a.fit, method = "satorra.bentler.2010")

Constraining lag in social isolation parameter (RICLPMsit_hyp2b)

RICLPMsit_hyp2b <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + b*wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + b*wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsit_hyp2b.fit <- lavaan(RICLPMsit_hyp2b, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsit_hyp.fit, RICLPMsit_hyp2b.fit, method = "satorra.bentler.2010")

RICLPMsit_hyp2b is NOT significantly worse fit (p = 0.1402) compared to RICLPMsit_hyp. Now we will constrain the other set of stability coefficients: cross lag ad->si (c) comparing to b!

Constraining cross lag in ADHD to social isolation parameter (RICLPMsit_hyp2c)

RICLPMsit_hyp2c <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsit_hyp2c.fit <- lavaan(RICLPMsit_hyp2c, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsit_hyp2b.fit, RICLPMsit_hyp2c.fit, method = "satorra.bentler.2010")

RICLPMsit_hyp2c is NOT significantly worse fit compared to RICLPMsit_hyp (p = 0.2965). Now we will constrain the other set of stability coefficients: cross lag si->ad (d) but comparing that model to this one.

Constraining cross lag in social isolation to ADHD parameter (RICLPMsit_hyp2d) - compared to RICLPMsit_hyp2c, b,c,d lags constrained

Thus, constraining both sets of lags are tested in this model.

RICLPMsit_hyp2d <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + d*wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ wad7 + d*wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ wad10 + d*wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsit_hyp2d.fit <- lavaan(RICLPMsit_hyp2d, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsit_hyp2c.fit, RICLPMsit_hyp2d.fit, method = "satorra.bentler.2010") #comparing to other best fitting model

RICLPMsit_hyp2d is NOT significantly worse fit compared to RICLPMsit_hyp2c (p = 0.2054).

The best fitting model (mother report and total ADHD symptoms) is currently RICLPMsit_hyp2d where cross-lags and isolation autolag are constrained to be equal across time.


Constrainetd grand means (RICLPMsit_hyp3)

The grand means are the means over all units per occasion. These grand means may be time-varying, or may be fixed to be invariant over time.

RICLPMsit_hyp3 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Constrainetd lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
  
  # Constrain the grand means over time
  hye5 + hye7 + hye10 + hye12 ~ mad*1
  sisoet5 + sisoet7 + sisoet10 + sisoet12 ~ msi*1
'
RICLPMsit_hyp3.fit <- lavaan(RICLPMsit_hyp3, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsit_hyp.fit, RICLPMsit_hyp3.fit, method = "satorra.bentler.2010") 

If the grand means cannot be constrainetd to be invariant over time, this implies that on average there is some change in this variable over time, which may reflect some occasion-specific effect, or a developmental trend. By allowing the means to freely vary over time, we account for such average changes over time.

This makes sense as we have shown variation in social isolation over time and other literature has shown variation in ADHD over time.


RI-CLPM: Inattention ADHD is combined mother and teacher report, Isolation is teacher report only

The basic RI-CLPM model (RICLPMsit_inat)

The code for specifying the basic RI-CLPM is given below.

RICLPMsit_inat <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Estimate the lagged effects between the within-person centered variables
  wad7 + wsi7 ~ wad5 + wsi5
  wad10 + wsi10 ~ wad7 + wsi7
  wad12 + wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsit_inat.fit <- lavaan(RICLPMsit_inat,     # model
                     data = dat,           # data
                     missing = 'ML',       # how to handle missing data 
                     meanstructure = TRUE, # adds intercepts/means to the model for both observed and latent variables
                     se = "robust",        # robust standard errors
                     int.ov.free = TRUE,   # if FALSE, the intercepts of the observed variables are fixed to zero
                     estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
)

RICLPMsit_inat.fit.summary <- summary(RICLPMsit_inat.fit, 
                                    fit.measures = TRUE,
                                    standardized = TRUE)

lavaan 0.6-10 ended normally after 142 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35

Number of observations 2232 Number of missing patterns 39

Model Test User Model: Standard Robust Test Statistic 36.035 19.854 Degrees of freedom 9 9 P-value (Chi-square) 0.000 0.019 Scaling correction factor 1.815 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 3819.728 1859.380 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 2.054

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.993 0.994 Tucker-Lewis Index (TLI) 0.978 0.982

Robust Comparative Fit Index (CFI) 0.995 Robust Tucker-Lewis Index (TLI) 0.984

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -26702.381 -26702.381 Scaling correction factor 2.637 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.469 for the MLR correction

Akaike (AIC) 53474.761 53474.761 Bayesian (BIC) 53674.634 53674.634 Sample-size adjusted Bayesian (BIC) 53563.433 53563.433

Root Mean Square Error of Approximation:

RMSEA 0.037 0.023 90 Percent confidence interval - lower 0.025 0.013 90 Percent confidence interval - upper 0.050 0.034 P-value RMSEA <= 0.05 0.955 1.000

Robust RMSEA 0.031 90 Percent confidence interval - lower 0.012 90 Percent confidence interval - upper 0.050

Standardized Root Mean Square Residual:

SRMR 0.025 0.025

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
ine5 1.000 0.916 0.639 ine7 1.000 0.916 0.690 ine10 1.000 0.916 0.679 ine12 1.000 0.916 0.673 RIsi =~
sisoet5 1.000 0.603 0.477 sisoet7 1.000 0.603 0.460 sisoet10 1.000 0.603 0.412 sisoet12 1.000 0.603 0.409 wad5 =~
ine5 1.000 1.103 0.769 wad7 =~
ine7 1.000 0.960 0.723 wad10 =~
ine10 1.000 0.989 0.734 wad12 =~
ine12 1.000 1.006 0.740 wsi5 =~
sisoet5 1.000 1.111 0.879 wsi7 =~
sisoet7 1.000 1.164 0.888 wsi10 =~
sisoet10 1.000 1.335 0.911 wsi12 =~
sisoet12 1.000 1.347 0.913

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.140 0.047 2.954 0.003 0.161 0.161 wsi5 0.049 0.037 1.320 0.187 0.056 0.056 wsi7 ~
wad5 0.029 0.041 0.701 0.483 0.027 0.027 wsi5 0.116 0.062 1.865 0.062 0.111 0.111 wad10 ~
wad7 0.029 0.064 0.452 0.651 0.028 0.028 wsi7 0.013 0.038 0.355 0.723 0.016 0.016 wsi10 ~
wad7 0.104 0.068 1.531 0.126 0.075 0.075 wsi7 0.104 0.059 1.777 0.076 0.091 0.091 wad12 ~
wad10 0.252 0.057 4.417 0.000 0.248 0.248 wsi10 -0.020 0.034 -0.609 0.543 -0.027 -0.027 wsi12 ~
wad10 0.037 0.066 0.568 0.570 0.027 0.027 wsi10 0.212 0.046 4.635 0.000 0.211 0.211

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.277 0.065 4.280 0.000 0.226 0.226 .wad7 ~~
.wsi7 0.183 0.054 3.401 0.001 0.168 0.168 .wad10 ~~
.wsi10 0.345 0.076 4.541 0.000 0.264 0.264 .wad12 ~~
.wsi12 0.262 0.060 4.384 0.000 0.204 0.204 RIad ~~
RIsi 0.310 0.041 7.645 0.000 0.561 0.561

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .ine5 0.877 0.030 29.074 0.000 0.877 0.612 .ine7 0.718 0.029 25.133 0.000 0.718 0.541 .ine10 0.725 0.029 25.062 0.000 0.725 0.538 .ine12 0.673 0.029 23.121 0.000 0.673 0.494 .sisoet5 0.626 0.028 22.699 0.000 0.626 0.495 .sisoet7 0.649 0.029 22.268 0.000 0.649 0.495 .sisoet10 0.751 0.034 21.927 0.000 0.751 0.513 .sisoet12 0.780 0.035 22.123 0.000 0.780 0.529 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 0.839 0.067 12.498 0.000 1.000 1.000 RIsi 0.364 0.052 6.957 0.000 1.000 1.000 wad5 1.216 0.096 12.702 0.000 1.000 1.000 wsi5 1.235 0.126 9.825 0.000 1.000 1.000 .wad7 0.890 0.076 11.692 0.000 0.967 0.967 .wsi7 1.335 0.125 10.711 0.000 0.986 0.986 .wad10 0.978 0.101 9.702 0.000 0.999 0.999 .wsi10 1.754 0.153 11.489 0.000 0.984 0.984 .wad12 0.954 0.080 11.963 0.000 0.941 0.941 .wsi12 1.727 0.141 12.215 0.000 0.952 0.952 .ine5 0.000 0.000 0.000 .ine7 0.000 0.000 0.000 .ine10 0.000 0.000 0.000 .ine12 0.000 0.000 0.000 .sisoet5 0.000 0.000 0.000 .sisoet7 0.000 0.000 0.000 .sisoet10 0.000 0.000 0.000 .sisoet12 0.000 0.000 0.000

#Table of model fit 
RICLPMsit_inat.fit.summary.fit <- table.model.fit(RICLPMsit_inat.fit.summary)
#Table of regression coefficients and covariances (concurrent associations)
RICLPMsit_inat.fit.summary.reg <- table.model.coef(model = RICLPMsit_inat.fit.summary, type = "RICLPM", constraints = "No")

RI-CLPM Constraints over time

Fixed autoregressive and cross-lagged relations over time (RICLPMsit_inat2)

a = lag in ad b = lag in si c = cross lag ad->si d = cross lag si->ad

Constraining all lag and crosslag parameters at once (RICLPMsit2)

RICLPMsit_inat2 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + d*wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ a*wad7 + d*wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ a*wad10 + d*wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsit_inat2.fit <- lavaan(RICLPMsit_inat2, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 

RICLPMsit_inat2.fit.summary <- summary(RICLPMsit_inat2.fit, 
                                      fit.measures = TRUE,
                                      standardized = TRUE)

lavaan 0.6-10 ended normally after 51 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35 Number of equality constraints 8

Number of observations 2232 Number of missing patterns 39

Model Test User Model: Standard Robust Test Statistic 88.733 42.831 Degrees of freedom 17 17 P-value (Chi-square) 0.000 0.001 Scaling correction factor 2.072 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 3819.728 1859.380 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 2.054

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.981 0.986 Tucker-Lewis Index (TLI) 0.969 0.977

Robust Comparative Fit Index (CFI) 0.986 Robust Tucker-Lewis Index (TLI) 0.977

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -26728.730 -26728.730 Scaling correction factor 2.098 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.469 for the MLR correction

Akaike (AIC) 53511.459 53511.459 Bayesian (BIC) 53665.647 53665.647 Sample-size adjusted Bayesian (BIC) 53579.863 53579.863

Root Mean Square Error of Approximation:

RMSEA 0.043 0.026 90 Percent confidence interval - lower 0.035 0.019 90 Percent confidence interval - upper 0.053 0.033 P-value RMSEA <= 0.05 0.876 1.000

Robust RMSEA 0.038 90 Percent confidence interval - lower 0.024 90 Percent confidence interval - upper 0.052

Standardized Root Mean Square Residual:

SRMR 0.032 0.032

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
ine5 1.000 0.897 0.626 ine7 1.000 0.897 0.666 ine10 1.000 0.897 0.655 ine12 1.000 0.897 0.675 RIsi =~
sisoet5 1.000 0.592 0.468 sisoet7 1.000 0.592 0.446 sisoet10 1.000 0.592 0.404 sisoet12 1.000 0.592 0.405 wad5 =~
ine5 1.000 1.115 0.779 wad7 =~
ine7 1.000 1.003 0.746 wad10 =~
ine10 1.000 1.035 0.756 wad12 =~
ine12 1.000 0.980 0.738 wsi5 =~
sisoet5 1.000 1.118 0.884 wsi7 =~
sisoet7 1.000 1.187 0.895 wsi10 =~
sisoet10 1.000 1.339 0.915 wsi12 =~
sisoet12 1.000 1.336 0.914

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 (a) 0.182 0.035 5.161 0.000 0.203 0.203 wsi5 (d) 0.012 0.021 0.557 0.577 0.013 0.013 wsi7 ~
wad5 (c) 0.063 0.033 1.924 0.054 0.060 0.060 wsi5 (b) 0.153 0.036 4.233 0.000 0.144 0.144 wad10 ~
wad7 (a) 0.182 0.035 5.161 0.000 0.177 0.177 wsi7 (d) 0.012 0.021 0.557 0.577 0.014 0.014 wsi10 ~
wad7 (c) 0.063 0.033 1.924 0.054 0.048 0.048 wsi7 (b) 0.153 0.036 4.233 0.000 0.136 0.136 wad12 ~
wad10 (a) 0.182 0.035 5.161 0.000 0.192 0.192 wsi10 (d) 0.012 0.021 0.557 0.577 0.016 0.016 wsi12 ~
wad10 (c) 0.063 0.033 1.924 0.054 0.049 0.049 wsi10 (b) 0.153 0.036 4.233 0.000 0.153 0.153

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.274 0.060 4.598 0.000 0.220 0.220 .wad7 ~~
.wsi7 0.200 0.048 4.148 0.000 0.174 0.174 .wad10 ~~
.wsi10 0.346 0.072 4.819 0.000 0.256 0.256 .wad12 ~~
.wsi12 0.258 0.059 4.370 0.000 0.204 0.204 RIad ~~
RIsi 0.304 0.039 7.794 0.000 0.572 0.572

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .ine5 0.877 0.030 29.074 0.000 0.877 0.613 .ine7 0.718 0.029 25.117 0.000 0.718 0.534 .ine10 0.725 0.029 25.039 0.000 0.725 0.529 .ine12 0.673 0.029 23.091 0.000 0.673 0.507 .sisoet5 0.626 0.028 22.655 0.000 0.626 0.495 .sisoet7 0.650 0.029 22.252 0.000 0.650 0.490 .sisoet10 0.750 0.034 21.977 0.000 0.750 0.512 .sisoet12 0.781 0.035 22.090 0.000 0.781 0.535 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 0.804 0.065 12.406 0.000 1.000 1.000 RIsi 0.350 0.053 6.655 0.000 1.000 1.000 wad5 1.244 0.094 13.241 0.000 1.000 1.000 wsi5 1.250 0.120 10.387 0.000 1.000 1.000 .wad7 0.963 0.069 14.000 0.000 0.958 0.958 .wsi7 1.369 0.115 11.921 0.000 0.972 0.972 .wad10 1.036 0.092 11.322 0.000 0.968 0.968 .wsi10 1.752 0.153 11.426 0.000 0.977 0.977 .wad12 0.924 0.076 12.151 0.000 0.961 0.961 .wsi12 1.730 0.143 12.080 0.000 0.970 0.970 .ine5 0.000 0.000 0.000 .ine7 0.000 0.000 0.000 .ine10 0.000 0.000 0.000 .ine12 0.000 0.000 0.000 .sisoet5 0.000 0.000 0.000 .sisoet7 0.000 0.000 0.000 .sisoet10 0.000 0.000 0.000 .sisoet12 0.000 0.000 0.000

#Table of model fit 
RICLPMsit_inat2.fit.summary.fit <- table.model.fit(RICLPMsit_inat2.fit.summary)
RICLPMsit_inat2.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
RICLPMsit_inat2.fit.summary.reg <- table.model.coef(model = RICLPMsit_inat2.fit.summary, type = "RICLPM", constraints = "Yes")
RICLPMsit_inat2.fit.summary.reg %>% select(lhs, op, rhs, pvalue, std.all) %>% mutate_if(is.numeric, round, 3)
lavTestLRT(RICLPMsit_inat.fit, RICLPMsit_inat2.fit, method = "satorra.bentler.2010")

RICLPMsit_inat2 is significantly worse fit compared to RICLPMsit_inat. However, we should compare the model fit as all other RICLPMsit have been slightly different on the 2a lag.

Comparison of fit statistics: Model2 Model Robust Comparative Fit Index (CFI) 0.985 0.994 (0.009) Robust Tucker-Lewis Index (TLI) 0.976 0.983 (0.007) Robust RMSEA 0.037 0.025 (0.012) SRMR 0.032 0.031 (0.001) All change in fit statistics is less than 0.01 (apart form RMSEA) - we can accept these constraints. Also the other significance levels are almost non-significant (chi square is likely inflated with large sample size) 2a p = 0.007 2b p = 0.225 2c p = 0.731 2d p = 0.107

Constraining lag in ADHD parameter (RICLPMsit_inat2a)

Now we will test the constraints based on the following steps recommended by Curran and Bauer: 1. Estimate the baseline model where all parameters are freely estimated (The basic RI-CLPM) 2. Impose equlaity constraints on one set of stabilities (within variable lags). Use LRT tests to see if he fit becomes significantly worse. 3. Impose equality constraints on the next set of stabilities. Compare this to wither model 1 (baseline/basic) if step 2 was significant. Compare to model 2 if step 2 was non-significant. Non-sig LRT = not significantly worse fit 4. Repeat for first set of cross-lags 5. Repeat for second set of cross-lags

RICLPMsit_inat2a <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  
  wad10 ~ a*wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  
  wad12 ~ a*wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsit_inat2a.fit <- lavaan(RICLPMsit_inat2a, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsit_inat.fit, RICLPMsit_inat2a.fit, method = "satorra.bentler.2010")

Constraining lag in social isolation parameter (RICLPMsit_inat2b)

RICLPMsit_inat2b <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + b*wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + b*wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsit_inat2b.fit <- lavaan(RICLPMsit_inat2b, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsit_inat.fit, RICLPMsit_inat2b.fit, method = "satorra.bentler.2010")

RICLPMsit_inat2b is NOT significantly worse fit (p = 0.2259) compared to RICLPMsit_inat. Now we will constrain the other set of stability coefficients: cross lag ad->si (c) comparing to b!

Constraining cross lag in ADHD to social isolation parameter (RICLPMsit_inat2c)

RICLPMsit_inat2c <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsit_inat2c.fit <- lavaan(RICLPMsit_inat2c, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsit_inat2b.fit, RICLPMsit_inat2c.fit, method = "satorra.bentler.2010")

RICLPMsit_inat2c is NOT significantly worse fit compared to RICLPMsit_inat (p = 0.7317). Now we will constrain the other set of stability coefficients: cross lag si->ad (d) but comparing that model to this one.

Constraining cross lag in social isolation to ADHD parameter (RICLPMsit_inat2d) - compared to RICLPMsit_inat2c, b,c,d lags constrained

Thus, constraining both sets of lags are tested in this model.

RICLPMsit_inat2d <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + d*wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ wad7 + d*wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ wad10 + d*wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsit_inat2d.fit <- lavaan(RICLPMsit_inat2d, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 

RICLPMsit_inat2d.fit.summary <- summary(RICLPMsit_inat2d.fit, 
                                fit.measures = TRUE,
                                standardized = TRUE)

lavaan 0.6-10 ended normally after 69 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35 Number of equality constraints 6

Number of observations 2232 Number of missing patterns 39

Model Test User Model: Standard Robust Test Statistic 53.726 27.105 Degrees of freedom 15 15 P-value (Chi-square) 0.000 0.028 Scaling correction factor 1.982 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 3819.728 1859.380 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 2.054

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.990 0.993 Tucker-Lewis Index (TLI) 0.981 0.988

Robust Comparative Fit Index (CFI) 0.994 Robust Tucker-Lewis Index (TLI) 0.988

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -26711.226 -26711.226 Scaling correction factor 2.255 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.469 for the MLR correction

Akaike (AIC) 53480.452 53480.452 Bayesian (BIC) 53646.061 53646.061 Sample-size adjusted Bayesian (BIC) 53553.923 53553.923

Root Mean Square Error of Approximation:

RMSEA 0.034 0.019 90 Percent confidence interval - lower 0.024 0.010 90 Percent confidence interval - upper 0.044 0.027 P-value RMSEA <= 0.05 0.996 1.000

Robust RMSEA 0.027 90 Percent confidence interval - lower 0.009 90 Percent confidence interval - upper 0.043

Standardized Root Mean Square Residual:

SRMR 0.030 0.030

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
ine5 1.000 0.918 0.639 ine7 1.000 0.918 0.692 ine10 1.000 0.918 0.681 ine12 1.000 0.918 0.673 RIsi =~
sisoet5 1.000 0.596 0.471 sisoet7 1.000 0.596 0.450 sisoet10 1.000 0.596 0.407 sisoet12 1.000 0.596 0.408 wad5 =~
ine5 1.000 1.103 0.769 wad7 =~
ine7 1.000 0.957 0.722 wad10 =~
ine10 1.000 0.986 0.732 wad12 =~
ine12 1.000 1.007 0.739 wsi5 =~
sisoet5 1.000 1.118 0.882 wsi7 =~
sisoet7 1.000 1.182 0.893 wsi10 =~
sisoet10 1.000 1.338 0.913 wsi12 =~
sisoet12 1.000 1.332 0.913

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.150 0.048 3.131 0.002 0.173 0.173 wsi5 (d) 0.006 0.022 0.265 0.791 0.007 0.007 wsi7 ~
wad5 (c) 0.043 0.034 1.274 0.203 0.040 0.040 wsi5 (b) 0.154 0.036 4.271 0.000 0.146 0.146 wad10 ~
wad7 0.018 0.062 0.292 0.770 0.018 0.018 wsi7 (d) 0.006 0.022 0.265 0.791 0.007 0.007 wsi10 ~
wad7 (c) 0.043 0.034 1.274 0.203 0.031 0.031 wsi7 (b) 0.154 0.036 4.271 0.000 0.136 0.136 wad12 ~
wad10 0.241 0.056 4.343 0.000 0.236 0.236 wsi10 (d) 0.006 0.022 0.265 0.791 0.008 0.008 wsi12 ~
wad10 (c) 0.043 0.034 1.274 0.203 0.032 0.032 wsi10 (b) 0.154 0.036 4.271 0.000 0.155 0.155

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.264 0.060 4.402 0.000 0.214 0.214 .wad7 ~~
.wsi7 0.174 0.050 3.461 0.001 0.158 0.158 .wad10 ~~
.wsi10 0.336 0.071 4.717 0.000 0.257 0.257 .wad12 ~~
.wsi12 0.258 0.058 4.470 0.000 0.201 0.201 RIad ~~
RIsi 0.323 0.039 8.176 0.000 0.590 0.590

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .ine5 0.877 0.030 29.074 0.000 0.877 0.611 .ine7 0.718 0.029 25.136 0.000 0.718 0.541 .ine10 0.725 0.029 25.070 0.000 0.725 0.539 .ine12 0.673 0.029 23.126 0.000 0.673 0.494 .sisoet5 0.626 0.028 22.656 0.000 0.626 0.494 .sisoet7 0.650 0.029 22.253 0.000 0.650 0.491 .sisoet10 0.750 0.034 21.977 0.000 0.750 0.512 .sisoet12 0.781 0.035 22.120 0.000 0.781 0.535 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 0.842 0.066 12.735 0.000 1.000 1.000 RIsi 0.355 0.053 6.770 0.000 1.000 1.000 wad5 1.217 0.095 12.755 0.000 1.000 1.000 wsi5 1.249 0.120 10.409 0.000 1.000 1.000 .wad7 0.887 0.077 11.534 0.000 0.970 0.970 .wsi7 1.362 0.114 11.907 0.000 0.975 0.975 .wad10 0.971 0.099 9.808 0.000 1.000 1.000 .wsi10 1.753 0.154 11.398 0.000 0.979 0.979 .wad12 0.957 0.079 12.043 0.000 0.943 0.943 .wsi12 1.726 0.142 12.142 0.000 0.972 0.972 .ine5 0.000 0.000 0.000 .ine7 0.000 0.000 0.000 .ine10 0.000 0.000 0.000 .ine12 0.000 0.000 0.000 .sisoet5 0.000 0.000 0.000 .sisoet7 0.000 0.000 0.000 .sisoet10 0.000 0.000 0.000 .sisoet12 0.000 0.000 0.000

#Table of model fit 
RICLPMsit_inat2d.fit.summary.fit <- table.model.fit(RICLPMsit_inat2d.fit.summary)
RICLPMsit_inat2d.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
RICLPMsit_inat2d.fit.summary.reg <- table.model.coef(model = RICLPMsit_inat2d.fit.summary, type = "RICLPM", constraints = "Yes")
RICLPMsit_inat2d.fit.summary.reg
lavTestLRT(RICLPMsit_inat2c.fit, RICLPMsit_inat2d.fit, method = "satorra.bentler.2010") #comparing to other best fitting model

RICLPMsit_inat2d is NOT significantly worse fit compared to RICLPMsit_inat2c (p = 0.1073).

The best fitting model (mother report and total ADHD symptoms) is currently RICLPMsit_inat2d where cross-lags and isolation autolag are constrained to be equal across time.


Constrained grand means (RICLPMsit_inat3)

The grand means are the means over all units per occasion. These grand means may be time-varying, or may be fixed to be invariant over time.

RICLPMsit_inat3 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoet5 + 1*sisoet7 + 1*sisoet10 + 1*sisoet12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoet5
  wsi7 =~ 1*sisoet7
  wsi10 =~ 1*sisoet10
  wsi12 =~ 1*sisoet12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
  
  # Constrain the grand means over time
  ine5 + ine7 + ine10 + ine12 ~ mad*1
  sisoet5 + sisoet7 + sisoet10 + sisoet12 ~ msi*1
'
RICLPMsit_inat3.fit <- lavaan(RICLPMsit_inat3, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsit_inat.fit, RICLPMsit_inat3.fit, method = "satorra.bentler.2010") 

If the grand means cannot be constrained to be invariant over time, this implies that on average there is some change in this variable over time, which may reflect some occasion-specific effect, or a developmental trend. By allowing the means to freely vary over time, we account for such average changes over time.

This makes sense as we have shown variation in social isolation over time and other literature has shown variation in ADHD over time.


RI-CLPM: Total ADHD is combined mother and teacher report, isolation is mother report

Cross-lagged panel model (CLPMsim)

CLPMsim <- '
  # Estimate the lagged effects between the observed variables.
  tadhde7 + sisoem7 ~ tadhde5 + sisoem5
  tadhde10 + sisoem10 ~ tadhde7 + sisoem7
  tadhde12 + sisoem12 ~ tadhde10 + sisoem10

  # Estimate the covariance between the observed variables at the first wave. 
  tadhde5 ~~ sisoem5 # Covariance
  
  # Estimate the covariances between the residuals of the observed variables.
  tadhde7 ~~ sisoem7
  tadhde10 ~~ sisoem10
  tadhde12 ~~ sisoem12
  
  # Estimate the (residual) variance of the observed variables.
  tadhde5 ~~ tadhde5 # Variances
  sisoem5 ~~ sisoem5 
  tadhde7 ~~ tadhde7 # Residual variances
  sisoem7 ~~ sisoem7 
  tadhde10 ~~ tadhde10 
  sisoem10 ~~ sisoem10 
  tadhde12 ~~ tadhde12 
  sisoem12 ~~ sisoem12 
'
CLPMsim.fit <- lavaan(CLPMsim, 
                   data = dat, 
                   missing = 'ML',
                   meanstructure = TRUE, 
                   int.ov.free = TRUE,
                   se = "robust",
                   estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic 
                   ) 

CLPMsim.fit.summary <- summary(CLPMsim.fit, 
                            fit.measures = TRUE,
                            standardized = TRUE)

lavaan 0.6-10 ended normally after 35 iterations

Estimator ML Optimization method NLMINB Number of model parameters 32

Number of observations 2232 Number of missing patterns 12

Model Test User Model: Standard Robust Test Statistic 445.757 245.908 Degrees of freedom 12 12 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.813 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 6310.850 3248.832 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.942

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.931 0.927 Tucker-Lewis Index (TLI) 0.839 0.831

Robust Comparative Fit Index (CFI) 0.932 Robust Tucker-Lewis Index (TLI) 0.842

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -33903.029 -33903.029 Scaling correction factor 2.304 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.170 for the MLR correction

Akaike (AIC) 67870.058 67870.058 Bayesian (BIC) 68052.799 68052.799 Sample-size adjusted Bayesian (BIC) 67951.130 67951.130

Root Mean Square Error of Approximation:

RMSEA 0.127 0.093 90 Percent confidence interval - lower 0.117 0.086 90 Percent confidence interval - upper 0.138 0.101 P-value RMSEA <= 0.05 0.000 0.000

Robust RMSEA 0.126 90 Percent confidence interval - lower 0.112 90 Percent confidence interval - upper 0.140

Standardized Root Mean Square Residual:

SRMR 0.064 0.064

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all tadhde7 ~
tadhde5 0.543 0.027 20.435 0.000 0.543 0.578 sisoem5 0.081 0.042 1.932 0.053 0.081 0.045 sisoem7 ~
tadhde5 0.068 0.013 5.160 0.000 0.068 0.122 sisoem5 0.520 0.036 14.461 0.000 0.520 0.488 tadhde10 ~
tadhde7 0.518 0.030 17.282 0.000 0.518 0.542 sisoem7 0.111 0.046 2.423 0.015 0.111 0.069 sisoem10 ~
tadhde7 0.075 0.016 4.536 0.000 0.075 0.119 sisoem7 0.503 0.036 13.978 0.000 0.503 0.474 tadhde12 ~
tadhde10 0.648 0.033 19.477 0.000 0.648 0.630 sisoem10 0.067 0.039 1.736 0.083 0.067 0.043 sisoem12 ~
tadhde10 0.091 0.015 6.001 0.000 0.091 0.136 sisoem10 0.581 0.027 21.792 0.000 0.581 0.569

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all tadhde5 ~~
sisoem5 1.198 0.134 8.959 0.000 1.198 0.301 .tadhde7 ~~
.sisoem7 0.532 0.083 6.414 0.000 0.532 0.197 .tadhde10 ~~
.sisoem10 0.550 0.091 6.039 0.000 0.550 0.194 .tadhde12 ~~
.sisoem12 0.534 0.092 5.811 0.000 0.534 0.211

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .tadhde7 0.513 0.059 8.648 0.000 0.513 0.197 .sisoem7 0.329 0.036 9.121 0.000 0.329 0.214 .tadhde10 0.514 0.052 9.937 0.000 0.514 0.207 .sisoem10 0.464 0.037 12.633 0.000 0.464 0.286 .tadhde12 0.367 0.050 7.383 0.000 0.367 0.144 .sisoem12 0.267 0.033 8.116 0.000 0.267 0.161 tadhde5 2.250 0.059 38.460 0.000 2.250 0.814 sisoem5 0.974 0.030 31.975 0.000 0.974 0.677

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all tadhde5 7.641 0.397 19.265 0.000 7.641 1.000 sisoem5 2.069 0.126 16.360 0.000 2.069 1.000 .tadhde7 4.367 0.238 18.357 0.000 4.367 0.648 .sisoem7 1.670 0.093 17.951 0.000 1.670 0.711 .tadhde10 4.180 0.264 15.834 0.000 4.180 0.678 .sisoem10 1.922 0.105 18.246 0.000 1.922 0.726 .tadhde12 3.816 0.277 13.798 0.000 3.816 0.584 .sisoem12 1.675 0.102 16.375 0.000 1.675 0.608

#Table of model fit 
CLPMsim.fit.summary.fit <- table.model.fit(CLPMsim.fit.summary)
CLPMsim.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
CLPMsim.fit.summary.reg <- table.model.coef(model = CLPMsim.fit.summary, type = "CLPM", constraints = "No")
CLPMsim.fit.summary.reg %>% select(lhs, op, rhs, pvalue, std.all) %>% mutate_if(is.numeric, round, 3)

The basic RI-CLPM model (RICLPMsim)

The code for specifying the basic RI-CLPM is given below.

RICLPMsim <- '
  # Create between components (rando intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Estimate the lagged effects between the within-person centered variables
  wad7 + wsi7 ~ wad5 + wsi5
  wad10 + wsi10 ~ wad7 + wsi7
  wad12 + wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsim.fit <- lavaan(RICLPMsim,               # model
                     data = dat,           # data
                     missing = 'ML',       # how to handle missing data 
                     meanstructure = TRUE, # adds intercepts/means to the model for both observed and latent variables
                     se = "robust",        # robust standard errors
                     int.ov.free = TRUE,   # if FALSE, the intercepts of the observed variables are fixed to zero
                     estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
)

RICLPMsim.fit.summary <- summary(RICLPMsim.fit, 
                              fit.measures = TRUE,
                              standardized = TRUE)

lavaan 0.6-10 ended normally after 88 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35

Number of observations 2232 Number of missing patterns 12

Model Test User Model: Standard Robust Test Statistic 93.796 56.106 Degrees of freedom 9 9 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.672 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 6310.850 3248.832 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.942

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.987 0.985 Tucker-Lewis Index (TLI) 0.958 0.954

Robust Comparative Fit Index (CFI) 0.987 Robust Tucker-Lewis Index (TLI) 0.961

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -33727.048 -33727.048 Scaling correction factor 2.298 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.170 for the MLR correction

Akaike (AIC) 67524.097 67524.097 Bayesian (BIC) 67723.970 67723.970 Sample-size adjusted Bayesian (BIC) 67612.769 67612.769

Root Mean Square Error of Approximation:

RMSEA 0.065 0.048 90 Percent confidence interval - lower 0.053 0.039 90 Percent confidence interval - upper 0.077 0.058 P-value RMSEA <= 0.05 0.017 0.589

Robust RMSEA 0.063 90 Percent confidence interval - lower 0.048 90 Percent confidence interval - upper 0.079

Standardized Root Mean Square Residual:

SRMR 0.032 0.032

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
tadhde5 1.000 1.790 0.644 tadhde7 1.000 1.790 0.700 tadhde10 1.000 1.790 0.717 tadhde12 1.000 1.790 0.705 RIsi =~
sisoem5 1.000 0.911 0.621 sisoem7 1.000 0.911 0.602 sisoem10 1.000 0.911 0.561 sisoem12 1.000 0.911 0.555 wad5 =~
tadhde5 1.000 2.127 0.765 wad7 =~
tadhde7 1.000 1.828 0.714 wad10 =~
tadhde10 1.000 1.740 0.697 wad12 =~
tadhde12 1.000 1.802 0.709 wsi5 =~
sisoem5 1.000 1.149 0.784 wsi7 =~
sisoem7 1.000 1.207 0.798 wsi10 =~
sisoem10 1.000 1.342 0.828 wsi12 =~
sisoem12 1.000 1.363 0.832

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.221 0.041 5.372 0.000 0.257 0.257 wsi5 -0.020 0.067 -0.304 0.761 -0.013 -0.013 wsi7 ~
wad5 0.041 0.021 1.905 0.057 0.072 0.072 wsi5 0.240 0.059 4.096 0.000 0.229 0.229 wad10 ~
wad7 0.096 0.063 1.519 0.129 0.100 0.100 wsi7 0.081 0.078 1.046 0.296 0.056 0.056 wsi10 ~
wad7 0.033 0.034 0.964 0.335 0.044 0.044 wsi7 0.268 0.061 4.397 0.000 0.241 0.241 wad12 ~
wad10 0.281 0.065 4.291 0.000 0.271 0.271 wsi10 0.032 0.063 0.516 0.606 0.024 0.024 wsi12 ~
wad10 0.052 0.031 1.651 0.099 0.066 0.066 wsi10 0.421 0.043 9.711 0.000 0.414 0.414

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.451 0.124 3.642 0.000 0.184 0.184 .wad7 ~~
.wsi7 0.340 0.102 3.320 0.001 0.165 0.165 .wad10 ~~
.wsi10 0.412 0.118 3.496 0.000 0.184 0.184 .wad12 ~~
.wsi12 0.411 0.090 4.559 0.000 0.193 0.193 RIad ~~
RIsi 0.808 0.101 7.996 0.000 0.496 0.496

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .tadhde5 2.250 0.059 38.460 0.000 2.250 0.810 .tadhde7 1.813 0.055 32.730 0.000 1.813 0.709 .tadhde10 1.564 0.053 29.451 0.000 1.564 0.626 .tadhde12 1.453 0.055 26.667 0.000 1.453 0.572 .sisoem5 0.974 0.030 31.972 0.000 0.974 0.664 .sisoem7 0.987 0.033 30.134 0.000 0.987 0.653 .sisoem10 1.097 0.035 31.456 0.000 1.097 0.676 .sisoem12 1.048 0.036 29.457 0.000 1.048 0.639 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 3.203 0.236 13.598 0.000 1.000 1.000 RIsi 0.829 0.102 8.110 0.000 1.000 1.000 wad5 4.523 0.320 14.119 0.000 1.000 1.000 wsi5 1.321 0.128 10.309 0.000 1.000 1.000 .wad7 3.124 0.249 12.560 0.000 0.935 0.935 .wsi7 1.365 0.100 13.623 0.000 0.936 0.936 .wad10 2.983 0.319 9.358 0.000 0.985 0.985 .wsi10 1.686 0.113 14.907 0.000 0.936 0.936 .wad12 2.997 0.257 11.641 0.000 0.923 0.923 .wsi12 1.512 0.096 15.736 0.000 0.813 0.813 .tadhde5 0.000 0.000 0.000 .tadhde7 0.000 0.000 0.000 .tadhde10 0.000 0.000 0.000 .tadhde12 0.000 0.000 0.000 .sisoem5 0.000 0.000 0.000 .sisoem7 0.000 0.000 0.000 .sisoem10 0.000 0.000 0.000 .sisoem12 0.000 0.000 0.000

#Table of model fit 
RICLPMsim.fit.summary.fit <- table.model.fit(RICLPMsim.fit.summary)
#Table of regression coefficients and covariances (concurrent associations)
RICLPMsim.fit.summary.reg <- table.model.coef(model = RICLPMsim.fit.summary, type = "RICLPM", constraints = "No")

Constraining all lag and crosslag parameters at once (RICLPMsim2)

RICLPMsim2 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + d*wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ a*wad7 + d*wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ a*wad10 + d*wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsim2.fit <- lavaan(RICLPMsim2, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsim.fit, RICLPMsim2.fit, method = "satorra.bentler.2010")

RICLPMsim2 is significantly worse fit compared to RICLPMsim according to the Chi square test.

Constraining lag in ADHD parameter (RICLPMsim2a)

Now we will test the constraints based on the following steps recommended by Curran and Bauer: 1. Estimate the baseline model where all parameters are freely estimated (The basic RI-CLPM) 2. Impose equlaity constraints on one set of stabilities (within variable lags). Use LRT tests to see if he fit becomes significantly worse. 3. Impose equality constraints on the next set of stabilities. Compare this to wither model 1 (baseline/basic) if step 2 was significant. Compare to model 2 if step 2 was non-significant. Non-sig LRT = not significantly worse fit 4. Repeat for first set of cross-lags 5. Repeat for second set of cross-lags

RICLPMsim2a <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  
  wad10 ~ a*wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  
  wad12 ~ a*wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsim2a.fit <- lavaan(RICLPMsim2a, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsim.fit, RICLPMsim2a.fit, method = "satorra.bentler.2010")

Constraining lag in social isolation parameter (RICLPMsim2b)

RICLPMsim2b <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + b*wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + b*wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsim2b.fit <- lavaan(RICLPMsim2b, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsim.fit, RICLPMsim2b.fit, method = "satorra.bentler.2010")

RICLPMsim2b is significantly worse fit compared to RICLPMsim. Now we will constrain the other set of stability coefficients: cross lag ad->si (c)

Constraining cross lag in ADHD to social isolation parameter (RICLPMsim2c)

RICLPMsim2c <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ c*wad5 + wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ c*wad7 + wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ c*wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsim2c.fit <- lavaan(RICLPMsim2c, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsim.fit, RICLPMsim2c.fit, method = "satorra.bentler.2010")

RICLPMsim2c is NOT significantly worse fit compared to RICLPMsim (p = 0.8972). Now we will constrain the other set of stability coefficients: cross lag si->ad (d) but comparing that model to this one.

Constraining cross lag in social isolation to ADHD parameter (RICLPMsim2d) - compared to RICLPMsim2c

Thus, constraining both sets of lags are tested in this model.

RICLPMsim2d <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + d*wsi5 
  wsi7 ~ c*wad5 + wsi5
  
  wad10 ~ wad7 + d*wsi7
  wsi10 ~ c*wad7 + wsi7
  
  wad12 ~ wad10 + d*wsi10
  wsi12 ~ c*wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsim2d.fit <- lavaan(RICLPMsim2d, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 

RICLPMsim2d.fit.summary <- summary(RICLPMsim2d.fit, 
                                fit.measures = TRUE,
                                standardized = TRUE)

lavaan 0.6-10 ended normally after 83 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35 Number of equality constraints 4

Number of observations 2232 Number of missing patterns 12

Model Test User Model: Standard Robust Test Statistic 96.422 55.571 Degrees of freedom 13 13 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.735 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 6310.850 3248.832 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.942

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.987 0.987 Tucker-Lewis Index (TLI) 0.971 0.972

Robust Comparative Fit Index (CFI) 0.988 Robust Tucker-Lewis Index (TLI) 0.975

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -33728.361 -33728.361 Scaling correction factor 2.084 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.170 for the MLR correction

Akaike (AIC) 67518.723 67518.723 Bayesian (BIC) 67695.753 67695.753 Sample-size adjusted Bayesian (BIC) 67597.261 67597.261

Root Mean Square Error of Approximation:

RMSEA 0.054 0.038 90 Percent confidence interval - lower 0.044 0.031 90 Percent confidence interval - upper 0.064 0.046 P-value RMSEA <= 0.05 0.259 0.992

Robust RMSEA 0.050 90 Percent confidence interval - lower 0.037 90 Percent confidence interval - upper 0.064

Standardized Root Mean Square Residual:

SRMR 0.033 0.033

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
tadhde5 1.000 1.796 0.645 tadhde7 1.000 1.796 0.701 tadhde10 1.000 1.796 0.721 tadhde12 1.000 1.796 0.707 RIsi =~
sisoem5 1.000 0.907 0.618 sisoem7 1.000 0.907 0.600 sisoem10 1.000 0.907 0.560 sisoem12 1.000 0.907 0.555 wad5 =~
tadhde5 1.000 2.126 0.764 wad7 =~
tadhde7 1.000 1.829 0.714 wad10 =~
tadhde10 1.000 1.728 0.693 wad12 =~
tadhde12 1.000 1.794 0.707 wsi5 =~
sisoem5 1.000 1.156 0.787 wsi7 =~
sisoem7 1.000 1.209 0.800 wsi10 =~
sisoem10 1.000 1.341 0.828 wsi12 =~
sisoem12 1.000 1.361 0.832

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.216 0.041 5.296 0.000 0.251 0.251 wsi5 (d) 0.031 0.046 0.665 0.506 0.019 0.019 wsi7 ~
wad5 (c) 0.038 0.018 2.092 0.036 0.067 0.067 wsi5 0.247 0.057 4.342 0.000 0.237 0.237 wad10 ~
wad7 0.096 0.062 1.550 0.121 0.102 0.102 wsi7 (d) 0.031 0.046 0.665 0.506 0.021 0.021 wsi10 ~
wad7 (c) 0.038 0.018 2.092 0.036 0.052 0.052 wsi7 0.263 0.061 4.344 0.000 0.237 0.237 wad12 ~
wad10 0.273 0.063 4.314 0.000 0.263 0.263 wsi10 (d) 0.031 0.046 0.665 0.506 0.023 0.023 wsi12 ~
wad10 (c) 0.038 0.018 2.092 0.036 0.048 0.048 wsi10 0.423 0.043 9.784 0.000 0.417 0.417

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.472 0.116 4.066 0.000 0.192 0.192 .wad7 ~~
.wsi7 0.337 0.101 3.328 0.001 0.163 0.163 .wad10 ~~
.wsi10 0.394 0.104 3.806 0.000 0.177 0.177 .wad12 ~~
.wsi12 0.397 0.086 4.615 0.000 0.187 0.187 RIad ~~
RIsi 0.815 0.099 8.232 0.000 0.500 0.500

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .tadhde5 2.250 0.059 38.460 0.000 2.250 0.808 .tadhde7 1.813 0.055 32.726 0.000 1.813 0.707 .tadhde10 1.564 0.053 29.441 0.000 1.564 0.628 .tadhde12 1.453 0.055 26.664 0.000 1.453 0.573 .sisoem5 0.974 0.030 31.974 0.000 0.974 0.663 .sisoem7 0.987 0.033 30.139 0.000 0.987 0.653 .sisoem10 1.097 0.035 31.438 0.000 1.097 0.677 .sisoem12 1.048 0.036 29.438 0.000 1.048 0.641 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 3.225 0.234 13.806 0.000 1.000 1.000 RIsi 0.824 0.101 8.168 0.000 1.000 1.000 wad5 4.522 0.318 14.233 0.000 1.000 1.000 wsi5 1.336 0.126 10.570 0.000 1.000 1.000 .wad7 3.128 0.251 12.439 0.000 0.935 0.935 .wsi7 1.365 0.100 13.666 0.000 0.934 0.934 .wad10 2.952 0.312 9.469 0.000 0.988 0.988 .wsi10 1.685 0.112 15.028 0.000 0.937 0.937 .wad12 2.987 0.256 11.669 0.000 0.928 0.928 .wsi12 1.512 0.096 15.668 0.000 0.816 0.816 .tadhde5 0.000 0.000 0.000 .tadhde7 0.000 0.000 0.000 .tadhde10 0.000 0.000 0.000 .tadhde12 0.000 0.000 0.000 .sisoem5 0.000 0.000 0.000 .sisoem7 0.000 0.000 0.000 .sisoem10 0.000 0.000 0.000 .sisoem12 0.000 0.000 0.000

#Table of model fit 
RICLPMsim2d.fit.summary.fit <- table.model.fit(RICLPMsim2d.fit.summary)
RICLPMsim2d.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
RICLPMsim2d.fit.summary.reg <- table.model.coef(model = RICLPMsim2d.fit.summary, type = "RICLPM", constraints = "Yes")
RICLPMsim2d.fit.summary.reg %>% select(lhs, op, rhs, pvalue, std.all) %>% mutate_if(is.numeric, round, 3)
lavTestLRT(RICLPMsim2c.fit, RICLPMsim2d.fit, method = "satorra.bentler.2010") #comparing to other best fitting model

RICLPMsim2d is NOT significantly worse fit compared to RICLPMsim2c (p = 0.5699).

The best fitting model (mother report and total ADHD symptoms) is currently RICLPMsim2d where cross-lags are constrained to be equal across time.


Constrained grand means (RICLPMsim3)

The grand means are the means over all units per occasion. These grand means may be time-varying, or may be fixed to be invariant over time.

RICLPMsim3 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*tadhde5 + 1*tadhde7 + 1*tadhde10 + 1*tadhde12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*tadhde5
  wad7 =~ 1*tadhde7
  wad10 =~ 1*tadhde10 
  wad12 =~ 1*tadhde12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
  
  # Constrain the grand means over time
  tadhde5 + tadhde7 + tadhde10 + tadhde12 ~ mad*1
  sisoem5 + sisoem7 + sisoem10 + sisoem12 ~ msi*1
'
RICLPMsim3.fit <- lavaan(RICLPMsim3, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsim.fit, RICLPMsim3.fit, method = "satorra.bentler.2010") 

If the grand means cannot be constrained to be invariant over time, this implies that on average there is some change in this variable over time, which may reflect some occasion-specific effect, or a developmental trend. By allowing the means to freely vary over time, we account for such average changes over time.

This makes sense as we have shown variation in social isolation over time and other literature has shown variation in ADHD over time.


RI-CLPM: Hyperactive/Impulsive ADHD is combined mother and teacher report, isolation is mother report only

The basic RI-CLPM model (RICLPMsim_hyp)

The code for specifying the basic RI-CLPM is given below.

RICLPMsim_hyp <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Estimate the lagged effects between the within-person centered variables
  wad7 + wsi7 ~ wad5 + wsi5
  wad10 + wsi10 ~ wad7 + wsi7
  wad12 + wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsim_hyp.fit <- lavaan(RICLPMsim_hyp,       # model
                     data = dat,           # data
                     missing = 'ML',       # how to handle missing data 
                     meanstructure = TRUE, # adds intercepts/means to the model for both observed and latent variables
                     se = "robust",        # robust standard errors
                     int.ov.free = TRUE,   # if FALSE, the intercepts of the observed variables are fixed to zero
                     estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
)

RICLPMsim_hyp.fit.summary <- summary(RICLPMsim_hyp.fit, 
                                  fit.measures = TRUE,
                                  standardized = TRUE)

lavaan 0.6-10 ended normally after 70 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35

Number of observations 2232 Number of missing patterns 12

Model Test User Model: Standard Robust Test Statistic 80.917 50.672 Degrees of freedom 9 9 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.597 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 5863.459 3170.550 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.849

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.988 0.987 Tucker-Lewis Index (TLI) 0.962 0.959

Robust Comparative Fit Index (CFI) 0.989 Robust Tucker-Lewis Index (TLI) 0.964

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -29054.907 -29054.907 Scaling correction factor 2.183 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.063 for the MLR correction

Akaike (AIC) 58179.814 58179.814 Bayesian (BIC) 58379.687 58379.687 Sample-size adjusted Bayesian (BIC) 58268.487 58268.487

Root Mean Square Error of Approximation:

RMSEA 0.060 0.046 90 Percent confidence interval - lower 0.048 0.036 90 Percent confidence interval - upper 0.072 0.055 P-value RMSEA <= 0.05 0.080 0.760

Robust RMSEA 0.058 90 Percent confidence interval - lower 0.043 90 Percent confidence interval - upper 0.073

Standardized Root Mean Square Residual:

SRMR 0.029 0.029

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
hye5 1.000 0.979 0.609 hye7 1.000 0.979 0.660 hye10 1.000 0.979 0.703 hye12 1.000 0.979 0.688 RIsi =~
sisoem5 1.000 0.920 0.627 sisoem7 1.000 0.920 0.609 sisoem10 1.000 0.920 0.566 sisoem12 1.000 0.920 0.559 wad5 =~
hye5 1.000 1.277 0.793 wad7 =~
hye7 1.000 1.115 0.751 wad10 =~
hye10 1.000 0.991 0.711 wad12 =~
hye12 1.000 1.032 0.725 wsi5 =~
sisoem5 1.000 1.142 0.779 wsi7 =~
sisoem7 1.000 1.197 0.793 wsi10 =~
sisoem10 1.000 1.338 0.824 wsi12 =~
sisoem12 1.000 1.363 0.829

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.234 0.035 6.678 0.000 0.268 0.268 wsi5 0.001 0.039 0.015 0.988 0.001 0.001 wsi7 ~
wad5 0.039 0.034 1.156 0.248 0.041 0.041 wsi5 0.237 0.059 4.022 0.000 0.226 0.226 wad10 ~
wad7 0.118 0.052 2.266 0.023 0.133 0.133 wsi7 0.032 0.045 0.721 0.471 0.039 0.039 wsi10 ~
wad7 0.030 0.051 0.592 0.554 0.025 0.025 wsi7 0.265 0.063 4.241 0.000 0.237 0.237 wad12 ~
wad10 0.281 0.063 4.490 0.000 0.270 0.270 wsi10 -0.005 0.033 -0.161 0.872 -0.007 -0.007 wsi12 ~
wad10 0.095 0.053 1.799 0.072 0.069 0.069 wsi10 0.419 0.043 9.801 0.000 0.412 0.412

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.156 0.062 2.509 0.012 0.107 0.107 .wad7 ~~
.wsi7 0.168 0.058 2.921 0.003 0.135 0.135 .wad10 ~~
.wsi10 0.237 0.065 3.640 0.000 0.186 0.186 .wad12 ~~
.wsi12 0.189 0.050 3.773 0.000 0.154 0.154 RIad ~~
RIsi 0.414 0.056 7.423 0.000 0.460 0.460

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .hye5 1.371 0.034 40.447 0.000 1.371 0.852 .hye7 1.093 0.032 33.966 0.000 1.093 0.736 .hye10 0.835 0.030 28.196 0.000 0.835 0.599 .hye12 0.779 0.031 25.503 0.000 0.779 0.547 .sisoem5 0.974 0.030 31.970 0.000 0.974 0.664 .sisoem7 0.987 0.033 30.130 0.000 0.987 0.654 .sisoem10 1.097 0.035 31.457 0.000 1.097 0.675 .sisoem12 1.048 0.036 29.466 0.000 1.048 0.637 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 0.959 0.068 14.213 0.000 1.000 1.000 RIsi 0.846 0.101 8.354 0.000 1.000 1.000 wad5 1.631 0.098 16.670 0.000 1.000 1.000 wsi5 1.303 0.125 10.418 0.000 1.000 1.000 .wad7 1.155 0.086 13.470 0.000 0.928 0.928 .wsi7 1.354 0.102 13.335 0.000 0.945 0.945 .wad10 0.962 0.096 10.064 0.000 0.979 0.979 .wsi10 1.686 0.114 14.735 0.000 0.941 0.941 .wad12 0.989 0.082 12.027 0.000 0.928 0.928 .wsi12 1.513 0.096 15.822 0.000 0.815 0.815 .hye5 0.000 0.000 0.000 .hye7 0.000 0.000 0.000 .hye10 0.000 0.000 0.000 .hye12 0.000 0.000 0.000 .sisoem5 0.000 0.000 0.000 .sisoem7 0.000 0.000 0.000 .sisoem10 0.000 0.000 0.000 .sisoem12 0.000 0.000 0.000

#Table of model fit 
RICLPMsim_hyp.fit.summary.fit <- table.model.fit(RICLPMsim_hyp.fit.summary)
#Table of regression coefficients and covariances (concurrent associations)
RICLPMsim_hyp.fit.summary.reg <- table.model.coef(model = RICLPMsim_hyp.fit.summary, type = "RICLPM", constraints = "No")

RI-CLPM Constraints over time

Fixed autoregressive and cross-lagged relations over time (RICLPMsim_hyp2)

a = lag in ad b = lag in si c = cross lag ad->si d = cross lag si->ad

Constraining all lag and crosslag parameters at once (RICLPMsim2)

RICLPMsim_hyp2 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + d*wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ a*wad7 + d*wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ a*wad10 + d*wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsim_hyp2.fit <- lavaan(RICLPMsim_hyp2, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsim_hyp.fit, RICLPMsim_hyp2.fit, method = "satorra.bentler.2010")

RICLPMsim_hyp2 is significantly worse fit compared to RICLPMsim_hyp.

Constraining lag in ADHD parameter (RICLPMsim_hyp2a)

Now we will test the constraints based on the following steps recommended by Curran and Bauer: 1. Estimate the baseline model where all parameters are freely estimated (The basic RI-CLPM) 2. Impose equlaity constraints on one set of stabilities (within variable lags). Use LRT tests to see if he fit becomes significantly worse. 3. Impose equality constraints on the next set of stabilities. Compare this to wither model 1 (baseline/basic) if step 2 was significant. Compare to model 2 if step 2 was non-significant. Non-sig LRT = not significantly worse fit 4. Repeat for first set of cross-lags 5. Repeat for second set of cross-lags

RICLPMsim_hyp2a <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  
  wad10 ~ a*wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  
  wad12 ~ a*wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsim_hyp2a.fit <- lavaan(RICLPMsim_hyp2a, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsim_hyp.fit, RICLPMsim_hyp2a.fit, method = "satorra.bentler.2010")

Constraining lag in social isolation parameter (RICLPMsim_hyp2b)

RICLPMsim_hyp2b <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + b*wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + b*wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsim_hyp2b.fit <- lavaan(RICLPMsim_hyp2b, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsim_hyp.fit, RICLPMsim_hyp2b.fit, method = "satorra.bentler.2010")

RICLPMsim_hyp2b is significantly worse fit compared to RICLPMsim_hyp. Now we will constrain the other set of stability coefficients: cross lag ad->si (c)

Constraining cross lag in ADHD to social isolation parameter (RICLPMsim_hyp2c)

RICLPMsim_hyp2c <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ c*wad5 + wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ c*wad7 + wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ c*wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsim_hyp2c.fit <- lavaan(RICLPMsim_hyp2c, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsim_hyp.fit, RICLPMsim_hyp2c.fit, method = "satorra.bentler.2010")

RICLPMsim_hyp2c is NOT significantly worse fit compared to RICLPMsim_hyp (p = 0.5396). Now we will constrain the other set of stability coefficients: cross lag si->ad (d) but comparing that model to this one.

Constraining cross lag in social isolation to ADHD parameter (RICLPMsim_hyp2d) - compared to RICLPMsim_hyp2c

Thus, constraining both sets of lags are tested in this model.

RICLPMsim_hyp2d <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + d*wsi5 
  wsi7 ~ c*wad5 + wsi5
  
  wad10 ~ wad7 + d*wsi7
  wsi10 ~ c*wad7 + wsi7
  
  wad12 ~ wad10 + d*wsi10
  wsi12 ~ c*wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsim_hyp2d.fit <- lavaan(RICLPMsim_hyp2d, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 

RICLPMsim_hyp2d.fit.summary <- summary(RICLPMsim_hyp2d.fit, 
                                fit.measures = TRUE,
                                standardized = TRUE)

lavaan 0.6-10 ended normally after 67 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35 Number of equality constraints 4

Number of observations 2232 Number of missing patterns 12

Model Test User Model: Standard Robust Test Statistic 83.995 51.270 Degrees of freedom 13 13 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.638 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 5863.459 3170.550 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.849

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.988 0.988 Tucker-Lewis Index (TLI) 0.974 0.974

Robust Comparative Fit Index (CFI) 0.989 Robust Tucker-Lewis Index (TLI) 0.977

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -29056.446 -29056.446 Scaling correction factor 1.985 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.063 for the MLR correction

Akaike (AIC) 58174.892 58174.892 Bayesian (BIC) 58351.922 58351.922 Sample-size adjusted Bayesian (BIC) 58253.430 58253.430

Root Mean Square Error of Approximation:

RMSEA 0.049 0.036 90 Percent confidence interval - lower 0.040 0.028 90 Percent confidence interval - upper 0.060 0.045 P-value RMSEA <= 0.05 0.513 0.997

Robust RMSEA 0.046 90 Percent confidence interval - lower 0.034 90 Percent confidence interval - upper 0.060

Standardized Root Mean Square Residual:

SRMR 0.030 0.030

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
hye5 1.000 0.984 0.610 hye7 1.000 0.984 0.662 hye10 1.000 0.984 0.707 hye12 1.000 0.984 0.692 RIsi =~
sisoem5 1.000 0.918 0.625 sisoem7 1.000 0.918 0.608 sisoem10 1.000 0.918 0.565 sisoem12 1.000 0.918 0.559 wad5 =~
hye5 1.000 1.278 0.792 wad7 =~
hye7 1.000 1.115 0.750 wad10 =~
hye10 1.000 0.984 0.707 wad12 =~
hye12 1.000 1.027 0.722 wsi5 =~
sisoem5 1.000 1.145 0.780 wsi7 =~
sisoem7 1.000 1.198 0.794 wsi10 =~
sisoem10 1.000 1.340 0.825 wsi12 =~
sisoem12 1.000 1.362 0.829

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.234 0.035 6.692 0.000 0.268 0.268 wsi5 (d) 0.008 0.026 0.319 0.750 0.009 0.009 wsi7 ~
wad5 (c) 0.046 0.029 1.582 0.114 0.049 0.049 wsi5 0.238 0.058 4.110 0.000 0.227 0.227 wad10 ~
wad7 0.116 0.052 2.244 0.025 0.131 0.131 wsi7 (d) 0.008 0.026 0.319 0.750 0.010 0.010 wsi10 ~
wad7 (c) 0.046 0.029 1.582 0.114 0.038 0.038 wsi7 0.262 0.061 4.325 0.000 0.235 0.235 wad12 ~
wad10 0.266 0.062 4.312 0.000 0.255 0.255 wsi10 (d) 0.008 0.026 0.319 0.750 0.011 0.011 wsi12 ~
wad10 (c) 0.046 0.029 1.582 0.114 0.033 0.033 wsi10 0.427 0.043 9.934 0.000 0.420 0.420

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.167 0.058 2.864 0.004 0.114 0.114 .wad7 ~~
.wsi7 0.166 0.056 2.965 0.003 0.133 0.133 .wad10 ~~
.wsi10 0.234 0.058 4.017 0.000 0.185 0.185 .wad12 ~~
.wsi12 0.179 0.048 3.736 0.000 0.147 0.147 RIad ~~
RIsi 0.418 0.055 7.651 0.000 0.463 0.463

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .hye5 1.371 0.034 40.447 0.000 1.371 0.850 .hye7 1.093 0.032 33.965 0.000 1.093 0.735 .hye10 0.835 0.030 28.179 0.000 0.835 0.600 .hye12 0.779 0.031 25.500 0.000 0.779 0.548 .sisoem5 0.974 0.030 31.971 0.000 0.974 0.664 .sisoem7 0.987 0.033 30.141 0.000 0.987 0.654 .sisoem10 1.097 0.035 31.437 0.000 1.097 0.675 .sisoem12 1.048 0.036 29.447 0.000 1.048 0.638 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 0.968 0.067 14.381 0.000 1.000 1.000 RIsi 0.842 0.100 8.392 0.000 1.000 1.000 wad5 1.633 0.097 16.764 0.000 1.000 1.000 wsi5 1.310 0.124 10.566 0.000 1.000 1.000 .wad7 1.152 0.086 13.407 0.000 0.928 0.928 .wsi7 1.354 0.100 13.507 0.000 0.943 0.943 .wad10 0.952 0.094 10.108 0.000 0.982 0.982 .wsi10 1.689 0.113 14.974 0.000 0.941 0.941 .wad12 0.985 0.082 12.019 0.000 0.934 0.934 .wsi12 1.515 0.096 15.714 0.000 0.817 0.817 .hye5 0.000 0.000 0.000 .hye7 0.000 0.000 0.000 .hye10 0.000 0.000 0.000 .hye12 0.000 0.000 0.000 .sisoem5 0.000 0.000 0.000 .sisoem7 0.000 0.000 0.000 .sisoem10 0.000 0.000 0.000 .sisoem12 0.000 0.000 0.000

#Table of model fit 
RICLPMsim_hyp2d.fit.summary.fit <- table.model.fit(RICLPMsim_hyp2d.fit.summary)
RICLPMsim_hyp2d.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
RICLPMsim_hyp2d.fit.summary.reg <- table.model.coef(model = RICLPMsim_hyp2d.fit.summary, type = "RICLPM", constraints = "Yes")
RICLPMsim_hyp2d.fit.summary.reg %>% select(lhs, op, rhs, pvalue, std.all) %>% mutate_if(is.numeric, round, 3)
lavTestLRT(RICLPMsim_hyp2c.fit, RICLPMsim_hyp2d.fit, method = "satorra.bentler.2010") #comparing to other best fitting model

RICLPMsim_hyp2d is NOT significantly worse fit compared to RICLPMsim_hyp2c (0.7596).

The best fitting model (mother report and total ADHD symptoms) is currently RICLPMsim_hyp2d where cross-lags are constrained to be equal across time.

Constrained grand means (RICLPMsim_hyp3)

The grand means are the means over all units per occasion. These grand means may be time-varying, or may be fixed to be invariant over time.

RICLPMsim_hyp3 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*hye5 + 1*hye7 + 1*hye10 + 1*hye12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*hye5
  wad7 =~ 1*hye7
  wad10 =~ 1*hye10 
  wad12 =~ 1*hye12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
  
  # Constrain the grand means over time
  hye5 + hye7 + hye10 + hye12 ~ mad*1
  sisoem5 + sisoem7 + sisoem10 + sisoem12 ~ msi*1
'
RICLPMsim_hyp3.fit <- lavaan(RICLPMsim_hyp3, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsim_hyp.fit, RICLPMsim_hyp3.fit, method = "satorra.bentler.2010") 

If the grand means cannot be constrained to be invariant over time, this implies that on average there is some change in this variable over time, which may reflect some occasion-specific effect, or a developmental trend. By allowing the means to freely vary over time, we account for such average changes over time.

This makes sense as we have shown variation in social isolation over time and other literature has shown variation in ADHD over time.


RI-CLPM: Inattention ADHD is combined mother and teacher report, isolationis mother report only

The basic RI-CLPM model (RICLPMsim_inat)

The code for specifying the basic RI-CLPM is given below.

RICLPMsim_inat <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Estimate the lagged effects between the within-person centered variables
  wad7 + wsi7 ~ wad5 + wsi5
  wad10 + wsi10 ~ wad7 + wsi7
  wad12 + wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsim_inat.fit <- lavaan(RICLPMsim_inat,     # model
                     data = dat,           # data
                     missing = 'ML',       # how to handle missing data 
                     meanstructure = TRUE, # adds intercepts/means to the model for both observed and latent variables
                     se = "robust",        # robust standard errors
                     int.ov.free = TRUE,   # if FALSE, the intercepts of the observed variables are fixed to zero
                     estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
)

RICLPMsim_inat.fit.summary <- summary(RICLPMsim_inat.fit, 
                                    fit.measures = TRUE,
                                    standardized = TRUE)

lavaan 0.6-10 ended normally after 68 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35

Number of observations 2232 Number of missing patterns 12

Model Test User Model: Standard Robust Test Statistic 92.080 54.319 Degrees of freedom 9 9 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.695 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 5661.390 2947.753 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.921

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.985 0.984 Tucker-Lewis Index (TLI) 0.954 0.952

Robust Comparative Fit Index (CFI) 0.986 Robust Tucker-Lewis Index (TLI) 0.957

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -28468.323 -28468.323 Scaling correction factor 2.336 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.205 for the MLR correction

Akaike (AIC) 57006.646 57006.646 Bayesian (BIC) 57206.519 57206.519 Sample-size adjusted Bayesian (BIC) 57095.318 57095.318

Root Mean Square Error of Approximation:

RMSEA 0.064 0.047 90 Percent confidence interval - lower 0.053 0.038 90 Percent confidence interval - upper 0.077 0.057 P-value RMSEA <= 0.05 0.021 0.652

Robust RMSEA 0.062 90 Percent confidence interval - lower 0.047 90 Percent confidence interval - upper 0.078

Standardized Root Mean Square Residual:

SRMR 0.031 0.031

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
ine5 1.000 0.905 0.634 ine7 1.000 0.905 0.683 ine10 1.000 0.905 0.669 ine12 1.000 0.905 0.666 RIsi =~
sisoem5 1.000 0.908 0.620 sisoem7 1.000 0.908 0.601 sisoem10 1.000 0.908 0.560 sisoem12 1.000 0.908 0.554 wad5 =~
ine5 1.000 1.104 0.773 wad7 =~
ine7 1.000 0.968 0.730 wad10 =~
ine10 1.000 1.005 0.743 wad12 =~
ine12 1.000 1.015 0.746 wsi5 =~
sisoem5 1.000 1.148 0.784 wsi7 =~
sisoem7 1.000 1.208 0.799 wsi10 =~
sisoem10 1.000 1.344 0.829 wsi12 =~
sisoem12 1.000 1.366 0.833

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.162 0.050 3.223 0.001 0.185 0.185 wsi5 -0.015 0.035 -0.429 0.668 -0.018 -0.018 wsi7 ~
wad5 0.091 0.043 2.122 0.034 0.083 0.083 wsi5 0.236 0.059 3.967 0.000 0.224 0.224 wad10 ~
wad7 0.045 0.063 0.716 0.474 0.044 0.044 wsi7 0.051 0.039 1.304 0.192 0.062 0.062 wsi10 ~
wad7 0.082 0.060 1.357 0.175 0.059 0.059 wsi7 0.268 0.061 4.404 0.000 0.241 0.241 wad12 ~
wad10 0.253 0.054 4.688 0.000 0.251 0.251 wsi10 0.039 0.031 1.271 0.204 0.052 0.052 wsi12 ~
wad10 0.068 0.051 1.338 0.181 0.050 0.050 wsi10 0.429 0.044 9.768 0.000 0.422 0.422

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.280 0.070 3.976 0.000 0.221 0.221 .wad7 ~~
.wsi7 0.167 0.054 3.094 0.002 0.150 0.150 .wad10 ~~
.wsi10 0.180 0.062 2.908 0.004 0.138 0.138 .wad12 ~~
.wsi12 0.232 0.048 4.800 0.000 0.192 0.192 RIad ~~
RIsi 0.397 0.050 7.986 0.000 0.483 0.483

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .ine5 0.877 0.030 29.074 0.000 0.877 0.614 .ine7 0.718 0.029 25.141 0.000 0.718 0.542 .ine10 0.725 0.029 25.048 0.000 0.725 0.536 .ine12 0.673 0.029 23.126 0.000 0.673 0.495 .sisoem5 0.974 0.030 31.973 0.000 0.974 0.665 .sisoem7 0.987 0.033 30.134 0.000 0.987 0.653 .sisoem10 1.097 0.035 31.456 0.000 1.097 0.676 .sisoem12 1.048 0.036 29.448 0.000 1.048 0.639 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 0.819 0.066 12.331 0.000 1.000 1.000 RIsi 0.825 0.102 8.088 0.000 1.000 1.000 wad5 1.218 0.098 12.448 0.000 1.000 1.000 wsi5 1.319 0.129 10.258 0.000 1.000 1.000 .wad7 0.906 0.079 11.497 0.000 0.967 0.967 .wsi7 1.365 0.100 13.633 0.000 0.935 0.935 .wad10 1.002 0.101 9.955 0.000 0.993 0.993 .wsi10 1.687 0.113 14.990 0.000 0.934 0.934 .wad12 0.958 0.079 12.119 0.000 0.930 0.930 .wsi12 1.518 0.097 15.582 0.000 0.813 0.813 .ine5 0.000 0.000 0.000 .ine7 0.000 0.000 0.000 .ine10 0.000 0.000 0.000 .ine12 0.000 0.000 0.000 .sisoem5 0.000 0.000 0.000 .sisoem7 0.000 0.000 0.000 .sisoem10 0.000 0.000 0.000 .sisoem12 0.000 0.000 0.000

#Table of model fit 
RICLPMsim_inat.fit.summary.fit <- table.model.fit(RICLPMsim_inat.fit.summary)
#Table of regression coefficients and covariances (concurrent associations)
RICLPMsim_inat.fit.summary.reg <- table.model.coef(model = RICLPMsim_inat.fit.summary, type = "RICLPM", constraints = "No")

RI-CLPM Constraints over time

Fixed autoregressive and cross-lagged relations over time (RICLPMsim_inat2)

a = lag in ad b = lag in si c = cross lag ad->si d = cross lag si->ad

Constraining all lag and crosslag parameters at once (RICLPMsim2)

RICLPMsim_inat2 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + d*wsi5 
  wsi7 ~ c*wad5 + b*wsi5
  
  wad10 ~ a*wad7 + d*wsi7
  wsi10 ~ c*wad7 + b*wsi7
  
  wad12 ~ a*wad10 + d*wsi10
  wsi12 ~ c*wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsim_inat2.fit <- lavaan(RICLPMsim_inat2, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 

RICLPMsim_inat2.fit.summary <- summary(RICLPMsim_inat2.fit, 
                                      fit.measures = TRUE,
                                      standardized = TRUE)

lavaan 0.6-10 ended normally after 43 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35 Number of equality constraints 8

Number of observations 2232 Number of missing patterns 12

Model Test User Model: Standard Robust Test Statistic 155.511 83.816 Degrees of freedom 17 17 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.855 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 5661.390 2947.753 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.921

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.975 0.977 Tucker-Lewis Index (TLI) 0.960 0.962

Robust Comparative Fit Index (CFI) 0.978 Robust Tucker-Lewis Index (TLI) 0.964

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -28500.039 -28500.039 Scaling correction factor 1.870 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.205 for the MLR correction

Akaike (AIC) 57054.077 57054.077 Bayesian (BIC) 57208.265 57208.265 Sample-size adjusted Bayesian (BIC) 57122.481 57122.481

Root Mean Square Error of Approximation:

RMSEA 0.060 0.042 90 Percent confidence interval - lower 0.052 0.036 90 Percent confidence interval - upper 0.069 0.049 P-value RMSEA <= 0.05 0.022 0.976

Robust RMSEA 0.057 90 Percent confidence interval - lower 0.045 90 Percent confidence interval - upper 0.070

Standardized Root Mean Square Residual:

SRMR 0.041 0.041

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
ine5 1.000 0.892 0.624 ine7 1.000 0.892 0.661 ine10 1.000 0.892 0.651 ine12 1.000 0.892 0.672 RIsi =~
sisoem5 1.000 0.857 0.582 sisoem7 1.000 0.857 0.552 sisoem10 1.000 0.857 0.523 sisoem12 1.000 0.857 0.540 wad5 =~
ine5 1.000 1.116 0.781 wad7 =~
ine7 1.000 1.012 0.750 wad10 =~
ine10 1.000 1.041 0.759 wad12 =~
ine12 1.000 0.982 0.740 wsi5 =~
sisoem5 1.000 1.198 0.813 wsi7 =~
sisoem7 1.000 1.294 0.834 wsi10 =~
sisoem10 1.000 1.398 0.852 wsi12 =~
sisoem12 1.000 1.335 0.841

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 (a) 0.189 0.036 5.220 0.000 0.208 0.208 wsi5 (d) 0.024 0.024 1.000 0.317 0.028 0.028 wsi7 ~
wad5 (c) 0.069 0.032 2.172 0.030 0.059 0.059 wsi5 (b) 0.364 0.046 7.983 0.000 0.337 0.337 wad10 ~
wad7 (a) 0.189 0.036 5.220 0.000 0.183 0.183 wsi7 (d) 0.024 0.024 1.000 0.317 0.030 0.030 wsi10 ~
wad7 (c) 0.069 0.032 2.172 0.030 0.050 0.050 wsi7 (b) 0.364 0.046 7.983 0.000 0.337 0.337 wad12 ~
wad10 (a) 0.189 0.036 5.220 0.000 0.200 0.200 wsi10 (d) 0.024 0.024 1.000 0.317 0.034 0.034 wsi12 ~
wad10 (c) 0.069 0.032 2.172 0.030 0.054 0.054 wsi10 (b) 0.364 0.046 7.983 0.000 0.381 0.381

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.304 0.069 4.406 0.000 0.227 0.227 .wad7 ~~
.wsi7 0.187 0.050 3.722 0.000 0.156 0.156 .wad10 ~~
.wsi10 0.166 0.059 2.804 0.005 0.124 0.124 .wad12 ~~
.wsi12 0.217 0.048 4.523 0.000 0.184 0.184 RIad ~~
RIsi 0.394 0.051 7.680 0.000 0.515 0.515

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .ine5 0.877 0.030 29.074 0.000 0.877 0.614 .ine7 0.719 0.029 25.126 0.000 0.719 0.533 .ine10 0.725 0.029 25.026 0.000 0.725 0.529 .ine12 0.673 0.029 23.090 0.000 0.673 0.507 .sisoem5 0.974 0.030 31.978 0.000 0.974 0.661 .sisoem7 0.987 0.033 30.131 0.000 0.987 0.636 .sisoem10 1.097 0.035 31.427 0.000 1.097 0.669 .sisoem12 1.048 0.036 29.433 0.000 1.048 0.661 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 0.795 0.065 12.271 0.000 1.000 1.000 RIsi 0.735 0.103 7.133 0.000 1.000 1.000 wad5 1.246 0.095 13.137 0.000 1.000 1.000 wsi5 1.436 0.127 11.305 0.000 1.000 1.000 .wad7 0.976 0.071 13.752 0.000 0.953 0.953 .wsi7 1.464 0.098 14.979 0.000 0.874 0.874 .wad10 1.044 0.092 11.339 0.000 0.964 0.964 .wsi10 1.715 0.116 14.726 0.000 0.878 0.878 .wad12 0.924 0.076 12.187 0.000 0.957 0.957 .wsi12 1.508 0.099 15.185 0.000 0.846 0.846 .ine5 0.000 0.000 0.000 .ine7 0.000 0.000 0.000 .ine10 0.000 0.000 0.000 .ine12 0.000 0.000 0.000 .sisoem5 0.000 0.000 0.000 .sisoem7 0.000 0.000 0.000 .sisoem10 0.000 0.000 0.000 .sisoem12 0.000 0.000 0.000

#Table of model fit 
RICLPMsim_inat2.fit.summary.fit <- table.model.fit(RICLPMsim_inat2.fit.summary)
RICLPMsim_inat2.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
RICLPMsim_inat2.fit.summary.reg <- table.model.coef(model = RICLPMsim_inat2.fit.summary, type = "RICLPM", constraints = "Yes")
RICLPMsim_inat2.fit.summary.reg
lavTestLRT(RICLPMsim_inat.fit, RICLPMsim_inat2.fit, method = "satorra.bentler.2010")

RICLPMsim_inat2 is significantly worse fit compared to RICLPMsim_inat.

Constraining lag in ADHD parameter (RICLPMsim_inat2a)

Now we will test the constraints based on the following steps recommended by Curran and Bauer: 1. Estimate the baseline model where all parameters are freely estimated (The basic RI-CLPM) 2. Impose equlaity constraints on one set of stabilities (within variable lags). Use LRT tests to see if he fit becomes significantly worse. 3. Impose equality constraints on the next set of stabilities. Compare this to wither model 1 (baseline/basic) if step 2 was significant. Compare to model 2 if step 2 was non-significant. Non-sig LRT = not significantly worse fit 4. Repeat for first set of cross-lags 5. Repeat for second set of cross-lags

RICLPMsim_inat2a <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ a*wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  
  wad10 ~ a*wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  
  wad12 ~ a*wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsim_inat2a.fit <- lavaan(RICLPMsim_inat2a, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsim_inat.fit, RICLPMsim_inat2a.fit, method = "satorra.bentler.2010")

Constraining lag in social isolation parameter (RICLPMsim_inat2b)

RICLPMsim_inat2b <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + b*wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + b*wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + b*wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsim_inat2b.fit <- lavaan(RICLPMsim_inat2b, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsim_inat.fit, RICLPMsim_inat2b.fit, method = "satorra.bentler.2010")

RICLPMsim_inat2b is significantly worse fit compared to RICLPMsim_inat. Now we will constrain the other set of stability coefficients: cross lag ad->si (c)

Constraining cross lag in ADHD to social isolation parameter (RICLPMsim_inat2c)

RICLPMsim_inat2c <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ c*wad5 + wsi5
  
  wad10 ~ wad7 + wsi7
  wsi10 ~ c*wad7 + wsi7
  
  wad12 ~ wad10 + wsi10
  wsi12 ~ c*wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsim_inat2c.fit <- lavaan(RICLPMsim_inat2c, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsim_inat.fit, RICLPMsim_inat2c.fit, method = "satorra.bentler.2010")

RICLPMsim_inat2c is NOT significantly worse fit compared to RICLPMsim_inat (p = 0.9349). Now we will constrain the other set of stability coefficients: cross lag si->ad (d) but comparing that model to this one.

Constraining cross lag in social isolation to ADHD parameter (RICLPMsim_inat2d) - compared to RICLPMsim_inat2c

Thus, constraining both sets of lags are tested in this model.

RICLPMsim_inat2d <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + d*wsi5 
  wsi7 ~ c*wad5 + wsi5
  
  wad10 ~ wad7 + d*wsi7
  wsi10 ~ c*wad7 + wsi7
  
  wad12 ~ wad10 + d*wsi10
  wsi12 ~ c*wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables.
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
'
RICLPMsim_inat2d.fit <- lavaan(RICLPMsim_inat2d, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 

RICLPMsim_inat2d.fit.summary <- summary(RICLPMsim_inat2d.fit, 
                                fit.measures = TRUE,
                                standardized = TRUE)

lavaan 0.6-10 ended normally after 63 iterations

Estimator ML Optimization method NLMINB Number of model parameters 35 Number of equality constraints 4

Number of observations 2232 Number of missing patterns 12

Model Test User Model: Standard Robust Test Statistic 96.440 56.207 Degrees of freedom 13 13 P-value (Chi-square) 0.000 0.000 Scaling correction factor 1.716 Yuan-Bentler correction (Mplus variant)

Model Test Baseline Model:

Test statistic 5661.390 2947.753 Degrees of freedom 28 28 P-value 0.000 0.000 Scaling correction factor 1.921

User Model versus Baseline Model:

Comparative Fit Index (CFI) 0.985 0.985 Tucker-Lewis Index (TLI) 0.968 0.968

Robust Comparative Fit Index (CFI) 0.987 Robust Tucker-Lewis Index (TLI) 0.972

Loglikelihood and Information Criteria:

Loglikelihood user model (H0) -28470.503 -28470.503 Scaling correction factor 2.134 for the MLR correction
Loglikelihood unrestricted model (H1) NA NA Scaling correction factor 2.205 for the MLR correction

Akaike (AIC) 57003.006 57003.006 Bayesian (BIC) 57180.036 57180.036 Sample-size adjusted Bayesian (BIC) 57081.544 57081.544

Root Mean Square Error of Approximation:

RMSEA 0.054 0.039 90 Percent confidence interval - lower 0.044 0.031 90 Percent confidence interval - upper 0.064 0.047 P-value RMSEA <= 0.05 0.259 0.991

Robust RMSEA 0.051 90 Percent confidence interval - lower 0.037 90 Percent confidence interval - upper 0.064

Standardized Root Mean Square Residual:

SRMR 0.032 0.032

Parameter Estimates:

Standard errors Sandwich Information bread Observed Observed information based on Hessian

Latent Variables: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad =~
ine5 1.000 0.909 0.636 ine7 1.000 0.909 0.684 ine10 1.000 0.909 0.673 ine12 1.000 0.909 0.668 RIsi =~
sisoem5 1.000 0.904 0.615 sisoem7 1.000 0.904 0.598 sisoem10 1.000 0.904 0.559 sisoem12 1.000 0.904 0.552 wad5 =~
ine5 1.000 1.102 0.772 wad7 =~
ine7 1.000 0.969 0.729 wad10 =~
ine10 1.000 0.998 0.739 wad12 =~
ine12 1.000 1.012 0.744 wsi5 =~
sisoem5 1.000 1.157 0.788 wsi7 =~
sisoem7 1.000 1.212 0.802 wsi10 =~
sisoem10 1.000 1.341 0.829 wsi12 =~
sisoem12 1.000 1.364 0.834

Regressions: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad7 ~
wad5 0.151 0.049 3.063 0.002 0.172 0.172 wsi5 (d) 0.024 0.023 1.024 0.306 0.028 0.028 wsi7 ~
wad5 (c) 0.072 0.032 2.284 0.022 0.066 0.066 wsi5 0.250 0.057 4.371 0.000 0.239 0.239 wad10 ~
wad7 0.044 0.063 0.693 0.488 0.042 0.042 wsi7 (d) 0.024 0.023 1.024 0.306 0.029 0.029 wsi10 ~
wad7 (c) 0.072 0.032 2.284 0.022 0.052 0.052 wsi7 0.266 0.062 4.327 0.000 0.241 0.241 wad12 ~
wad10 0.253 0.052 4.867 0.000 0.249 0.249 wsi10 (d) 0.024 0.023 1.024 0.306 0.031 0.031 wsi12 ~
wad10 (c) 0.072 0.032 2.284 0.022 0.053 0.053 wsi10 0.426 0.044 9.708 0.000 0.419 0.419

Covariances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all wad5 ~~
wsi5 0.290 0.066 4.396 0.000 0.227 0.227 .wad7 ~~
.wsi7 0.164 0.053 3.120 0.002 0.147 0.147 .wad10 ~~
.wsi10 0.161 0.056 2.871 0.004 0.125 0.125 .wad12 ~~
.wsi12 0.227 0.046 4.920 0.000 0.189 0.189 RIad ~~
RIsi 0.403 0.049 8.219 0.000 0.491 0.491

Intercepts: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .ine5 0.877 0.030 29.074 0.000 0.877 0.614 .ine7 0.718 0.029 25.140 0.000 0.718 0.541 .ine10 0.725 0.029 25.045 0.000 0.725 0.537 .ine12 0.673 0.029 23.123 0.000 0.673 0.495 .sisoem5 0.974 0.030 31.975 0.000 0.974 0.663 .sisoem7 0.987 0.033 30.132 0.000 0.987 0.653 .sisoem10 1.097 0.035 31.446 0.000 1.097 0.678 .sisoem12 1.048 0.036 29.434 0.000 1.048 0.641 RIad 0.000 0.000 0.000 RIsi 0.000 0.000 0.000 wad5 0.000 0.000 0.000 .wad7 0.000 0.000 0.000 .wad10 0.000 0.000 0.000 .wad12 0.000 0.000 0.000 wsi5 0.000 0.000 0.000 .wsi7 0.000 0.000 0.000 .wsi10 0.000 0.000 0.000 .wsi12 0.000 0.000 0.000

Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all RIad 0.826 0.066 12.514 0.000 1.000 1.000 RIsi 0.817 0.100 8.150 0.000 1.000 1.000 wad5 1.214 0.097 12.577 0.000 1.000 1.000 wsi5 1.340 0.126 10.596 0.000 1.000 1.000 .wad7 0.908 0.080 11.390 0.000 0.967 0.967 .wsi7 1.369 0.100 13.640 0.000 0.932 0.932 .wad10 0.993 0.099 10.037 0.000 0.997 0.997 .wsi10 1.683 0.113 14.935 0.000 0.935 0.935 .wad12 0.957 0.079 12.129 0.000 0.935 0.935 .wsi12 1.518 0.098 15.542 0.000 0.816 0.816 .ine5 0.000 0.000 0.000 .ine7 0.000 0.000 0.000 .ine10 0.000 0.000 0.000 .ine12 0.000 0.000 0.000 .sisoem5 0.000 0.000 0.000 .sisoem7 0.000 0.000 0.000 .sisoem10 0.000 0.000 0.000 .sisoem12 0.000 0.000 0.000

#Table of model fit 
RICLPMsim_inat2d.fit.summary.fit <- table.model.fit(RICLPMsim_inat2d.fit.summary)
RICLPMsim_inat2d.fit.summary.fit
#Table of regression coefficients and covariances (concurrent associations)
RICLPMsim_inat2d.fit.summary.reg <- table.model.coef(model = RICLPMsim_inat2d.fit.summary, type = "RICLPM", constraints = "Yes")
RICLPMsim_inat2d.fit.summary.reg %>% select(lhs, op, rhs, pvalue, std.all) %>% mutate_if(is.numeric, round, 3)
lavTestLRT(RICLPMsim_inat2c.fit, RICLPMsim_inat2d.fit, method = "satorra.bentler.2010") #comparing to other best fitting model

RICLPMsim_inat2d is NOT significantly worse fit compared to RICLPMsim_inat2c (0.2958).

The best fitting model (mother report and total ADHD symptoms) is currently RICLPMsim_inat2d where cross-lags are constrained to be equal across time.

Constrained grand means (RICLPMsim_inat3)

The grand means are the means over all units per occasion. These grand means may be time-varying, or may be fixed to be invariant over time.

RICLPMsim_inat3 <- '
  # Create between components (random intercepts treated as factors here)
  RIad =~ 1*ine5 + 1*ine7 + 1*ine10 + 1*ine12 #x
  RIsi =~ 1*sisoem5 + 1*sisoem7 + 1*sisoem10 + 1*sisoem12 #y

  # Create within-person centered variables
  wad5 =~ 1*ine5
  wad7 =~ 1*ine7
  wad10 =~ 1*ine10 
  wad12 =~ 1*ine12
  wsi5 =~ 1*sisoem5
  wsi7 =~ 1*sisoem7
  wsi10 =~ 1*sisoem10
  wsi12 =~ 1*sisoem12
  
  # Constrained lagged effects between the within-person centered variables. 
  wad7 ~ wad5 + wsi5 
  wsi7 ~ wad5 + wsi5
  wad10 ~ wad7 + wsi7
  wsi10 ~ wad7 + wsi7
  wad12 ~ wad10 + wsi10
  wsi12 ~ wad10 + wsi10
  
  # Estimate the covariance between the within-person centered variables at the first wave
  wad5 ~~ wsi5 # Covariance
  
  # Estimate the covariances between the residuals of the within-person centered variables (the innovations)
  wad7 ~~ wsi7
  wad10 ~~ wsi10
  wad12 ~~ wsi12
  
  # Estimate the variance and covariance of the random intercepts
  RIad ~~ RIad
  RIsi ~~ RIsi
  RIad ~~ RIsi
  
  # Estimate the (residual) variance of the within-person centered variables
  wad5 ~~ wad5 # Variances
  wsi5 ~~ wsi5 
  wad7 ~~ wad7 # Residual variances
  wsi7 ~~ wsi7 
  wad10 ~~ wad10 
  wsi10 ~~ wsi10 
  wad12 ~~ wad12 
  wsi12 ~~ wsi12
  
  # Constrain the grand means over time
  ine5 + ine7 + ine10 + ine12 ~ mad*1
  sisoem5 + sisoem7 + sisoem10 + sisoem12 ~ msi*1
'
RICLPMsim_inat3.fit <- lavaan(RICLPMsim_inat3, 
                      data = dat, 
                      missing = 'ML', 
                      meanstructure = TRUE, 
                      int.ov.free = TRUE,
                      se = "robust",
                      estimator = "MLR" #maximum likelihood with robust (Huber-White) standard errors and a scaled (Yuan-Bentler) and robust test statistic
                      ) 
lavTestLRT(RICLPMsim_inat.fit, RICLPMsim_inat3.fit, method = "satorra.bentler.2010") 

If the grand means cannot be constrained to be invariant over time, this implies that on average there is some change in this variable over time, which may reflect some occasion-specific effect, or a developmental trend. By allowing the means to freely vary over time, we account for such average changes over time.

This makes sense as we have shown variation in social isolation over time and other literature has shown variation in ADHD over time.


 

Work by Katherine N Thompson

katherine.n.thompson@kcl.ac.uk