This walk through proceeds through the following steps:

Examining the metadata

Survey duration

### Identify training and test observations (for later) ### 
train = sort(sample(nrow(DF_anly), nrow(DF_anly)*2/3))

###### Meta-data exploration ###### 
### Survey duration ###
# Mean duration 
hist(as.numeric(DF_anly$Duration))

mean(DF_anly$Duration)
## Time difference of 44.67338 mins
sd(DF_anly$Duration)
## [1] 17.60006
# Remove one outlier - must have forgot to submit the survey 
subset_duration <- DF_anly[which(DF_anly$Duration < 100), ]

# Duration by enumerator 
subset_duration %>% 
  group_by(Int_ID) %>%
  summarise(Mean = mean(Duration, na.rm=TRUE))
## # A tibble: 4 x 2
##   Int_ID Mean         
##   <chr>  <drtn>       
## 1 7vX    45.07692 mins
## 2 8vZ    41.90230 mins
## 3 oKF    42.81081 mins
## 4 YEX    44.52174 mins
# Duration by date and enumerator
subset_duration %>% 
  group_by(Date, Int_ID) %>%
  dplyr::summarise(Mean = mean(Duration, na.rm=TRUE)) -> meanda
## `summarise()` has grouped output by 'Date'. You can override using the `.groups` argument.
# Plot variation by enumerator over time 
ggplot(meanda, aes(x=as.Date(Date,"%d/%m/%Y"), y=as.numeric(Mean), group = Int_ID, colour = Int_ID)) +
  geom_line() + 
  xlab("") 

Patterns of missing data

# The observations and variables missing data 
vis_miss(DF_anly)+ 
  theme(axis.text.x = element_text(angle = 90)) + theme(text = element_text(size=8))

# Patterns of missingness between variables
gg_miss_upset(DF_anly, nsets = n_var_miss(DF_anly))

# High-level pattern of missingness 
gg_miss_var(DF_anly, show_pct = TRUE) + theme(text = element_text(size=8))

# Specific percentages of missing data 
round(table(is.na(DF_anly$SOCJOY))[2]/ nrow(DF_anly)*100,1)
## TRUE 
##  4.6

Exploring the individual variables and instruments

Survey language

table(DF_anly$LANG)
## 
##   English Kiswahili   Runyoro 
##        96       502        97

Location

table(DF_anly$LOCB)
## 
##   EWAF KADONE KADTWO   KARO   KYEM   MARA   NONE    NTC   NTWO   NYAB   NYAK 
##     41     52     55    154     41     82     50     92     61     36     31

Gender

table(DF_anly$SEX)
## 
## Female   Male 
##    414    281

Age

hist(DF_anly$DOBB)

Education

table(DF_anly$EDUCAT)
## 
##   No.educ Start.pri  Fin.prim Start.sec   Fin.sec   Bey.sec 
##        63       400        65        81        63        23

Marital status

table(DF_anly$MSTATUS)
## 
## Div.wid Mar.pol  Single 
##     117     532      46

Health

table(DF_anly$Health)
## 
##  V.bad    Bad   Fair   Good V.good 
##     31     75    364    159     66

Number of children

hist(DF_anly$HOUCHI)

Number of adults

hist(DF_anly$HOUADU)

Main source of income

table(DF_anly$ECCOCC)
## 
## Business    Other  Farming   Worker 
##       77        7      496      111

Asset ownership

## 
##     0     1 
## 11444 10096
ggplot(data=assets_DF_l, aes(x=key, y=value)) +
  geom_bar(stat="identity") + coord_flip()
## Warning: Removed 5 rows containing missing values (position_stack).

### Asset indexes constructed from the asset ownership variables ###
# Excluding some assets 
exclude <- c("BNSGAS" , "BNSFRID",  "BNSTANK", "BNSELEC" , "BNSCAR" , "BNSTELV" ,   "BNSMOTO" , "BNSBATT")
assets_sub <- setdiff(assets, exclude)

# Conduct the logistic principal component analysis (following https://cran.r-project.org/web/packages/logisticPCA/vignettes/logisticPCA.html)
# k = number of principal components to return
# m = value to approximate the saturated model
# ms = the different approximations to the saturated model m to try

# Optimise the number of components to extract based on how strongly it is associated with subjective financial strain (1-10 components)
association_strengh <- data.frame(K = NA, X.Intercept. = NA, Strain.L = NA, Strain.Q = NA, Strain.C = NA)
for (i in seq_along(1:10)){
  
  # Decide which m to use with cross validation 
  logpca_cv = cv.lpca(DF_stat.list[[1]][assets_sub], ks = i, ms = 1:10)

  # Fit the logistic PCA using the minimum m 
  logpca_asset = logisticPCA(DF_stat.list[[1]][assets_sub], k = i, m = which.min(logpca_cv))
  
  # Association between the first component score and subjective financial strain
  strain_asset <- data.frame(Asset = logpca_asset$PCs[,1], Strain = DF_stat.list[[1]]$Strain)
  association_strengh  <- rbind(association_strengh, data.frame(K = i, t(coef(lm(Asset ~ Strain, strain_asset)))))
}

# Select the k with that yielded the highest association with subjective financial strain 
association_strengh <- association_strengh[c(2:10),] 
K_op <- association_strengh[association_strengh$Strain.L == max(association_strengh$Strain.L, na.rm = T),]
K_op$K
## [1] 3
# Decide which m to use with cross validation using k that yielded the strongest estimate 
logpca_cv = cv.lpca(DF_stat.list[[1]][assets_sub], ks = K_op$K, ms = 1:10)
plot(logpca_cv)

# Fit the logistic PCA using the minimum m
logpca_asset = logisticPCA(DF_stat.list[[1]][assets_sub], k = K_op$K, m = which.min(logpca_cv))

# Summary
logpca_asset
## 695 rows and 23 columns
## Rank 3 solution with m = 6 
## 
## 42% of deviance explained
## 127 iterations to converge
# Plot against the sum of asset ownership, split into quantiles 
survey_response_group <- cut(
  rowSums(DF_stat.list[[1]][assets_sub]),
  breaks = quantile(rowSums(DF_stat.list[[1]][assets_sub]), c(0, 0.25, 0.5, 0.75, 1)),
  labels = c("Poorest", "Poor", "Wealthy", "Wealthiest"),
  right  = FALSE,
  include.lowest = TRUE)
plot(logpca_asset, type = "scores") + geom_point(aes(colour = survey_response_group)) 

# Plot PCA against subjective financial strain (remember the sign of PCA scores can be flipped)
plot(logpca_asset, type = "scores") + geom_point(aes(colour = DF_stat.list[[1]]$Strain)) 

# Association between the first component score and subjective financial strain
strain_asset <- data.frame(Asset = logpca_asset$PCs[,1], Strain = DF_stat.list[[1]]$Strain)
summary(lm(Asset ~ Strain, strain_asset))
## 
## Call:
## lm(formula = Asset ~ Strain, data = strain_asset)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -22.1987  -6.0206  -0.3054   5.8007  30.2354 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  -7.1525     0.4039 -17.707   <2e-16 ***
## Strain.L      7.5731     0.8930   8.480   <2e-16 ***
## Strain.Q     -0.4553     0.8079  -0.564    0.573    
## Strain.C      0.7290     0.7126   1.023    0.307    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9.354 on 691 degrees of freedom
## Multiple R-squared:  0.1095, Adjusted R-squared:  0.1056 
## F-statistic: 28.32 on 3 and 691 DF,  p-value: < 2.2e-16
# Repeat this model for each of the ten imputed datasets - extracting the 1st component in each
for (i in seq_along(1:length(DF_stat.list))) {
  # Fit the logistic PCA using the minimum m and optimal k
  logpca_asset <- logisticPCA(DF_stat.list[[i]][assets_sub], k = K_op$K, m = which.min(logpca_cv))
  DF_stat.list[[i]]$Assets_index <- logpca_asset$PCs[,1]
  
  # Switching the sign of the Asset index since it currently has an unintuitive direction 
  DF_stat.list[[i]]$Assets_index <- DF_stat.list[[i]]$Assets_index*-1
  
  # Scale and centrer 
  DF_stat.list[[i]]$Assets_index <- scale(DF_stat.list[[i]]$Assets_index, center = T, scale = T)
  
  # Create the economic poverty variable - simply the inverse of the asset index 
  DF_stat.list[[i]]$Economic_poverty <- DF_stat.list[[i]]$Assets_index*-1
}

# Check that switching the sign worked 
ggplot() + geom_point(aes(x = survey_response_group, y = DF_stat.list[[1]]$Assets_index)) 

ggplot() + geom_point(aes(x = survey_response_group, y = DF_stat.list[[1]]$Economic_poverty)) 

Subjective financial strain

table(DF_anly$Strain)
## 
## N.hard B.hard   Hard V.hard 
##     66    173    200    255

Subjective land size

table(DF_anly$Land_sub)
## 
## Very.small      Small     Middle      Large Very.large 
##        236        246        173         27          6

Estimated land size (ha)

hist(DF_anly$Land_size) # All data 

hist(DF_anly[which(DF_anly$Land_size <1),]$Land_size) # Under 1 hectare 

Growing sugar cane?

table(DF_anly$GROWSUG)
## 
##  No Yes 
## 586 107

Land size instrument

# Likert scaled plot 
HH::likert(Variable~.,land_prop, positive.order=TRUE,as.percent = TRUE,
           main="Land instrument",
           xlab="Percentage", ylab="Variable")

# Parallel analysis (with training data)
fa.parallel(land_DF[complete.cases(land_DF),][train,] , cor = "poly", fm="wls", fa="fa",   main = "Parallel analysis")

## Parallel analysis suggests that the number of factors =  1  and the number of components =  NA
# Factor analysis, with polychoric correlation, WLS estimator, and oblimin rotation 
fa_mod1 <- efaUnrotate(land_DF[train,], estimator = "WLS", nf = 1)

# Factor loadings 
summary(fa_mod1)
## lavaan 0.6-8 ended normally after 19 iterations
## 
##   Estimator                                        WLS
##   Optimization method                           NLMINB
##   Number of model parameters                        12
##                                                       
##                                                   Used       Total
##   Number of observations                           450         463
##                                                                   
## Model Test User Model:
##                                                       
##   Test statistic                                28.014
##   Degrees of freedom                                 9
##   P-value (Chi-square)                           0.001
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model        Unstructured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   factor1 =~                                          
##     LANDBIG (l1_1)    0.534    0.045   11.867    0.000
##     LANDBAS (l2_1)    0.931    0.047   19.700    0.000
##     LANDSTR (l3_1)    0.639    0.056   11.315    0.000
##     LANDWEL (l4_1)    0.836    0.052   16.161    0.000
##     LANDGOO (l5_1)    0.775    0.051   15.118    0.000
##     LANDSMA (l6_1)    0.494    0.057    8.618    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##     factor1           1.000                           
##    .LANDBIG           0.620    0.046   13.455    0.000
##    .LANDBAS           0.554    0.067    8.244    0.000
##    .LANDSTR           0.767    0.093    8.272    0.000
##    .LANDWELL          0.614    0.065    9.390    0.000
##    .LANDGOOD          0.667    0.061   10.872    0.000
##    .LANDSMALL         1.012    0.082   12.366    0.000
# RMSEA
fitmeasures(fa_mod1)["rmsea"]
##      rmsea 
## 0.06859556

This suggests good model fit, when using the training data.

# Confirmatory analysis with test data 
CFA_1 <- 'factor.1 =~ LANDBIG  + LANDBAS + LANDSTR + LANDWELL + LANDGOOD + LANDSMALL'
CFA_mod1 <- cfa(CFA_1, data = land_DF[-train,])

# Factor loadings 
summary(CFA_mod1)
## lavaan 0.6-8 ended normally after 25 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        12
##                                                       
##                                                   Used       Total
##   Number of observations                           224         232
##                                                                   
## Model Test User Model:
##                                                       
##   Test statistic                                32.527
##   Degrees of freedom                                 9
##   P-value (Chi-square)                           0.000
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   factor.1 =~                                         
##     LANDBIG           1.000                           
##     LANDBAS           1.374    0.209    6.581    0.000
##     LANDSTR           0.979    0.173    5.652    0.000
##     LANDWELL          1.661    0.239    6.947    0.000
##     LANDGOOD          1.363    0.207    6.575    0.000
##     LANDSMALL         0.747    0.170    4.398    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .LANDBIG           0.684    0.073    9.429    0.000
##    .LANDBAS           0.671    0.081    8.316    0.000
##    .LANDSTR           0.738    0.077    9.561    0.000
##    .LANDWELL          0.579    0.086    6.759    0.000
##    .LANDGOOD          0.664    0.080    8.330    0.000
##    .LANDSMALL         0.988    0.097   10.144    0.000
##     factor.1          0.276    0.072    3.852    0.000
# RMSEA - this suggests poor model fit 
fitmeasures(CFA_mod1)["rmsea"]
##     rmsea 
## 0.1080277

This suggests poor model fit, when using the test data. This is probably because of the small sample size.

# Factor analysis, with polychoric correlation, WLS estimator, and oblimin rotation using all data 
fa_mod1b <- efaUnrotate(land_DF, estimator = "WLS", nf = 1)

# Factor loadings - much better than the above
summary(fa_mod1b)
## lavaan 0.6-8 ended normally after 18 iterations
## 
##   Estimator                                        WLS
##   Optimization method                           NLMINB
##   Number of model parameters                        12
##                                                       
##                                                   Used       Total
##   Number of observations                           674         695
##                                                                   
## Model Test User Model:
##                                                       
##   Test statistic                                38.372
##   Degrees of freedom                                 9
##   P-value (Chi-square)                           0.000
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model        Unstructured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   factor1 =~                                          
##     LANDBIG (l1_1)    0.544    0.038   14.299    0.000
##     LANDBAS (l2_1)    0.850    0.041   20.949    0.000
##     LANDSTR (l3_1)    0.634    0.045   14.184    0.000
##     LANDWEL (l4_1)    0.825    0.042   19.834    0.000
##     LANDGOO (l5_1)    0.725    0.042   17.174    0.000
##     LANDSMA (l6_1)    0.498    0.046   10.926    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##     factor1           1.000                           
##    .LANDBIG           0.632    0.041   15.316    0.000
##    .LANDBAS           0.621    0.056   10.995    0.000
##    .LANDSTR           0.712    0.072    9.849    0.000
##    .LANDWELL          0.601    0.054   11.196    0.000
##    .LANDGOOD          0.686    0.050   13.657    0.000
##    .LANDSMALL         0.965    0.067   14.392    0.000
# RMSEA
fitmeasures(fa_mod1b)["rmsea"]
##      rmsea 
## 0.06963674

This suggests good model fit, when using all the data.

# Inspect fit statistics 
M2(Land_GRM, type = "C2", calcNULL = FALSE)
##             M2 df            p      RMSEA    RMSEA_5  RMSEA_95      SRMSR
## stats 57.37776  9 4.277959e-09 0.08800794 0.06702113 0.1103414 0.06047478
##             TLI       CFI
## stats 0.9405491 0.9643294
# Item information curve (or 'information and trace lines') and information and SE
plot(Land_GRM, type = 'infotrace', facet_items= F)

plot(Land_GRM, type = 'infoSE', facet_items= F) 

# Item characteristic curve (or 'item scoring traceline plots')
plot(Land_GRM, type = 'trace') 

# Extract ten sets of plausible values and inspect them 
Land_PV <- fscores(Land_GRM, plausible.draws = 10)
Land_PV_combined <- data.frame(Iteration = "1", Land = Land_PV[[1]] )
for (i in seq_along(2:length(Land_PV))){
  Land_PV_combined <- rbind(Land_PV_combined, data.frame(Iteration = as.factor(i+1), Land = Land_PV[[i+1]] ))
}
# Plot
ggplot(Land_PV_combined, aes(x=Land, color=Iteration)) +
  geom_density()

Forest dependency instrument

# Likert scaled plot 
HH::likert(Variable~.,fore_prop, positive.order=TRUE,as.percent = TRUE,
           main="Forest instrument",
           xlab="Percentage", ylab="Variable")

# Parallel analysis 
fa.parallel(fore_DF[complete.cases(fore_DF),][train,], cor = "poly", fm="wls", fa="fa",   main = "Parallel analysis")

## Parallel analysis suggests that the number of factors =  2  and the number of components =  NA
# Factor analysis, with polychoric correlation, WLS estimator, and oblimin rotation 
fa_mod2 <- efaUnrotate(fore_DF[train,], estimator = "WLS", nf = 2)

# Factor loadings 
summary(fa_mod2)
## lavaan 0.6-8 ended normally after 87 iterations
## 
##   Estimator                                        WLS
##   Optimization method                           NLMINB
##   Number of model parameters                        21
##                                                       
##                                                   Used       Total
##   Number of observations                           460         463
##                                                                   
## Model Test User Model:
##                                                       
##   Test statistic                                34.093
##   Degrees of freedom                                 8
##   P-value (Chi-square)                           0.000
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model        Unstructured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   factor1 =~                                          
##     FORELOT (l1_1)    0.316    0.074    4.278    0.000
##     FOREMON (l2_1)    0.961    0.065   14.685    0.000
##     FOREBUY (l3_1)    0.954    0.066   14.482    0.000
##     FOREBAD (l4_1)    0.624    0.082    7.641    0.000
##     FORFOOD (l5_1)    0.787    0.061   12.836    0.000
##     FORESUR (l6_1)    0.697    0.073    9.516    0.000
##     FORENO  (l7_1)    0.768    0.060   12.815    0.000
##   factor2 =~                                          
##     FORELOT (l1_2)    0.601    0.054   11.218    0.000
##     FOREMON (l2_2)   -0.392    0.058   -6.746    0.000
##     FOREBUY (l3_2)   -0.369    0.057   -6.489    0.000
##     FOREBAD (l4_2)    0.678    0.058   11.708    0.000
##     FORFOOD (l5_2)   -0.217    0.049   -4.396    0.000
##     FORESUR (l6_2)    0.632    0.054   11.640    0.000
##     FORENO  (l7_2)   -0.202    0.057   -3.565    0.000
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   factor1 ~~                                          
##     factor2           0.000                           
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##     factor1           1.000                           
##     factor2           1.000                           
##    .FORELOT           0.634    0.073    8.725    0.000
##    .FOREMON           0.354    0.079    4.510    0.000
##    .FOREBUY           0.477    0.091    5.236    0.000
##    .FOREBAD           0.821    0.104    7.907    0.000
##    .FORFOOD           0.681    0.079    8.609    0.000
##    .FORESUR           0.753    0.096    7.869    0.000
##    .FORENO            0.867    0.086   10.114    0.000
## 
## Constraints:
##                                                |Slack|
##     0-(1_2*1_1+2_2*2_1+3_2*3_1+4_2*4_1+5_2*5_    0.000
# RMSEA
fitmeasures(fa_mod2)["rmsea"]
##     rmsea 
## 0.0842969
# Confirmatory analysis with test data 
CFA_2 <- '
factor.1 =~ FOREMON + FOREBUY + FOREBAD + FORFOOD + FORESUR + FORENO
factor.2 =~ FORELOT + FOREBAD + FORESUR 
'
CFA_mod2 <- cfa(CFA_2, data = fore_DF[-train,])

# Factor loadings 
summary(CFA_mod2)
## lavaan 0.6-8 ended normally after 28 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        17
##                                                       
##                                                   Used       Total
##   Number of observations                           231         232
##                                                                   
## Model Test User Model:
##                                                       
##   Test statistic                                25.141
##   Degrees of freedom                                11
##   P-value (Chi-square)                           0.009
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   factor.1 =~                                         
##     FOREMON           1.000                           
##     FOREBUY           1.204    0.104   11.547    0.000
##     FOREBAD           0.328    0.097    3.395    0.001
##     FORFOOD           1.009    0.102    9.908    0.000
##     FORESUR           0.307    0.094    3.265    0.001
##     FORENO            1.081    0.102   10.560    0.000
##   factor.2 =~                                         
##     FORELOT           1.000                           
##     FOREBAD           0.561    0.144    3.909    0.000
##     FORESUR           0.879    0.216    4.071    0.000
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   factor.1 ~~                                         
##     factor.2          0.116    0.070    1.654    0.098
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .FOREMON           0.667    0.078    8.497    0.000
##    .FOREBUY           0.470    0.076    6.161    0.000
##    .FOREBAD           1.138    0.118    9.671    0.000
##    .FORFOOD           0.848    0.095    8.969    0.000
##    .FORESUR           0.753    0.141    5.333    0.000
##    .FORENO            0.735    0.088    8.355    0.000
##    .FORELOT           0.487    0.167    2.925    0.003
##     factor.1          0.799    0.131    6.118    0.000
##     factor.2          0.698    0.189    3.690    0.000
# RMSEA
fitmeasures(CFA_mod2)["rmsea"]
##     rmsea 
## 0.0745994

These results suggests good model fit.

# Graded response model 
Forest_GRM <- mirt(DF_stat.list[[1]][names_fore], model = CFA_2_mirt, "graded") 
## 
Iteration: 1, Log-Lik: -6021.173, Max-Change: 0.75574
Iteration: 2, Log-Lik: -5875.754, Max-Change: 0.75689
Iteration: 3, Log-Lik: -5807.541, Max-Change: 0.29903
Iteration: 4, Log-Lik: -5780.830, Max-Change: 0.25532
Iteration: 5, Log-Lik: -5767.929, Max-Change: 0.18657
Iteration: 6, Log-Lik: -5761.920, Max-Change: 0.16540
Iteration: 7, Log-Lik: -5758.909, Max-Change: 0.12808
Iteration: 8, Log-Lik: -5757.300, Max-Change: 0.09056
Iteration: 9, Log-Lik: -5756.411, Max-Change: 0.05654
Iteration: 10, Log-Lik: -5755.964, Max-Change: 0.04091
Iteration: 11, Log-Lik: -5755.738, Max-Change: 0.03089
Iteration: 12, Log-Lik: -5755.612, Max-Change: 0.02438
Iteration: 13, Log-Lik: -5755.474, Max-Change: 0.01420
Iteration: 14, Log-Lik: -5755.440, Max-Change: 0.00967
Iteration: 15, Log-Lik: -5755.417, Max-Change: 0.00776
Iteration: 16, Log-Lik: -5755.372, Max-Change: 0.00285
Iteration: 17, Log-Lik: -5755.366, Max-Change: 0.00164
Iteration: 18, Log-Lik: -5755.364, Max-Change: 0.00097
Iteration: 19, Log-Lik: -5755.363, Max-Change: 0.00087
Iteration: 20, Log-Lik: -5755.362, Max-Change: 0.00034
Iteration: 21, Log-Lik: -5755.362, Max-Change: 0.00017
Iteration: 22, Log-Lik: -5755.362, Max-Change: 0.00062
Iteration: 23, Log-Lik: -5755.362, Max-Change: 0.00059
Iteration: 24, Log-Lik: -5755.361, Max-Change: 0.00029
Iteration: 25, Log-Lik: -5755.361, Max-Change: 0.00013
Iteration: 26, Log-Lik: -5755.361, Max-Change: 0.00031
Iteration: 27, Log-Lik: -5755.361, Max-Change: 0.00040
Iteration: 28, Log-Lik: -5755.361, Max-Change: 0.00020
Iteration: 29, Log-Lik: -5755.361, Max-Change: 0.00043
Iteration: 30, Log-Lik: -5755.361, Max-Change: 0.00015
Iteration: 31, Log-Lik: -5755.361, Max-Change: 0.00034
Iteration: 32, Log-Lik: -5755.361, Max-Change: 0.00014
Iteration: 33, Log-Lik: -5755.361, Max-Change: 0.00030
Iteration: 34, Log-Lik: -5755.361, Max-Change: 0.00011
Iteration: 35, Log-Lik: -5755.361, Max-Change: 0.00026
Iteration: 36, Log-Lik: -5755.361, Max-Change: 0.00046
Iteration: 37, Log-Lik: -5755.361, Max-Change: 0.00018
Iteration: 38, Log-Lik: -5755.361, Max-Change: 0.00036
Iteration: 39, Log-Lik: -5755.361, Max-Change: 0.00014
Iteration: 40, Log-Lik: -5755.361, Max-Change: 0.00032
Iteration: 41, Log-Lik: -5755.360, Max-Change: 0.00012
Iteration: 42, Log-Lik: -5755.360, Max-Change: 0.00025
Iteration: 43, Log-Lik: -5755.360, Max-Change: 0.00010
Iteration: 44, Log-Lik: -5755.360, Max-Change: 0.00024
Iteration: 45, Log-Lik: -5755.360, Max-Change: 0.00008
# Inspect fit statistics 
M2(Forest_GRM, type = "C2", calcNULL = FALSE)
##             M2 df            p      RMSEA    RMSEA_5 RMSEA_95      SRMSR
## stats 74.74743 12 4.101008e-11 0.08680158 0.06849493 0.106091 0.04771463
##             TLI       CFI
## stats 0.9409071 0.9662326
# Item information curve (or 'information and trace lines') and information and SE
plot(Forest_GRM, type = 'infotrace', facet_items= F)

# plot(Forest_GRM, type = 'infoSE', facet_items= F) 

# Item characteristic curve (or 'item scoring traceline plots')
plot(Forest_GRM, type = 'trace', facet_items= T) 

# Extract ten sets of plausible values and inspect them 
Forest_PV <- fscores(Forest_GRM, plausible.draws = 10)
Forest_PV_combined <- data.frame(Iteration = "1", Forest = Forest_PV[[1]] )
for (i in seq_along(2:length(Forest_PV))){
  Forest_PV_combined <- rbind(Forest_PV_combined, data.frame(Iteration = as.factor(i+1), Forest = Forest_PV[[i+1]] ))
}
# Plot
ggplot(Forest_PV_combined, aes(x=Forest.1, color=Iteration)) +
  geom_density()

ggplot(Forest_PV_combined, aes(x=Forest.2, color=Iteration)) +
  geom_density()

Food Insecurity Experience Scale (FIES)

## 
##    0    1 
## 2134 3425
# Response to each item 
ggplot(data=FIES_DF_l, aes(x=factor(key, levels = rev(c(FIES_vars))), y=value)) +
  geom_bar(stat="identity") + coord_flip()
## Warning: Removed 1 rows containing missing values (position_stack).

# Inspect fit statistics 
M2(FIES_RM_2, type = "C2", calcNULL = FALSE)
##             M2 df p      RMSEA    RMSEA_5  RMSEA_95      SRMSR       TLI
## stats 125.6329 20 0 0.08723784 0.07293298 0.1020767 0.05090469 0.9594735
##             CFI
## stats 0.9710525
# Item information curve (or 'information and trace lines') and information and SE
plot(FIES_RM_2, type = 'infotrace', facet_items= F)

plot(FIES_RM_2, type = 'infoSE', facet_items= F) 

# Item characteristic curve (or 'item scoring traceline plots')
plot(FIES_RM_2, type = 'trace', facet_items = F) 

# Extract ten sets of plausible values and inspect them 
FIES_PV <- fscores(FIES_RM_2, plausible.draws = 10)
FIES_PV_combined <- data.frame(Iteration = "1", FIES = FIES_PV[[1]] )
for (i in seq_along(2:length(FIES_PV))){
  FIES_PV_combined <- rbind(FIES_PV_combined, data.frame(Iteration = as.factor(i+1), FIES = FIES_PV[[i+1]] ))
}
# Plot
ggplot(FIES_PV_combined, aes(x=FIES, color=Iteration)) +
  geom_density()

Social support instrument

# Likert scaled plot 
HH::likert(Variable~.,soci_prop, positive.order=TRUE,as.percent = TRUE,
           main="Social support instrument",
           xlab="Percentage", ylab="Variable")

# Parallel analysis 
fa.parallel(soci_DF[complete.cases(soci_DF),][train,], cor = "poly", fm="wls", fa="fa",   main = "Parallel analysis")

## Parallel analysis suggests that the number of factors =  2  and the number of components =  NA
# Factor analysis, with polychoric correlation, WLS estimator, and oblimin rotation 
fa_mod3 <- efaUnrotate(soci_DF[train,], estimator = "WLS", nf = 2)

# Factor loadings 
summary(fa_mod3)
## lavaan 0.6-8 ended normally after 147 iterations
## 
##   Estimator                                        WLS
##   Optimization method                           NLMINB
##   Number of model parameters                        18
##                                                       
##                                                   Used       Total
##   Number of observations                           439         463
##                                                                   
## Model Test User Model:
##                                                       
##   Test statistic                                15.157
##   Degrees of freedom                                 4
##   P-value (Chi-square)                           0.004
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model        Unstructured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   factor1 =~                                          
##     SOCNEED (l1_1)    0.282    0.067    4.218    0.000
##     SOCREAL (l2_1)    0.297    0.051    5.778    0.000
##     SOCEMOT (l3_1)    0.122    0.060    2.041    0.041
##     SOCTHIN (l4_1)   -0.381    0.081   -4.722    0.000
##     SOCTALK (l5_1)   -0.573    0.092   -6.228    0.000
##     SOCJOY  (l6_1)   -0.162    0.069   -2.355    0.019
##   factor2 =~                                          
##     SOCNEED (l1_2)    0.628    0.076    8.302    0.000
##     SOCREAL (l2_2)    0.899    0.065   13.910    0.000
##     SOCEMOT (l3_2)    0.953    0.058   16.362    0.000
##     SOCTHIN (l4_2)    0.530    0.059    9.041    0.000
##     SOCTALK (l5_2)    0.449    0.069    6.522    0.000
##     SOCJOY  (l6_2)    0.623    0.061   10.208    0.000
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   factor1 ~~                                          
##     factor2           0.000                           
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##     factor1           1.000                           
##     factor2           1.000                           
##    .SOCNEED           1.262    0.118   10.692    0.000
##    .SOCREAL           0.546    0.098    5.571    0.000
##    .SOCEMOT           0.447    0.070    6.397    0.000
##    .SOCTHING          0.624    0.087    7.214    0.000
##    .SOCTALK           0.369    0.119    3.100    0.002
##    .SOCJOY            0.902    0.093    9.721    0.000
## 
## Constraints:
##                                                |Slack|
##     0-(1_2*1_1+2_2*2_1+3_2*3_1+4_2*4_1+5_2*5_    0.000
# RMSEA
fitmeasures(fa_mod3)["rmsea"]
##      rmsea 
## 0.07979935

This suggests good model fit.

# The two factor confirmatory model 
CFA_3 <- '
factor.1 =~ SOCNEED + SOCREAL + SOCEMOT  + SOCJOY
factor.2 =~ SOCTALK + SOCTHING + SOCJOY
'
CFA_mod3 <- cfa(CFA_3, data = soci_DF[-train,])

# Factor loadings 
summary(CFA_mod3)
## lavaan 0.6-8 ended normally after 37 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        14
##                                                       
##                                                   Used       Total
##   Number of observations                           220         232
##                                                                   
## Model Test User Model:
##                                                       
##   Test statistic                                 8.139
##   Degrees of freedom                                 7
##   P-value (Chi-square)                           0.320
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   factor.1 =~                                         
##     SOCNEED           1.000                           
##     SOCREAL           1.436    0.175    8.185    0.000
##     SOCEMOT           1.421    0.174    8.181    0.000
##     SOCJOY            0.553    0.158    3.489    0.000
##   factor.2 =~                                         
##     SOCTALK           1.000                           
##     SOCTHING          2.313    0.515    4.487    0.000
##     SOCJOY            0.758    0.217    3.490    0.000
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   factor.1 ~~                                         
##     factor.2          0.184    0.054    3.413    0.001
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .SOCNEED           1.120    0.117    9.550    0.000
##    .SOCREAL           0.466    0.091    5.107    0.000
##    .SOCEMOT           0.479    0.091    5.288    0.000
##    .SOCJOY            1.223    0.125    9.820    0.000
##    .SOCTALK           0.772    0.089    8.655    0.000
##    .SOCTHING          0.209    0.270    0.775    0.439
##     factor.1          0.542    0.127    4.279    0.000
##     factor.2          0.260    0.083    3.153    0.002
# RMSEA 
fitmeasures(CFA_mod3)["rmsea"]
##      rmsea 
## 0.02720059
# Inspect fit statistics 
M2(Soci_GRM, type = "C2", calcNULL = FALSE)
##             M2 df            p      RMSEA    RMSEA_5  RMSEA_95     SRMSR
## stats 46.17575  8 2.200943e-07 0.08292187 0.06063759 0.1067953 0.0571233
##             TLI       CFI
## stats 0.9442286 0.9702552
# Item information curve (or 'information and trace lines') and information and SE
plot(Soci_GRM, type = 'infotrace', facet_items= F)

# plot(Soci_GRM, type = 'infoSE', facet_items= F) 

# Item characteristic curve (or 'item scoring traceline plots')
plot(Soci_GRM, type = 'trace') 

# Extract ten sets of plausible values and inspect them 
Soci_PV <- fscores(Soci_GRM, plausible.draws = 10)
Soci_PV_combined <- data.frame(Iteration = "1", Soci.1 = Soci_PV[[1]][,1], Soci.2 = Soci_PV[[1]][,2])
for (i in seq_along(2:length(Soci_PV))){
  Soci_PV_combined <- rbind(Soci_PV_combined, data.frame(Iteration = as.factor(i+1), Soci.1 = Soci_PV[[i+1]][,1], Soci.2 = Soci_PV[[i+1]][,2] ))
}

# Plot
ggplot(Soci_PV_combined, aes(x=Soci.1, color=Iteration)) +
  geom_density()

ggplot(Soci_PV_combined, aes(x=Soci.2, color=Iteration)) +
  geom_density()

Smoking

table(DF_anly$SMOKING)
## 
##  No Yes 
## 619  76

Drinking days per week

table(DF_anly$Alcohol)
## 
##   0   1   2   3   4   5   6   7 
## 561  52  42  19   5   2   1  13

PHQ-8 plus ‘strong throughts’

# Likert scaled plot 
HH::likert(Variable~.,PHQ8_prop, positive.order=TRUE,as.percent = TRUE,
           main="PHQ-8 & strong thoughts instrument",
           xlab="Percentage", ylab="Variable")

# How many crossed the diagnostic for referral? (In total, 20 agreed to be referred, and 6 actually went to the hospital.)
table(rowSums(PHQ8_DF[names_PHQ8], na.rm = T) > 17)
## 
## FALSE  TRUE 
##   655    40
# Parallel analysis 
fa.parallel(PHQ8_DF[complete.cases(PHQ8_DF),][train,], cor = "poly", fm="wls", fa="fa",   main = "Parallel analysis")

## Parallel analysis suggests that the number of factors =  1  and the number of components =  NA
# Factor analysis, with polychoric correlation, WLS estimator, and oblimin rotation 
fa_mod4 <- efaUnrotate(PHQ8_DF[train,], estimator = "WLS", nf = 1)

# Factor loadings 
summary(fa_mod4)
## lavaan 0.6-8 ended normally after 17 iterations
## 
##   Estimator                                        WLS
##   Optimization method                           NLMINB
##   Number of model parameters                        16
##                                                       
##   Number of observations                           463
##                                                       
## Model Test User Model:
##                                                       
##   Test statistic                                45.943
##   Degrees of freedom                                20
##   P-value (Chi-square)                           0.001
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model        Unstructured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   factor1 =~                                          
##     PH9INTE (l1_1)    0.532    0.046   11.592    0.000
##     PH9FEEL (l2_1)    0.641    0.041   15.468    0.000
##     PH9TROU (l3_1)    0.435    0.050    8.665    0.000
##     PH9TIRE (l4_1)    0.519    0.047   10.983    0.000
##     PH9APPE (l5_1)    0.564    0.046   12.392    0.000
##     PH9BADA (l6_1)    0.558    0.046   12.235    0.000
##     PH9CONC (l7_1)    0.511    0.045   11.275    0.000
##     PH9MOVI (l8_1)    0.429    0.051    8.402    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##     factor1           1.000                           
##    .PH9INTERST        0.725    0.052   13.971    0.000
##    .PH9FEEL           0.594    0.049   12.114    0.000
##    .PH9TROUBL         0.739    0.057   12.866    0.000
##    .PH9TIRED          0.702    0.052   13.598    0.000
##    .PH9APPETIT        0.679    0.053   12.919    0.000
##    .PH9BADABT         0.685    0.055   12.349    0.000
##    .PH9CONCEN         0.725    0.054   13.407    0.000
##    .PH9MOVING         0.649    0.054   12.130    0.000
# RMSEA
fitmeasures(fa_mod4)["rmsea"]
##     rmsea 
## 0.0529875

This suggests good model fit.

# Confirmatory analysis with test data 
CFA_4 <- '
factor.1 =~ PH9INTERST + PH9FEEL + PH9TROUBL + PH9TIRED + PH9APPETIT + PH9BADABT + PH9CONCEN + PH9MOVING
'
CFA_mod4 <- cfa(CFA_4, data = PHQ8_DF[-train,])

# Factor loadings 
summary(CFA_mod4)
## lavaan 0.6-8 ended normally after 29 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        16
##                                                       
##   Number of observations                           232
##                                                       
## Model Test User Model:
##                                                       
##   Test statistic                                33.872
##   Degrees of freedom                                20
##   P-value (Chi-square)                           0.027
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   factor.1 =~                                         
##     PH9INTERST        1.000                           
##     PH9FEEL           1.217    0.203    5.984    0.000
##     PH9TROUBL         1.002    0.193    5.189    0.000
##     PH9TIRED          1.165    0.203    5.741    0.000
##     PH9APPETIT        1.032    0.191    5.410    0.000
##     PH9BADABT         1.435    0.232    6.193    0.000
##     PH9CONCEN         1.251    0.211    5.937    0.000
##     PH9MOVING         1.223    0.204    5.989    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .PH9INTERST        0.862    0.086    9.972    0.000
##    .PH9FEEL           0.617    0.068    9.108    0.000
##    .PH9TROUBL         0.870    0.087    9.976    0.000
##    .PH9TIRED          0.726    0.077    9.481    0.000
##    .PH9APPETIT        0.769    0.078    9.816    0.000
##    .PH9BADABT         0.665    0.077    8.622    0.000
##    .PH9CONCEN         0.686    0.075    9.194    0.000
##    .PH9MOVING         0.620    0.068    9.099    0.000
##     factor.1          0.258    0.074    3.489    0.000
# RMSEA - this suggests poor model fit 
fitmeasures(CFA_mod4)["rmsea"]
##      rmsea 
## 0.05467807

This suggests poor model fit, so repeating the analysis with all data.

# Repeat the parallel analysis using all data 
fa.parallel(PHQ8_DF[complete.cases(PHQ8_DF),], cor = "poly", fm="wls", fa="fa",   main = "Parallel analysis")

## Parallel analysis suggests that the number of factors =  1  and the number of components =  NA
# Factor analysis, with polychoric correlation, WLS estimator, and oblimin rotation 
fa_mod4b <- efaUnrotate(PHQ8_DF, estimator = "WLS", nf = 1)

# Factor loadings 
summary(fa_mod4b)
## lavaan 0.6-8 ended normally after 17 iterations
## 
##   Estimator                                        WLS
##   Optimization method                           NLMINB
##   Number of model parameters                        16
##                                                       
##   Number of observations                           695
##                                                       
## Model Test User Model:
##                                                       
##   Test statistic                                52.647
##   Degrees of freedom                                20
##   P-value (Chi-square)                           0.000
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model        Unstructured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   factor1 =~                                          
##     PH9INTE (l1_1)    0.516    0.038   13.515    0.000
##     PH9FEEL (l2_1)    0.638    0.034   18.763    0.000
##     PH9TROU (l3_1)    0.484    0.041   11.727    0.000
##     PH9TIRE (l4_1)    0.554    0.037   14.832    0.000
##     PH9APPE (l5_1)    0.546    0.037   14.594    0.000
##     PH9BADA (l6_1)    0.613    0.037   16.678    0.000
##     PH9CONC (l7_1)    0.564    0.037   15.115    0.000
##     PH9MOVI (l8_1)    0.496    0.042   11.772    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##     factor1           1.000                           
##    .PH9INTERST        0.773    0.043   17.963    0.000
##    .PH9FEEL           0.591    0.040   14.700    0.000
##    .PH9TROUBL         0.763    0.048   16.026    0.000
##    .PH9TIRED          0.702    0.042   16.677    0.000
##    .PH9APPETIT        0.717    0.043   16.516    0.000
##    .PH9BADABT         0.711    0.045   15.626    0.000
##    .PH9CONCEN         0.719    0.045   16.006    0.000
##    .PH9MOVING         0.642    0.047   13.807    0.000
# RMSEA - better than the above
fitmeasures(fa_mod4b)["rmsea"]
##      rmsea 
## 0.04849806

Again, the model fits well when using all data.

# Inspect fit statistics 
M2(PHQ8_GRM, type = "C2", calcNULL = FALSE)
##             M2 df            p      RMSEA    RMSEA_5   RMSEA_95      SRMSR
## stats 73.78763 20 4.334076e-08 0.06225102 0.04738457 0.07771271 0.05049266
##             TLI       CFI
## stats 0.9518307 0.9655934
# Item information curve (or 'information and trace lines') and information and SE
plot(PHQ8_GRM, type = 'infotrace', facet_items= F)

plot(PHQ8_GRM, type = 'infoSE', facet_items= F) 

# Item characteristic curve (or 'item scoring traceline plots')
plot(PHQ8_GRM, type = 'trace') 

# Extract ten sets of plausible values and inspect them 
PHQ8_PV <- fscores(PHQ8_GRM, plausible.draws = 10)
PHQ8_PV_combined <- data.frame(Iteration = "1", PHQ8 = PHQ8_PV[[1]] )
for (i in seq_along(2:length(PHQ8_PV))){
  PHQ8_PV_combined <- rbind(PHQ8_PV_combined, data.frame(Iteration = as.factor(i+1), PHQ8 = PHQ8_PV[[i+1]] ))
}
# Plot
ggplot(PHQ8_PV_combined, aes(x=PHQ8, color=Iteration)) +
  geom_density()

Distance to the nearest forest reserve

hist(DF_anly$FR.dist)

Distance to Budongo

hist(DF_anly$Budongo.dist)

Selected bi-variate associations

# Correlations between all continuous data (or ordinal variables treated as continuous).
plot_correlation(na.omit(explor_df[key_vars]), maxcat = 5L)

Gender and economic poverty

ggplot(explor_df, aes(x=as.factor(SEX), y=Economic_poverty)) + 
  geom_boxplot()

Gender and food insecurity

ggplot(explor_df, aes(x=as.factor(SEX), y=FIES_est)) + 
  geom_boxplot()

Marital status and economic poverty

ggplot(explor_df, aes(x=as.factor(MSTATUS), y=Economic_poverty)) + 
  geom_boxplot()

Marital status and food insecurity

ggplot(explor_df, aes(x=as.factor(MSTATUS), y=FIES_est)) + 
  geom_boxplot()

Community and economic poverty

ggplot(explor_df, aes(x=as.factor(LOCB), y=Economic_poverty)) + 
  geom_boxplot()

Community and food insecurity

ggplot(explor_df, aes(x=as.factor(LOCB), y=FIES_est)) + 
  geom_boxplot()

Perform model diagnostics, following the WAMBS check list

The model diagnostic steps from the WAMBS check list (Depaoli & van de Schoot 2017):

1) ‘Do you understand the priors?’

# See the main text and SX for further details. The following is simply used to generate the plots used in SX. 

# Function for creating plots for SX. 
prior.plot <- function(type="normal", mean=0, variance=1, shape.a=1, shape.b=1, sec.min=-6, sec.max=6, step=.01, label=label) {
    x <- seq(sec.min, sec.max, by = step)
  
  # For a normally distributed prior 
  if (type == "normal") {
    prior.d <- dnorm(x,mean = mean, sd = sqrt(variance))
  }
  
  # For a beta distributed prior 
  if (type == "beta") {
    prior.d <- dbeta(x, shape1  = shape.a, shape2 = shape.b)
  }
  
  # Plot 
  df <- data.frame(x = x, prior.d = prior.d)  
  
  print(ggplot(data=df, aes(x=x, y=prior.d, group=1)) +
      geom_line(size = .5) +
  xlab("Beta") +
  ylab("Prob. den.") + 
    scale_x_continuous(
      labels = scales::number_format(accuracy = 0.1)))
  }

# Depression ~ Food insecurity
prior.plot(type = "normal", mean = 1, variance = 1, 
           label="1. Depression ~ Food insecurity")

# Depression ~ Economic poverty
prior.plot(type = "normal", mean = 1, variance = 1, 
           label="2. Depression ~ Economic poverty")

# Food insecurity ~ Forest dependence
prior.plot(type = "beta", shape.a = 3, shape.b = 2, sec.min=0, sec.max=1, 
           label="3. Food insecurity ~ Forest dependence")

# Food insecurity   ~   Farm size   
prior.plot(type = "normal", mean = -0.5, variance = 4, 
           label="4. Food insecurity ~ Farm size")

# Food insecurity   ~   Economic poverty
prior.plot(type = "normal", mean = 1, variance = 1, 
           label="5. Food insecurity ~ Economic poverty")

# Food insecurity   ~   Distance for forest reserve 
prior.plot(type = "normal", mean = -0.5, variance = 4, 
           label="6. Food insecurity ~ Distance for forest reserve")

# Economic poverty ~ Forest dependence
prior.plot(type = "beta", shape.a = 3, shape.b = 2, sec.min=0, sec.max=1, 
           label="7. Economic poverty ~ Forest dependence")

# Economic poverty ~ Farm size
prior.plot(type = "beta", shape.a = 2, shape.b = 3, sec.min=0, sec.max=1, 
           label="8. Economic poverty ~ Farm size")

# Depression ~ Age
prior.plot(type = "normal", mean = 0.5, variance = 4, 
           label="9. Depression ~ Age")

# Depression ~ Gender 
prior.plot(type = "normal", mean = 0.5, variance = 4, 
           label="10. Depression ~ Gender")

# Depression ~ Education 
prior.plot(type = "normal", mean = -0.5, variance = 4, 
           label="11. Depression ~ Education")

# Depression ~ Social support 
prior.plot(type = "normal", mean = -0.5, variance = 4, 
           label="12. Depression ~ Social support")

# Depression ~ Divorced or widowed   
prior.plot(type = "normal", mean = 0.5, variance = 4, 
           label="13. Depression ~ Divorced or widowed")

# Depression ~ Never married  
prior.plot(type = "normal", mean = 0, variance = 9, sec.min=-9, sec.max=9,  
           label="14. Depression ~ Never married")

# Depression ~ General health 
prior.plot(type = "beta", shape.a = 2, shape.b = 3, sec.min=0, sec.max=1, 
           label="15. Depression ~ General health")

# Depression ~ Alcohol consumption 
prior.plot(type = "normal", mean = 0.5, variance = 4, 
           label="16. Depression ~ Alcohol consumption")

# Depression ~ Smoking
prior.plot(type = "normal", mean = 0.5, variance = 4, 
           label="17. Depression ~ Smoking")

# Depression ~ Community (all)
prior.plot(type = "normal", mean = 0, variance = 9, sec.min=-9, sec.max=9,  
           label="18. Depression ~ Community (all)")

2) ‘Does the trace-plot exhibit convergence?’

### Define the model and set the priors ###
# Stan uses standard deviations as the priors (rather than variance, like in Jags). See here for useful details: http://ecmerkle.github.io/blavaan/articles/prior.html 
# This means we have to take the square root of the variance to get the standard deviation, which is supplied as the prior.
# Diagnostics are performed using the first of the ten imputed datasets.

# Chains
chains = 4 

# Burn-in iterations 
burnin <- 4000 # 4000

# Post-burn-in iterations
sample <- 4000 # 4000

# Set seed
seed = 4343

# Check - standard deviation = square root of variance
sqrt(1) # = Variance = 1
sqrt(4) # = Variance = 4
sqrt(9) # = Variance = 9

# The model and priors 
model_main_1 <- ' 
    ### Main regression part
    # Key variables of interest
    PHQ8_est ~ prior("normal(1, 1)")*FIES_est + prior("normal(1, 1)")*Economic_poverty  
    FIES_est ~ prior("normal(-0.5, 2)")*Land_est + prior("normal(1, 1)")*Economic_poverty  

    # Distance to forest reserve 
    FIES_est ~ prior("normal(-0.5, 2)")*FR.dist

    ### Covariance
    # Between socio-ecological variables
    FIES_est ~~ prior("beta(3, 2)")*Forest_est.1 
    Economic_poverty ~~ prior("beta(3, 2)")*Forest_est.1
    Economic_poverty ~~ prior("beta(2, 3)")*Land_est
    
    # Health (treated as numeric)
    PHQ8_est ~~ prior("beta(2, 3)")*Health 
    
    ### Covariates 
    # Age 
    PHQ8_est ~ prior("normal(0.5, 2)")*DOBB + 
    
    # Sex
    prior("normal(0.5, 2)")*SEX +

    # Education (treated as numeric)
    prior("normal(-0.5, 2)")*EDUCAT + 
    
    # Social support 
    prior("normal(-0.5, 2)")*Soci_est.1 + 
    
    # Marital status (RL = MSTATUS_Mar.pol)
    prior("normal(0.5, 2)")*MSTATUS_Div.wid + prior("normal(0, 9)")*MSTATUS_Single +
    
    # Alchohol consumption  
    prior("normal(0.5, 2)")*Alcohol + 
    
    # Smoking 
    prior("normal(0.5, 2)")*SMOKING 
  
    ### Location (RL = LOCB_NTC)
    PHQ8_est ~ prior("normal(0, 9)")*LOCB_EWAF + prior("normal(0, 9)")*LOCB_KADONE + prior("normal(0, 9)")*LOCB_KADTWO + prior("normal(0, 9)")*LOCB_KARO + prior("normal(0, 9)")*LOCB_KYEM + prior("normal(0, 9)")*LOCB_MARA + prior("normal(0, 9)")*LOCB_NONE + prior("normal(0, 9)")*LOCB_NTWO + prior("normal(0, 9)")*LOCB_NYAB
    '

# Bayesian SEM
fit_main_1 <- bsem(model_main_1, data=DF_analy.list[[1]], fixed.x = FALSE, n.chains = chains, burnin = burnin, sample = sample, seed = seed, target = "stan",  bcontrol = list(cores = 4))
# Load the model (if needed)
fit_main_1 <- readRDS("fit_main_1.rds")

# Plot estimates 
plot(fit_main_1,  plot.type = "areas", pars = 1:26, prob = 0.90,
     prob_outer = 0.95)

# Traceplots for key parameters - first ten 
key_params <- 26
plot(fit_main_1, pars = 1:10, plot.type = "trace")

# Traceplots for key parameters - secound ten 
plot(fit_main_1, pars = 11:20, plot.type = "trace")

# Traceplots for key parameters - remaining 
plot(fit_main_1, pars = 21:key_params, plot.type = "trace")

fit_main_1_mcmc.list <- blavInspect(fit_main_1, what = "mcmc")
###  Not shown since it returns pages and pages of plots ### 
# Geweke diagnostic 
geweke.plot(fit_main_1_mcmc.list) # We expect about 5% to be out more than +/- 1.96.

# Gelman and Rubin diagnostic (rule of thumb is that everything below 1.1 is OK): https://theoreticalecology.wordpress.com/2011/12/09/mcmc-chain-analysis-and-convergence-diagnostics-with-coda-in-r/
gelman.diag(fit_main_1_mcmc.list)
gelman.plot(fit_main_1_mcmc.list)

3) ‘Does convergence remain after doubling the number of iterations?’

# Double the burn-in 
burnin.d <- burnin*2

# Double the post burn-in
sample.d <- sample*2

# Bayesian SEM  
fit_main_2 <- bsem(model_main_1, data=DF_analy.list[[1]], fixed.x = FALSE, n.chains = chains, burnin = burnin.d, sample = sample.d, seed = seed, target = "stan",  bcontrol = list(cores = 4))
# Load the model (if needed)
fit_main_2 <- readRDS("fit_main_2.rds")

# Traceplots for key parameters - first ten 
plot(fit_main_2, pars = 1:10, plot.type = "trace")

# Traceplots for key parameters - secound ten 
plot(fit_main_2, pars = 11:20, plot.type = "trace")

# Traceplots for key parameters - remaining 
plot(fit_main_2, pars = 21:key_params, plot.type = "trace")

fit_main_2_mcmc.list <- blavInspect(fit_main_2, what = "mcmc")
###  Not shown since it returns pages and pages of plots ### 
# Geweke diagnostic
geweke.plot(fit_main_2_mcmc.list) # We expect about 5% to be out more than +/- 1.96. 

# Gelman and Rubin diagnostic (rule of thumb is that everything below 1.1 is OK): https://theoreticalecology.wordpress.com/2011/12/09/mcmc-chain-analysis-and-convergence-diagnostics-with-coda-in-r/
gelman.diag(fit_main_2_mcmc.list) 
gelman.plot(fit_main_2_mcmc.list)

4) ‘Does the histogram have enough information?’

plot(fit_main_1 , pars = 1:key_params, plot.type = "hist")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

5) ‘Do the chains exhibit a strong degree of autocorrelation?’

# Params 1 - 4
plot(fit_main_1, pars = 1:4, plot.type = "acf")

# Params 5 - 8
plot(fit_main_1, pars = 5:8, plot.type = "acf")

# Params 9 - 12
plot(fit_main_1, pars = 9:12, plot.type = "acf")

# Params 13 - 16
plot(fit_main_1, pars = 14:16, plot.type = "acf")

# Params 17 - 20
plot(fit_main_1, pars = 17:20, plot.type = "acf")

# Params 21 - 24
plot(fit_main_1, pars = 21:24, plot.type = "acf")

# Params 25 - 26
plot(fit_main_1, pars = 22:key_params, plot.type = "acf")

6) ‘Does the posterior distribution make substantive sense?’

# Combing the results of the three chains together 
fit_1_MCMCbinded <- as.matrix(fit_main_1_mcmc.list)

# Examine the posterior for each key variable  
par(mfrow = c(4,7))
for (i in seq_along(1:key_params)) {
  plot(density(fit_1_MCMCbinded[,i]))
}
dev.off()
## null device 
##           1

7) ‘Do different specifications of the multivariate variance priors influence the results?’

# Examine the observed variable precision parameter (observed, because we are using plausible valued) - theta (which appears to be called 'itheta' in the manual?) - which has a default prior of gamma(1, 0.5).
dpriors(target = "stan")

# Respecify the model with a different variance associated with PHQ8_est: prior("gamma(.5, .5)")
model_main_3 <- ' 
    ### Main regression part
    # Key variables of interest
    PHQ8_est ~ prior("normal(1, 1)")*FIES_est + prior("normal(1, 1)")*Economic_poverty  
    FIES_est ~ prior("normal(-0.5, 2)")*Land_est + prior("normal(1, 1)")*Economic_poverty  

    # Distance to forest reserve 
    FIES_est ~ prior("normal(-0.5, 2)")*FR.dist

    ### Covariance
    # Between socio-ecological variables
    FIES_est ~~ prior("beta(3, 2)")*Forest_est.1 
    Economic_poverty ~~ prior("beta(3, 2)")*Forest_est.1
    Economic_poverty ~~ prior("beta(2, 3)")*Land_est
    
    # Health (treated as numeric)
    PHQ8_est ~~ prior("beta(2, 3)")*Health 
    
    ### Covariates 
    # Age 
    PHQ8_est ~ prior("normal(0.5, 2)")*DOBB + 
    
    # Sex
    prior("normal(0.5, 2)")*SEX +

    # Education (treated as numeric)
    prior("normal(-0.5, 2)")*EDUCAT + 
    
    # Social support 
    prior("normal(-0.5, 2)")*Soci_est.1 + 
    
    # Marital status (RL = MSTATUS_Mar.pol)
    prior("normal(0.5, 2)")*MSTATUS_Div.wid + prior("normal(0, 9)")*MSTATUS_Single +
    
    # Alchohol consumption  
    prior("normal(0.5, 2)")*Alcohol + 
    
    # Smoking 
    prior("normal(0.5, 2)")*SMOKING 
  
    ### Location (RL = LOCB_NTC)
    PHQ8_est ~ prior("normal(0, 9)")*LOCB_EWAF + prior("normal(0, 9)")*LOCB_KADONE + prior("normal(0, 9)")*LOCB_KADTWO + prior("normal(0, 9)")*LOCB_KARO + prior("normal(0, 9)")*LOCB_KYEM + prior("normal(0, 9)")*LOCB_MARA + prior("normal(0, 9)")*LOCB_NONE + prior("normal(0, 9)")*LOCB_NTWO + prior("normal(0, 9)")*LOCB_NYAB
    
    # Using a alternative to the default 
    PHQ8_est ~~ gamma(1,.05)[sd]*PHQ8_est
'

# Bayesian SEM  
fit_main_3 <- bsem(model_main_3, data=DF_analy.list[[1]], fixed.x = FALSE, n.chains = chains, burnin = burnin, sample = sample, seed = seed, target = "stan",  bcontrol = list(cores = 4))
# Load the model (if needed)
fit_main_3 <- readRDS("fit_main_3.rds")

# Calculate the bias associated with using this different specification
fit_main_1_sum <- data.frame(summary(fit_main_1))[,1:2]
## blavaan (0.3-15) results of 4000 samples after 4000 adapt/burnin iterations
## 
##   Number of observations                           695
## 
##   Number of missing patterns                         1
## 
##   Statistic                                 MargLogLik         PPP
##   Value                                     -12480.392       0.000
## 
## Regressions:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##   PHQ8_est ~                                                                   
##     FIES_est          0.212    0.038    0.137    0.288    1.000     normal(1,1)
##     Economic_pvrty    0.119    0.042    0.036    0.202    1.000     normal(1,1)
##   FIES_est ~                                                                   
##     Land_est         -0.158    0.035   -0.226   -0.089    1.000  normal(-0.5,2)
##     Economic_pvrty    0.356    0.035    0.286    0.426    1.000     normal(1,1)
##     FR.dist          -0.012    0.034   -0.079    0.056    1.000  normal(-0.5,2)
##   PHQ8_est ~                                                                   
##     DOBB              0.013    0.039   -0.063    0.089    1.000   normal(0.5,2)
##     SEX               0.088    0.077   -0.061     0.24    1.000   normal(0.5,2)
##     EDUCAT           -0.093    0.031   -0.154   -0.031    1.000  normal(-0.5,2)
##     Soci_est.1       -0.048    0.037    -0.12    0.024    1.000  normal(-0.5,2)
##     MSTATUS_Div.wd   -0.018    0.101   -0.215    0.178    1.000   normal(0.5,2)
##     MSTATUS_Single    0.121    0.150    -0.17    0.413    1.000     normal(0,9)
##     Alcohol           0.005    0.029   -0.053    0.063    1.000   normal(0.5,2)
##     SMOKING           0.075    0.118   -0.158    0.307    1.000   normal(0.5,2)
##     LOCB_EWAF         0.149    0.162   -0.166    0.468    1.000     normal(0,9)
##     LOCB_KADONE       0.253    0.151   -0.045     0.55    1.000     normal(0,9)
##     LOCB_KADTWO       0.057    0.148   -0.236    0.347    1.000     normal(0,9)
##     LOCB_KARO         0.284    0.109    0.069    0.498    1.000     normal(0,9)
##     LOCB_KYEM         0.482    0.161    0.167    0.794    1.000     normal(0,9)
##     LOCB_MARA         0.084    0.129    -0.17    0.337    1.000     normal(0,9)
##     LOCB_NONE         0.044    0.152   -0.252    0.343    1.000     normal(0,9)
##     LOCB_NTWO         0.040    0.144   -0.243    0.322    1.000     normal(0,9)
##     LOCB_NYAB         0.347    0.171     0.01    0.679    1.000     normal(0,9)
## 
## Covariances:
##                       Estimate  Post.SD pi.lower pi.upper     Rhat
##  .FIES_est ~~                                                     
##     Forest_est.1         0.136    0.036    0.067    0.207    1.000
##   Economic_poverty ~~                                             
##     Forest_est.1         0.033    0.037   -0.039    0.107    1.000
##     Land_est            -0.272    0.040   -0.352   -0.195    1.000
##  .PHQ8_est ~~                                                     
##     Health              -0.165    0.038    -0.24   -0.093    1.000
##   FR.dist ~~                                                      
##     DOBB                 0.038    0.038   -0.038    0.113    1.000
##     SEX                 -0.026    0.019   -0.063    0.011    1.000
##     EDUCAT               0.005    0.047   -0.089    0.097    1.000
##     Soci_est.1           0.012    0.039   -0.065    0.088    1.000
##     MSTATUS_Div.wd      -0.013    0.014   -0.041    0.015    1.000
##     MSTATUS_Single       0.001    0.009   -0.018    0.019    1.000
##     Alcohol             -0.068    0.048   -0.162    0.023    1.000
##     SMOKING             -0.007    0.012   -0.031    0.016    1.000
##     LOCB_EWAF           -0.024    0.009   -0.042   -0.007    1.000
##     LOCB_KADONE          0.186    0.012    0.163    0.211    1.001
##     LOCB_KADTWO          0.124    0.011    0.102    0.147    1.000
##     LOCB_KARO           -0.066    0.016   -0.098   -0.035    1.000
##     LOCB_KYEM           -0.039    0.009   -0.056   -0.021    1.000
##     LOCB_MARA           -0.088    0.013   -0.114   -0.063    1.001
##     LOCB_NONE            0.005    0.010   -0.014    0.025    1.001
##     LOCB_NTWO           -0.051    0.011   -0.073    -0.03    1.000
##     LOCB_NYAB           -0.024    0.009   -0.041   -0.007    1.000
##   DOBB ~~                                                         
##     SEX                 -0.043    0.019   -0.081   -0.007    1.000
##     EDUCAT              -0.249    0.050   -0.349   -0.154    1.000
##     Soci_est.1          -0.004    0.038   -0.079     0.07    1.000
##     MSTATUS_Div.wd       0.098    0.015     0.07    0.128    1.000
##     MSTATUS_Single      -0.063    0.010   -0.083   -0.044    1.000
##     Alcohol              0.179    0.048    0.085    0.275    1.000
##     SMOKING              0.062    0.012    0.039    0.087    1.000
##     LOCB_EWAF            0.013    0.009   -0.004    0.031    1.000
##     LOCB_KADONE         -0.002    0.010   -0.022    0.017    1.000
##     LOCB_KADTWO          0.016    0.010   -0.005    0.036    1.000
##     LOCB_KARO            0.000    0.016   -0.032    0.032    1.000
##     LOCB_KYEM            0.004    0.009   -0.014    0.022    1.000
##     LOCB_MARA           -0.023    0.012   -0.048    0.001    1.000
##     LOCB_NONE            0.000    0.010   -0.019     0.02    1.000
##     LOCB_NTWO           -0.011    0.011   -0.032    0.011    1.000
##     LOCB_NYAB            0.009    0.009   -0.008    0.025    1.000
##   SEX ~~                                                          
##     EDUCAT              -0.140    0.025    -0.19   -0.093    1.000
##     Soci_est.1          -0.027    0.019   -0.065    0.011    1.000
##     MSTATUS_Div.wd       0.037    0.007    0.023    0.051    1.000
##     MSTATUS_Single      -0.009    0.005   -0.019        0    1.000
##     Alcohol             -0.097    0.023   -0.143   -0.052    1.000
##     SMOKING             -0.038    0.006    -0.05   -0.026    1.000
##     LOCB_EWAF           -0.009    0.005   -0.018        0    1.000
##     LOCB_KADONE          0.003    0.005   -0.007    0.013    1.000
##     LOCB_KADTWO         -0.007    0.005   -0.017    0.003    1.000
##     LOCB_KARO           -0.015    0.008   -0.031        0    1.000
##     LOCB_KYEM            0.001    0.004   -0.008    0.009    1.000
##     LOCB_MARA            0.000    0.006   -0.012    0.012    1.000
##     LOCB_NONE            0.005    0.005   -0.005    0.015    1.000
##     LOCB_NTWO            0.005    0.005   -0.006    0.015    1.000
##     LOCB_NYAB            0.002    0.004   -0.006     0.01    1.000
##   EDUCAT ~~                                                       
##     Soci_est.1           0.195    0.050    0.098    0.294    1.000
##     MSTATUS_Div.wd      -0.075    0.019   -0.112    -0.04    1.000
##     MSTATUS_Single       0.086    0.013    0.062    0.111    1.000
##     Alcohol             -0.048    0.060   -0.163    0.069    1.000
##     SMOKING             -0.043    0.015   -0.073   -0.013    1.000
##     LOCB_EWAF           -0.005    0.012   -0.028    0.018    1.000
##     LOCB_KADONE         -0.008    0.013   -0.032    0.017    1.000
##     LOCB_KADTWO          0.001    0.013   -0.025    0.027    1.000
##     LOCB_KARO            0.015    0.020   -0.025    0.054    1.000
##     LOCB_KYEM            0.019    0.011   -0.004    0.041    1.000
##     LOCB_MARA           -0.002    0.016   -0.033    0.028    1.000
##     LOCB_NONE            0.029    0.013    0.004    0.053    1.000
##     LOCB_NTWO           -0.056    0.014   -0.084   -0.029    1.000
##     LOCB_NYAB           -0.017    0.011   -0.039    0.004    1.000
##   Soci_est.1 ~~                                                   
##     MSTATUS_Div.wd      -0.037    0.015   -0.067   -0.009    1.000
##     MSTATUS_Single       0.030    0.010    0.011    0.049    1.000
##     Alcohol             -0.022    0.048   -0.116    0.073    1.000
##     SMOKING             -0.019    0.012   -0.043    0.004    1.000
##     LOCB_EWAF           -0.007    0.009   -0.025    0.011    1.000
##     LOCB_KADONE          0.009    0.010   -0.011    0.029    1.000
##     LOCB_KADTWO         -0.018    0.010   -0.039    0.002    1.000
##     LOCB_KARO           -0.006    0.016   -0.038    0.025    1.000
##     LOCB_KYEM            0.000    0.009   -0.018    0.019    1.000
##     LOCB_MARA            0.010    0.013   -0.014    0.035    1.000
##     LOCB_NONE           -0.001    0.010   -0.021    0.018    1.000
##     LOCB_NTWO           -0.014    0.011   -0.035    0.007    1.000
##     LOCB_NYAB            0.011    0.009   -0.006    0.028    1.000
##   MSTATUS_Div.wid ~~                                              
##     MSTATUS_Single      -0.011    0.004   -0.018   -0.004    1.000
##     Alcohol              0.023    0.018   -0.012    0.059    1.000
##     SMOKING              0.005    0.005   -0.004    0.013    1.000
##     LOCB_EWAF           -0.007    0.003   -0.014   -0.001    1.000
##     LOCB_KADONE         -0.007    0.004   -0.014        0    1.000
##     LOCB_KADTWO          0.004    0.004   -0.004    0.012    1.000
##     LOCB_KARO            0.001    0.006    -0.01    0.013    1.000
##     LOCB_KYEM            0.009    0.003    0.002    0.016    1.000
##     LOCB_MARA           -0.003    0.005   -0.012    0.007    1.000
##     LOCB_NONE           -0.008    0.004   -0.015        0    1.000
##     LOCB_NTWO           -0.003    0.004   -0.012    0.005    1.000
##     LOCB_NYAB           -0.000    0.003   -0.007    0.006    1.000
##   MSTATUS_Single ~~                                               
##     Alcohol             -0.010    0.012   -0.033    0.013    1.000
##     SMOKING             -0.006    0.003   -0.012        0    1.000
##     LOCB_EWAF           -0.001    0.002   -0.005    0.003    1.000
##     LOCB_KADONE         -0.001    0.003   -0.005    0.004    1.000
##     LOCB_KADTWO          0.001    0.003   -0.005    0.006    1.000
##     LOCB_KARO           -0.003    0.004   -0.011    0.005    1.000
##     LOCB_KYEM           -0.001    0.002   -0.005    0.003    1.000
##     LOCB_MARA            0.002    0.003   -0.004    0.008    1.000
##     LOCB_NONE            0.002    0.003   -0.003    0.007    1.000
##     LOCB_NTWO           -0.003    0.003   -0.008    0.002    1.000
##     LOCB_NYAB           -0.002    0.002   -0.006    0.002    1.000
##   Alcohol ~~                                                      
##     SMOKING              0.083    0.015    0.054    0.113    1.000
##     LOCB_EWAF            0.039    0.011    0.017    0.061    1.000
##     LOCB_KADONE         -0.014    0.012   -0.039    0.011    1.000
##     LOCB_KADTWO         -0.006    0.013   -0.032    0.019    1.000
##     LOCB_KARO           -0.019    0.020   -0.058    0.019    1.000
##     LOCB_KYEM           -0.014    0.011   -0.036    0.008    1.000
##     LOCB_MARA           -0.001    0.015   -0.031    0.029    1.000
##     LOCB_NONE           -0.003    0.012   -0.027    0.022    1.000
##     LOCB_NTWO            0.018    0.013   -0.008    0.045    1.000
##     LOCB_NYAB           -0.002    0.011   -0.023    0.018    1.000
##   SMOKING ~~                                                      
##     LOCB_EWAF            0.002    0.003   -0.004    0.008    1.000
##     LOCB_KADONE         -0.002    0.003   -0.009    0.004    1.000
##     LOCB_KADTWO         -0.006    0.003   -0.012        0    1.000
##     LOCB_KARO            0.009    0.005   -0.001    0.019    1.000
##     LOCB_KYEM           -0.002    0.003   -0.008    0.003    1.000
##     LOCB_MARA           -0.001    0.004   -0.009    0.006    1.000
##     LOCB_NONE            0.007    0.003    0.001    0.013    1.000
##     LOCB_NTWO            0.005    0.003   -0.002    0.011    1.000
##     LOCB_NYAB           -0.001    0.003   -0.007    0.004    1.000
##   LOCB_EWAF ~~                                                    
##     LOCB_KADONE         -0.004    0.002   -0.009        0    1.000
##     LOCB_KADTWO         -0.005    0.002    -0.01        0    1.000
##     LOCB_KARO           -0.013    0.004   -0.021   -0.006    1.000
##     LOCB_KYEM           -0.004    0.002   -0.008    0.001    1.000
##     LOCB_MARA           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NONE           -0.004    0.002   -0.009        0    1.000
##     LOCB_NTWO           -0.005    0.003    -0.01        0    1.000
##     LOCB_NYAB           -0.003    0.002   -0.007    0.001    1.000
##   LOCB_KADONE ~~                                                  
##     LOCB_KADTWO         -0.007    0.003   -0.012   -0.001    1.000
##     LOCB_KARO           -0.017    0.004   -0.025   -0.008    1.000
##     LOCB_KYEM           -0.004    0.002   -0.009        0    1.000
##     LOCB_MARA           -0.009    0.003   -0.015   -0.002    1.000
##     LOCB_NONE           -0.006    0.003   -0.011   -0.001    1.000
##     LOCB_NTWO           -0.006    0.003   -0.012   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.008        0    1.000
##   LOCB_KADTWO ~~                                                  
##     LOCB_KARO           -0.018    0.004   -0.026   -0.009    1.000
##     LOCB_KYEM           -0.005    0.002    -0.01        0    1.000
##     LOCB_MARA           -0.009    0.003   -0.016   -0.003    1.000
##     LOCB_NONE           -0.006    0.003   -0.011   -0.001    1.000
##     LOCB_NTWO           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.009        0    1.000
##   LOCB_KARO ~~                                                    
##     LOCB_KYEM           -0.013    0.004   -0.021   -0.006    1.000
##     LOCB_MARA           -0.027    0.005   -0.037   -0.017    1.000
##     LOCB_NONE           -0.016    0.004   -0.025   -0.008    1.000
##     LOCB_NTWO           -0.020    0.005   -0.029   -0.011    1.000
##     LOCB_NYAB           -0.012    0.004   -0.019   -0.005    1.000
##   LOCB_KYEM ~~                                                    
##     LOCB_MARA           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NONE           -0.004    0.002   -0.009        0    1.000
##     LOCB_NTWO           -0.005    0.003   -0.011        0    1.000
##     LOCB_NYAB           -0.003    0.002   -0.007    0.001    1.000
##   LOCB_MARA ~~                                                    
##     LOCB_NONE           -0.009    0.003   -0.015   -0.002    1.000
##     LOCB_NTWO           -0.011    0.004   -0.018   -0.004    1.000
##     LOCB_NYAB           -0.006    0.003   -0.012   -0.001    1.000
##   LOCB_NONE ~~                                                    
##     LOCB_NTWO           -0.006    0.003   -0.012   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.008    0.001    1.000
##   LOCB_NTWO ~~                                                    
##     LOCB_NYAB           -0.005    0.002    -0.01        0    1.000
##     Prior       
##                 
##        beta(3,2)
##                 
##        beta(3,2)
##        beta(2,3)
##                 
##        beta(2,3)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
## 
## Intercepts:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##    .PHQ8_est          0.019    0.139   -0.256    0.289    1.000    normal(0,10)
##    .FIES_est         -0.000    0.035   -0.068    0.068    1.000    normal(0,10)
##     Economic_pvrty    0.000    0.039   -0.077    0.076    1.000    normal(0,10)
##     Land_est          0.000    0.038   -0.074    0.074    1.000    normal(0,10)
##     FR.dist           0.000    0.038   -0.075    0.076    1.000    normal(0,10)
##     DOBB              0.000    0.038   -0.074    0.074    1.000    normal(0,10)
##     SEX               0.596    0.019    0.559    0.633    1.000    normal(0,10)
##     EDUCAT            2.641    0.048    2.548    2.735    1.000    normal(0,10)
##     Soci_est.1       -0.000    0.039   -0.076    0.076    1.000    normal(0,10)
##     MSTATUS_Div.wd    0.168    0.015     0.14    0.197    1.000    normal(0,10)
##     MSTATUS_Single    0.066    0.009    0.048    0.085    1.000    normal(0,10)
##     Alcohol           0.460    0.048    0.366    0.554    1.000    normal(0,10)
##     SMOKING           0.109    0.012    0.086    0.133    1.000    normal(0,10)
##     LOCB_EWAF         0.059    0.009    0.042    0.077    1.000    normal(0,10)
##     LOCB_KADONE       0.075    0.010    0.055    0.095    1.000    normal(0,10)
##     LOCB_KADTWO       0.079    0.010    0.059      0.1    1.000    normal(0,10)
##     LOCB_KARO         0.222    0.016     0.19    0.253    1.000    normal(0,10)
##     LOCB_KYEM         0.059    0.009    0.041    0.077    1.000    normal(0,10)
##     LOCB_MARA         0.118    0.012    0.094    0.142    1.000    normal(0,10)
##     LOCB_NONE         0.072    0.010    0.052    0.091    1.000    normal(0,10)
##     LOCB_NTWO         0.088    0.011    0.066    0.109    1.000    normal(0,10)
##     LOCB_NYAB         0.052    0.008    0.035    0.068    1.000    normal(0,10)
##     Forest_est.1     -0.000    0.038   -0.074    0.072    1.000    normal(0,10)
##     Health            3.222    0.035    3.153    3.291    1.000    normal(0,10)
## 
## Variances:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##    .PHQ8_est          0.828    0.046    0.745    0.924    1.000 gamma(1,.5)[sd]
##    .FIES_est          0.835    0.045    0.751    0.926    1.000 gamma(1,.5)[sd]
##     Economic_pvrty    1.008    0.054    0.906    1.118    1.000 gamma(1,.5)[sd]
##     Land_est          1.005    0.054    0.903    1.116    1.000 gamma(1,.5)[sd]
##     Forest_est.1      1.006    0.055    0.905    1.119    1.000 gamma(1,.5)[sd]
##     Health            0.852    0.046    0.768    0.946    1.000 gamma(1,.5)[sd]
##     FR.dist           1.005    0.054    0.904    1.115    1.001 gamma(1,.5)[sd]
##     DOBB              1.021    0.055    0.919    1.134    1.000 gamma(1,.5)[sd]
##     SEX               0.247    0.013    0.222    0.274    1.000 gamma(1,.5)[sd]
##     EDUCAT            1.622    0.088    1.459    1.806    1.000 gamma(1,.5)[sd]
##     Soci_est.1        1.026    0.057    0.921    1.144    1.000 gamma(1,.5)[sd]
##     MSTATUS_Div.wd    0.144    0.008    0.129     0.16    1.000 gamma(1,.5)[sd]
##     MSTATUS_Single    0.063    0.003    0.057     0.07    1.000 gamma(1,.5)[sd]
##     Alcohol           1.545    0.083    1.391    1.716    1.000 gamma(1,.5)[sd]
##     SMOKING           0.100    0.005     0.09    0.111    1.000 gamma(1,.5)[sd]
##     LOCB_EWAF         0.057    0.003    0.051    0.063    1.000 gamma(1,.5)[sd]
##     LOCB_KADONE       0.070    0.004    0.063    0.078    1.000 gamma(1,.5)[sd]
##     LOCB_KADTWO       0.075    0.004    0.067    0.083    1.000 gamma(1,.5)[sd]
##     LOCB_KARO         0.177    0.010    0.159    0.196    1.000 gamma(1,.5)[sd]
##     LOCB_KYEM         0.057    0.003    0.051    0.064    1.000 gamma(1,.5)[sd]
##     LOCB_MARA         0.107    0.006    0.096    0.119    1.000 gamma(1,.5)[sd]
##     LOCB_NONE         0.069    0.004    0.062    0.076    1.000 gamma(1,.5)[sd]
##     LOCB_NTWO         0.082    0.004    0.074    0.091    1.000 gamma(1,.5)[sd]
##     LOCB_NYAB         0.051    0.003    0.045    0.056    1.000 gamma(1,.5)[sd]
fit_main_2_sum <- data.frame(summary(fit_main_3))[,1:2]
## blavaan (0.3-15) results of 4000 samples after 4000 adapt/burnin iterations
## 
##   Number of observations                           695
## 
##   Number of missing patterns                         1
## 
##   Statistic                                 MargLogLik         PPP
##   Value                                     -12480.169       0.000
## 
## Regressions:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##   PHQ8_est ~                                                                   
##     FIES_est          0.212    0.039    0.136    0.288    1.000     normal(1,1)
##     Economic_pvrty    0.119    0.042    0.036    0.202    1.000     normal(1,1)
##   FIES_est ~                                                                   
##     Land_est         -0.157    0.036   -0.228   -0.089    1.000  normal(-0.5,2)
##     Economic_pvrty    0.356    0.036    0.285    0.427    1.000     normal(1,1)
##     FR.dist          -0.012    0.035    -0.08    0.054    1.000  normal(-0.5,2)
##   PHQ8_est ~                                                                   
##     DOBB              0.013    0.039   -0.064    0.089    1.000   normal(0.5,2)
##     SEX               0.089    0.079   -0.064    0.243    1.000   normal(0.5,2)
##     EDUCAT           -0.092    0.031   -0.154    -0.03    1.000  normal(-0.5,2)
##     Soci_est.1       -0.048    0.037    -0.12    0.026    1.000  normal(-0.5,2)
##     MSTATUS_Div.wd   -0.018    0.101   -0.212    0.185    1.000   normal(0.5,2)
##     MSTATUS_Single    0.120    0.148   -0.167    0.412    1.000     normal(0,9)
##     Alcohol           0.005    0.029   -0.052    0.062    1.000   normal(0.5,2)
##     SMOKING           0.076    0.119   -0.159    0.311    1.000   normal(0.5,2)
##     LOCB_EWAF         0.148    0.162    -0.17    0.465    1.000     normal(0,9)
##     LOCB_KADONE       0.251    0.150   -0.046    0.542    1.001     normal(0,9)
##     LOCB_KADTWO       0.055    0.146   -0.232    0.342    1.001     normal(0,9)
##     LOCB_KARO         0.282    0.110    0.068    0.499    1.001     normal(0,9)
##     LOCB_KYEM         0.481    0.161    0.168    0.799    1.000     normal(0,9)
##     LOCB_MARA         0.083    0.130   -0.172    0.337    1.001     normal(0,9)
##     LOCB_NONE         0.042    0.155   -0.263    0.342    1.000     normal(0,9)
##     LOCB_NTWO         0.037    0.143   -0.244    0.318    1.001     normal(0,9)
##     LOCB_NYAB         0.345    0.172    0.007    0.685    1.001     normal(0,9)
## 
## Covariances:
##                       Estimate  Post.SD pi.lower pi.upper     Rhat
##  .FIES_est ~~                                                     
##     Forest_est.1         0.137    0.036    0.068     0.21    1.000
##   Economic_poverty ~~                                             
##     Forest_est.1         0.033    0.037    -0.04    0.107    1.000
##     Land_est            -0.272    0.040   -0.353   -0.195    1.000
##  .PHQ8_est ~~                                                     
##     Health              -0.165    0.038    -0.24   -0.092    1.000
##   FR.dist ~~                                                      
##     DOBB                 0.039    0.038   -0.035    0.114    1.000
##     SEX                 -0.026    0.019   -0.064     0.01    1.000
##     EDUCAT               0.005    0.048    -0.09    0.098    1.000
##     Soci_est.1           0.011    0.038   -0.063    0.086    1.000
##     MSTATUS_Div.wd      -0.013    0.014   -0.041    0.015    1.001
##     MSTATUS_Single       0.001    0.009   -0.018    0.019    1.000
##     Alcohol             -0.067    0.047   -0.159    0.024    1.000
##     SMOKING             -0.007    0.012    -0.03    0.017    1.000
##     LOCB_EWAF           -0.024    0.009   -0.042   -0.006    1.000
##     LOCB_KADONE          0.185    0.012    0.162     0.21    1.000
##     LOCB_KADTWO          0.124    0.011    0.102    0.147    1.000
##     LOCB_KARO           -0.066    0.016   -0.098   -0.035    1.000
##     LOCB_KYEM           -0.039    0.009   -0.057   -0.021    1.000
##     LOCB_MARA           -0.088    0.013   -0.114   -0.064    1.000
##     LOCB_NONE            0.005    0.010   -0.014    0.025    1.000
##     LOCB_NTWO           -0.051    0.011   -0.073    -0.03    1.001
##     LOCB_NYAB           -0.024    0.009   -0.041   -0.007    1.000
##   DOBB ~~                                                         
##     SEX                 -0.044    0.019   -0.082   -0.007    1.000
##     EDUCAT              -0.249    0.049   -0.346   -0.155    1.000
##     Soci_est.1          -0.004    0.039   -0.081    0.072    1.000
##     MSTATUS_Div.wd       0.098    0.015    0.069    0.128    1.000
##     MSTATUS_Single      -0.063    0.010   -0.083   -0.044    1.000
##     Alcohol              0.179    0.049    0.086    0.277    1.000
##     SMOKING              0.063    0.012    0.039    0.087    1.000
##     LOCB_EWAF            0.013    0.009   -0.005    0.032    1.000
##     LOCB_KADONE         -0.002    0.010   -0.022    0.018    1.000
##     LOCB_KADTWO          0.016    0.010   -0.004    0.036    1.000
##     LOCB_KARO           -0.000    0.016   -0.032    0.031    1.000
##     LOCB_KYEM            0.005    0.009   -0.013    0.022    1.000
##     LOCB_MARA           -0.024    0.012   -0.048    0.001    1.000
##     LOCB_NONE            0.000    0.010    -0.02     0.02    1.000
##     LOCB_NTWO           -0.011    0.011   -0.032    0.011    1.000
##     LOCB_NYAB            0.009    0.009   -0.008    0.026    1.000
##   SEX ~~                                                          
##     EDUCAT              -0.140    0.024   -0.189   -0.093    1.000
##     Soci_est.1          -0.027    0.019   -0.065     0.01    1.000
##     MSTATUS_Div.wd       0.037    0.007    0.023    0.051    1.000
##     MSTATUS_Single      -0.009    0.005   -0.018        0    1.000
##     Alcohol             -0.097    0.023   -0.144   -0.051    1.000
##     SMOKING             -0.038    0.006   -0.051   -0.026    1.000
##     LOCB_EWAF           -0.009    0.004   -0.018        0    1.000
##     LOCB_KADONE          0.003    0.005   -0.007    0.013    1.000
##     LOCB_KADTWO         -0.007    0.005   -0.017    0.003    1.000
##     LOCB_KARO           -0.015    0.008   -0.031        0    1.000
##     LOCB_KYEM            0.001    0.004   -0.008     0.01    1.000
##     LOCB_MARA            0.000    0.006   -0.012    0.012    1.000
##     LOCB_NONE            0.005    0.005   -0.005    0.014    1.000
##     LOCB_NTWO            0.005    0.005   -0.005    0.016    1.000
##     LOCB_NYAB            0.002    0.004   -0.006    0.011    1.000
##   EDUCAT ~~                                                       
##     Soci_est.1           0.195    0.049    0.099    0.293    1.000
##     MSTATUS_Div.wd      -0.075    0.018   -0.111   -0.039    1.000
##     MSTATUS_Single       0.086    0.013    0.062    0.111    1.000
##     Alcohol             -0.048    0.059   -0.165    0.067    1.000
##     SMOKING             -0.042    0.015   -0.072   -0.013    1.000
##     LOCB_EWAF           -0.005    0.012   -0.027    0.018    1.000
##     LOCB_KADONE         -0.008    0.013   -0.033    0.017    1.000
##     LOCB_KADTWO          0.001    0.013   -0.024    0.027    1.000
##     LOCB_KARO            0.015    0.020   -0.024    0.054    1.000
##     LOCB_KYEM            0.018    0.012   -0.004    0.041    1.000
##     LOCB_MARA           -0.002    0.016   -0.033    0.028    1.000
##     LOCB_NONE            0.028    0.013    0.004    0.054    1.000
##     LOCB_NTWO           -0.056    0.014   -0.084   -0.029    1.000
##     LOCB_NYAB           -0.017    0.011   -0.039    0.004    1.000
##   Soci_est.1 ~~                                                   
##     MSTATUS_Div.wd      -0.038    0.015   -0.066   -0.009    1.000
##     MSTATUS_Single       0.030    0.010    0.011    0.049    1.000
##     Alcohol             -0.022    0.048   -0.117    0.071    1.000
##     SMOKING             -0.019    0.012   -0.043    0.004    1.000
##     LOCB_EWAF           -0.007    0.009   -0.025    0.011    1.000
##     LOCB_KADONE          0.009    0.010   -0.011    0.028    1.000
##     LOCB_KADTWO         -0.018    0.011   -0.039    0.003    1.000
##     LOCB_KARO           -0.006    0.016   -0.038    0.025    1.000
##     LOCB_KYEM            0.000    0.009   -0.018    0.018    1.000
##     LOCB_MARA            0.011    0.012   -0.014    0.035    1.000
##     LOCB_NONE           -0.001    0.010   -0.021    0.018    1.000
##     LOCB_NTWO           -0.014    0.011   -0.036    0.008    1.000
##     LOCB_NYAB            0.011    0.009   -0.006    0.028    1.000
##   MSTATUS_Div.wid ~~                                              
##     MSTATUS_Single      -0.011    0.004   -0.018   -0.004    1.000
##     Alcohol              0.023    0.018   -0.012    0.058    1.000
##     SMOKING              0.004    0.005   -0.004    0.013    1.000
##     LOCB_EWAF           -0.007    0.003   -0.014        0    1.000
##     LOCB_KADONE         -0.007    0.004   -0.014    0.001    1.000
##     LOCB_KADTWO          0.004    0.004   -0.004    0.012    1.000
##     LOCB_KARO            0.001    0.006    -0.01    0.013    1.000
##     LOCB_KYEM            0.009    0.003    0.002    0.016    1.000
##     LOCB_MARA           -0.003    0.005   -0.012    0.007    1.000
##     LOCB_NONE           -0.008    0.004   -0.015   -0.001    1.000
##     LOCB_NTWO           -0.003    0.004   -0.012    0.004    1.000
##     LOCB_NYAB           -0.000    0.003   -0.006    0.006    1.000
##   MSTATUS_Single ~~                                               
##     Alcohol             -0.010    0.012   -0.033    0.014    1.000
##     SMOKING             -0.006    0.003   -0.012        0    1.000
##     LOCB_EWAF           -0.001    0.002   -0.006    0.003    1.000
##     LOCB_KADONE         -0.001    0.003   -0.006    0.004    1.000
##     LOCB_KADTWO          0.000    0.003   -0.005    0.006    1.000
##     LOCB_KARO           -0.003    0.004   -0.011    0.005    1.000
##     LOCB_KYEM           -0.001    0.002   -0.006    0.003    1.000
##     LOCB_MARA            0.002    0.003   -0.004    0.008    1.000
##     LOCB_NONE            0.002    0.002   -0.003    0.007    1.000
##     LOCB_NTWO           -0.003    0.003   -0.008    0.002    1.000
##     LOCB_NYAB           -0.002    0.002   -0.006    0.002    1.000
##   Alcohol ~~                                                      
##     SMOKING              0.083    0.015    0.053    0.113    1.000
##     LOCB_EWAF            0.039    0.011    0.017    0.061    1.000
##     LOCB_KADONE         -0.014    0.013   -0.039     0.01    1.000
##     LOCB_KADTWO         -0.006    0.013   -0.031    0.019    1.000
##     LOCB_KARO           -0.019    0.020   -0.058     0.02    1.000
##     LOCB_KYEM           -0.014    0.011   -0.036    0.008    1.000
##     LOCB_MARA           -0.001    0.015   -0.031    0.028    1.000
##     LOCB_NONE           -0.003    0.012   -0.027    0.021    1.000
##     LOCB_NTWO            0.018    0.013   -0.008    0.044    1.000
##     LOCB_NYAB           -0.002    0.011   -0.023    0.019    1.000
##   SMOKING ~~                                                      
##     LOCB_EWAF            0.002    0.003   -0.004    0.008    1.000
##     LOCB_KADONE         -0.002    0.003   -0.008    0.004    1.000
##     LOCB_KADTWO         -0.006    0.003   -0.012    0.001    1.000
##     LOCB_KARO            0.009    0.005   -0.001    0.019    1.000
##     LOCB_KYEM           -0.002    0.003   -0.008    0.004    1.000
##     LOCB_MARA           -0.001    0.004   -0.009    0.006    1.000
##     LOCB_NONE            0.007    0.003        0    0.013    1.000
##     LOCB_NTWO            0.005    0.003   -0.002    0.012    1.000
##     LOCB_NYAB           -0.001    0.003   -0.007    0.004    1.000
##   LOCB_EWAF ~~                                                    
##     LOCB_KADONE         -0.004    0.002   -0.009        0    1.000
##     LOCB_KADTWO         -0.005    0.002    -0.01        0    1.000
##     LOCB_KARO           -0.013    0.004   -0.021   -0.006    1.000
##     LOCB_KYEM           -0.004    0.002   -0.008    0.001    1.000
##     LOCB_MARA           -0.007    0.003   -0.013   -0.002    1.000
##     LOCB_NONE           -0.004    0.002   -0.009        0    1.000
##     LOCB_NTWO           -0.005    0.003    -0.01        0    1.000
##     LOCB_NYAB           -0.003    0.002   -0.007    0.001    1.000
##   LOCB_KADONE ~~                                                  
##     LOCB_KADTWO         -0.007    0.003   -0.012   -0.001    1.000
##     LOCB_KARO           -0.017    0.004   -0.025   -0.009    1.000
##     LOCB_KYEM           -0.004    0.002   -0.009        0    1.000
##     LOCB_MARA           -0.009    0.003   -0.015   -0.002    1.000
##     LOCB_NONE           -0.006    0.003   -0.011        0    1.000
##     LOCB_NTWO           -0.006    0.003   -0.012   -0.001    1.001
##     LOCB_NYAB           -0.004    0.002   -0.008    0.001    1.000
##   LOCB_KADTWO ~~                                                  
##     LOCB_KARO           -0.018    0.004   -0.026   -0.009    1.000
##     LOCB_KYEM           -0.005    0.002   -0.009        0    1.000
##     LOCB_MARA           -0.009    0.003   -0.016   -0.003    1.000
##     LOCB_NONE           -0.006    0.003   -0.011   -0.001    1.000
##     LOCB_NTWO           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.009        0    1.000
##   LOCB_KARO ~~                                                    
##     LOCB_KYEM           -0.013    0.004   -0.021   -0.006    1.000
##     LOCB_MARA           -0.027    0.005   -0.037   -0.017    1.000
##     LOCB_NONE           -0.016    0.004   -0.025   -0.008    1.000
##     LOCB_NTWO           -0.020    0.005   -0.029   -0.011    1.000
##     LOCB_NYAB           -0.012    0.004   -0.019   -0.005    1.000
##   LOCB_KYEM ~~                                                    
##     LOCB_MARA           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NONE           -0.004    0.002   -0.009        0    1.000
##     LOCB_NTWO           -0.005    0.003   -0.011        0    1.000
##     LOCB_NYAB           -0.003    0.002   -0.007    0.001    1.000
##   LOCB_MARA ~~                                                    
##     LOCB_NONE           -0.009    0.003   -0.015   -0.002    1.000
##     LOCB_NTWO           -0.011    0.004   -0.018   -0.004    1.000
##     LOCB_NYAB           -0.006    0.003   -0.012   -0.001    1.000
##   LOCB_NONE ~~                                                    
##     LOCB_NTWO           -0.006    0.003   -0.012   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.008    0.001    1.000
##   LOCB_NTWO ~~                                                    
##     LOCB_NYAB           -0.005    0.002    -0.01        0    1.000
##     Prior       
##                 
##        beta(3,2)
##                 
##        beta(3,2)
##        beta(2,3)
##                 
##        beta(2,3)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
## 
## Intercepts:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##    .PHQ8_est          0.018    0.139   -0.257    0.291    1.001    normal(0,10)
##    .FIES_est         -0.000    0.034   -0.067    0.066    1.000    normal(0,10)
##     Economic_pvrty   -0.000    0.038   -0.075    0.074    1.000    normal(0,10)
##     Land_est         -0.000    0.038   -0.074    0.074    1.000    normal(0,10)
##     FR.dist           0.000    0.038   -0.074    0.076    1.000    normal(0,10)
##     DOBB             -0.000    0.039   -0.076    0.076    1.000    normal(0,10)
##     SEX               0.596    0.019    0.559    0.633    1.000    normal(0,10)
##     EDUCAT            2.641    0.049    2.545    2.736    1.000    normal(0,10)
##     Soci_est.1        0.000    0.039   -0.075    0.075    1.000    normal(0,10)
##     MSTATUS_Div.wd    0.168    0.014    0.141    0.196    1.000    normal(0,10)
##     MSTATUS_Single    0.066    0.010    0.047    0.085    1.000    normal(0,10)
##     Alcohol           0.461    0.047    0.369    0.553    1.000    normal(0,10)
##     SMOKING           0.109    0.012    0.086    0.133    1.000    normal(0,10)
##     LOCB_EWAF         0.059    0.009    0.041    0.076    1.000    normal(0,10)
##     LOCB_KADONE       0.075    0.010    0.055    0.095    1.000    normal(0,10)
##     LOCB_KADTWO       0.079    0.010    0.059    0.099    1.000    normal(0,10)
##     LOCB_KARO         0.221    0.016     0.19    0.253    1.000    normal(0,10)
##     LOCB_KYEM         0.059    0.009    0.041    0.077    1.000    normal(0,10)
##     LOCB_MARA         0.118    0.012    0.094    0.142    1.000    normal(0,10)
##     LOCB_NONE         0.072    0.010    0.053    0.092    1.000    normal(0,10)
##     LOCB_NTWO         0.088    0.011    0.067    0.109    1.000    normal(0,10)
##     LOCB_NYAB         0.052    0.009    0.035    0.069    1.000    normal(0,10)
##     Forest_est.1     -0.001    0.038   -0.075    0.074    1.000    normal(0,10)
##     Health            3.222    0.035    3.153    3.292    1.000    normal(0,10)
## 
## Variances:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##    .PHQ8_est  (sd)    0.828    0.046    0.743    0.923    1.000 gamma(1,.5)[sd]
##    .FIES_est          0.835    0.045    0.752    0.927    1.000 gamma(1,.5)[sd]
##     Ecnmc_pvr         1.009    0.055    0.906    1.122    1.000 gamma(1,.5)[sd]
##     Land_est          1.004    0.054    0.903    1.116    1.000 gamma(1,.5)[sd]
##     Frst_st.1         1.007    0.055    0.904     1.12    1.000 gamma(1,.5)[sd]
##     Health            0.851    0.046    0.765    0.947    1.000 gamma(1,.5)[sd]
##     FR.dist           1.004    0.054    0.907    1.115    1.000 gamma(1,.5)[sd]
##     DOBB              1.021    0.056    0.917    1.136    1.000 gamma(1,.5)[sd]
##     SEX               0.247    0.013    0.222    0.274    1.000 gamma(1,.5)[sd]
##     EDUCAT            1.621    0.086    1.463    1.798    1.000 gamma(1,.5)[sd]
##     Soci_st.1         1.027    0.056    0.923    1.141    1.000 gamma(1,.5)[sd]
##     MSTATUS_D         0.144    0.008    0.129     0.16    1.000 gamma(1,.5)[sd]
##     MSTATUS_S         0.063    0.003    0.057     0.07    1.000 gamma(1,.5)[sd]
##     Alcohol           1.546    0.084    1.391    1.719    1.000 gamma(1,.5)[sd]
##     SMOKING           0.100    0.005     0.09    0.111    1.000 gamma(1,.5)[sd]
##     LOCB_EWAF         0.057    0.003    0.051    0.064    1.000 gamma(1,.5)[sd]
##     LOCB_KADO         0.070    0.004    0.063    0.078    1.000 gamma(1,.5)[sd]
##     LOCB_KADT         0.075    0.004    0.067    0.083    1.000 gamma(1,.5)[sd]
##     LOCB_KARO         0.177    0.009    0.159    0.196    1.000 gamma(1,.5)[sd]
##     LOCB_KYEM         0.057    0.003    0.051    0.063    1.000 gamma(1,.5)[sd]
##     LOCB_MARA         0.107    0.006    0.096    0.119    1.000 gamma(1,.5)[sd]
##     LOCB_NONE         0.069    0.004    0.062    0.076    1.000 gamma(1,.5)[sd]
##     LOCB_NTWO         0.082    0.004    0.074    0.091    1.000 gamma(1,.5)[sd]
##     LOCB_NYAB         0.051    0.003    0.045    0.056    1.000 gamma(1,.5)[sd]
round(100*(as.numeric(fit_main_1_sum$Estimate)-as.numeric(fit_main_2_sum$Estimate))/as.numeric(fit_main_2_sum$Estimate),2) # Fine, if it is only small 
##   [1]    0.00    0.00    0.64    0.00    0.00   -0.73    0.00    0.00    0.00
##  [10]    0.00   -1.12    1.09    0.00    0.00    0.83    0.00   -1.32    0.68
##  [19]    0.80    3.64    0.71    0.21    1.20    4.76    8.11    0.58    0.00
##  [28]    0.00   -0.10    0.10   -0.10    0.12    0.10   -2.56    0.00    0.00
##  [37]    9.09    0.00    0.00    1.49    0.00    0.00    0.54    0.00    0.00
##  [46]    0.00    0.00    0.00    0.00    0.00    0.00   -2.27    0.00    0.00
##  [55]    0.00    0.00    0.00   -1.59    0.00    0.00    0.00     NaN  -20.00
##  [64]   -4.17     NaN    0.00    0.00    0.00    0.00    0.00    0.00    0.00
##  [73]    0.00    0.00    0.00    0.00    0.00    0.00    0.00     NaN    0.00
##  [82]    0.00    0.00    0.06    0.00    0.00    0.00    0.00    2.38    0.00
##  [91]    0.00    0.00    0.00    5.56    0.00    3.57    0.00    0.00   -0.10
## [100]   -2.63    0.00    0.00    0.00    0.00    0.00    0.00    0.00     NaN
## [109]   -9.09    0.00    0.00    0.00    0.00    0.00    0.00   25.00    0.00
## [118]    0.00    0.00    0.00    0.00    0.00    0.00    0.00     NaN    0.00
## [127]    0.00    0.00    0.00    0.00     Inf    0.00    0.00    0.00    0.00
## [136]    0.00    0.00   -0.06    0.00    0.00    0.00    0.00    0.00    0.00
## [145]    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
## [154]    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
## [163]    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
## [172]    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
## [181]    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
## [190]    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
## [199]    0.00    0.00    0.00    0.00    0.00    5.56     NaN     NaN     NaN
## [208]     NaN     NaN    0.00    0.00     NaN    0.00    0.00   -0.22    0.00
## [217]    0.00    0.00    0.00    0.45    0.00    0.00    0.00    0.00    0.00
## [226] -100.00    0.00

8) ‘Is there a notable effect of the prior when compared with noninformative priors?’

# blavaan has default very weakly informative priors, so the analysis is repeated without specified priors

# Respecify the model with default weakly informative priors
model_main_4 <- ' 
    ### Main regression part
    # Key variables of interest
    PHQ8_est ~ FIES_est + Economic_poverty  
    FIES_est ~ Land_est + Economic_poverty  

    # Distance to forest reserve 
    FIES_est ~ FR.dist

    ### Covariance
    # Between socio-ecological variables
    FIES_est ~~ Forest_est.1 
    Economic_poverty ~~ Forest_est.1
    Economic_poverty ~~ Land_est
    
    # Health (treated as numeric)
    PHQ8_est ~~ Health 
    
    ### Covariates 
    # Age 
    PHQ8_est ~ DOBB + 
    
    # Sex
    SEX +

    # Education (treated as numeric)
    EDUCAT + 
    
    # Social support 
    Soci_est.1 + 
    
    # Marital status (RL = MSTATUS_Mar.pol)
    MSTATUS_Div.wid + MSTATUS_Single +
    
    # Alchohol consumption  
    Alcohol + 
    
    # Smoking 
    SMOKING 
  
    ### Location (RL = LOCB_NTC)
    PHQ8_est ~ LOCB_EWAF + LOCB_KADONE + LOCB_KADTWO + LOCB_KARO + LOCB_KYEM + LOCB_MARA + LOCB_NONE + LOCB_NTWO + LOCB_NYAB
    '

# Bayesian SEM  
fit_main_4 <- bsem(model_main_4, data=DF_analy.list[[1]], fixed.x = FALSE, n.chains = chains, burnin = burnin, sample = sample, seed = seed, target = "stan",  bcontrol = list(cores = 4))
# Load the model (if needed)
fit_main_4 <- readRDS("fit_main_4.rds")

# Calculate the bias associated with using weakly informative priors
fit_main_1_sum <- data.frame(summary(fit_main_1))[,1:2]
## blavaan (0.3-15) results of 4000 samples after 4000 adapt/burnin iterations
## 
##   Number of observations                           695
## 
##   Number of missing patterns                         1
## 
##   Statistic                                 MargLogLik         PPP
##   Value                                     -12480.392       0.000
## 
## Regressions:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##   PHQ8_est ~                                                                   
##     FIES_est          0.212    0.038    0.137    0.288    1.000     normal(1,1)
##     Economic_pvrty    0.119    0.042    0.036    0.202    1.000     normal(1,1)
##   FIES_est ~                                                                   
##     Land_est         -0.158    0.035   -0.226   -0.089    1.000  normal(-0.5,2)
##     Economic_pvrty    0.356    0.035    0.286    0.426    1.000     normal(1,1)
##     FR.dist          -0.012    0.034   -0.079    0.056    1.000  normal(-0.5,2)
##   PHQ8_est ~                                                                   
##     DOBB              0.013    0.039   -0.063    0.089    1.000   normal(0.5,2)
##     SEX               0.088    0.077   -0.061     0.24    1.000   normal(0.5,2)
##     EDUCAT           -0.093    0.031   -0.154   -0.031    1.000  normal(-0.5,2)
##     Soci_est.1       -0.048    0.037    -0.12    0.024    1.000  normal(-0.5,2)
##     MSTATUS_Div.wd   -0.018    0.101   -0.215    0.178    1.000   normal(0.5,2)
##     MSTATUS_Single    0.121    0.150    -0.17    0.413    1.000     normal(0,9)
##     Alcohol           0.005    0.029   -0.053    0.063    1.000   normal(0.5,2)
##     SMOKING           0.075    0.118   -0.158    0.307    1.000   normal(0.5,2)
##     LOCB_EWAF         0.149    0.162   -0.166    0.468    1.000     normal(0,9)
##     LOCB_KADONE       0.253    0.151   -0.045     0.55    1.000     normal(0,9)
##     LOCB_KADTWO       0.057    0.148   -0.236    0.347    1.000     normal(0,9)
##     LOCB_KARO         0.284    0.109    0.069    0.498    1.000     normal(0,9)
##     LOCB_KYEM         0.482    0.161    0.167    0.794    1.000     normal(0,9)
##     LOCB_MARA         0.084    0.129    -0.17    0.337    1.000     normal(0,9)
##     LOCB_NONE         0.044    0.152   -0.252    0.343    1.000     normal(0,9)
##     LOCB_NTWO         0.040    0.144   -0.243    0.322    1.000     normal(0,9)
##     LOCB_NYAB         0.347    0.171     0.01    0.679    1.000     normal(0,9)
## 
## Covariances:
##                       Estimate  Post.SD pi.lower pi.upper     Rhat
##  .FIES_est ~~                                                     
##     Forest_est.1         0.136    0.036    0.067    0.207    1.000
##   Economic_poverty ~~                                             
##     Forest_est.1         0.033    0.037   -0.039    0.107    1.000
##     Land_est            -0.272    0.040   -0.352   -0.195    1.000
##  .PHQ8_est ~~                                                     
##     Health              -0.165    0.038    -0.24   -0.093    1.000
##   FR.dist ~~                                                      
##     DOBB                 0.038    0.038   -0.038    0.113    1.000
##     SEX                 -0.026    0.019   -0.063    0.011    1.000
##     EDUCAT               0.005    0.047   -0.089    0.097    1.000
##     Soci_est.1           0.012    0.039   -0.065    0.088    1.000
##     MSTATUS_Div.wd      -0.013    0.014   -0.041    0.015    1.000
##     MSTATUS_Single       0.001    0.009   -0.018    0.019    1.000
##     Alcohol             -0.068    0.048   -0.162    0.023    1.000
##     SMOKING             -0.007    0.012   -0.031    0.016    1.000
##     LOCB_EWAF           -0.024    0.009   -0.042   -0.007    1.000
##     LOCB_KADONE          0.186    0.012    0.163    0.211    1.001
##     LOCB_KADTWO          0.124    0.011    0.102    0.147    1.000
##     LOCB_KARO           -0.066    0.016   -0.098   -0.035    1.000
##     LOCB_KYEM           -0.039    0.009   -0.056   -0.021    1.000
##     LOCB_MARA           -0.088    0.013   -0.114   -0.063    1.001
##     LOCB_NONE            0.005    0.010   -0.014    0.025    1.001
##     LOCB_NTWO           -0.051    0.011   -0.073    -0.03    1.000
##     LOCB_NYAB           -0.024    0.009   -0.041   -0.007    1.000
##   DOBB ~~                                                         
##     SEX                 -0.043    0.019   -0.081   -0.007    1.000
##     EDUCAT              -0.249    0.050   -0.349   -0.154    1.000
##     Soci_est.1          -0.004    0.038   -0.079     0.07    1.000
##     MSTATUS_Div.wd       0.098    0.015     0.07    0.128    1.000
##     MSTATUS_Single      -0.063    0.010   -0.083   -0.044    1.000
##     Alcohol              0.179    0.048    0.085    0.275    1.000
##     SMOKING              0.062    0.012    0.039    0.087    1.000
##     LOCB_EWAF            0.013    0.009   -0.004    0.031    1.000
##     LOCB_KADONE         -0.002    0.010   -0.022    0.017    1.000
##     LOCB_KADTWO          0.016    0.010   -0.005    0.036    1.000
##     LOCB_KARO            0.000    0.016   -0.032    0.032    1.000
##     LOCB_KYEM            0.004    0.009   -0.014    0.022    1.000
##     LOCB_MARA           -0.023    0.012   -0.048    0.001    1.000
##     LOCB_NONE            0.000    0.010   -0.019     0.02    1.000
##     LOCB_NTWO           -0.011    0.011   -0.032    0.011    1.000
##     LOCB_NYAB            0.009    0.009   -0.008    0.025    1.000
##   SEX ~~                                                          
##     EDUCAT              -0.140    0.025    -0.19   -0.093    1.000
##     Soci_est.1          -0.027    0.019   -0.065    0.011    1.000
##     MSTATUS_Div.wd       0.037    0.007    0.023    0.051    1.000
##     MSTATUS_Single      -0.009    0.005   -0.019        0    1.000
##     Alcohol             -0.097    0.023   -0.143   -0.052    1.000
##     SMOKING             -0.038    0.006    -0.05   -0.026    1.000
##     LOCB_EWAF           -0.009    0.005   -0.018        0    1.000
##     LOCB_KADONE          0.003    0.005   -0.007    0.013    1.000
##     LOCB_KADTWO         -0.007    0.005   -0.017    0.003    1.000
##     LOCB_KARO           -0.015    0.008   -0.031        0    1.000
##     LOCB_KYEM            0.001    0.004   -0.008    0.009    1.000
##     LOCB_MARA            0.000    0.006   -0.012    0.012    1.000
##     LOCB_NONE            0.005    0.005   -0.005    0.015    1.000
##     LOCB_NTWO            0.005    0.005   -0.006    0.015    1.000
##     LOCB_NYAB            0.002    0.004   -0.006     0.01    1.000
##   EDUCAT ~~                                                       
##     Soci_est.1           0.195    0.050    0.098    0.294    1.000
##     MSTATUS_Div.wd      -0.075    0.019   -0.112    -0.04    1.000
##     MSTATUS_Single       0.086    0.013    0.062    0.111    1.000
##     Alcohol             -0.048    0.060   -0.163    0.069    1.000
##     SMOKING             -0.043    0.015   -0.073   -0.013    1.000
##     LOCB_EWAF           -0.005    0.012   -0.028    0.018    1.000
##     LOCB_KADONE         -0.008    0.013   -0.032    0.017    1.000
##     LOCB_KADTWO          0.001    0.013   -0.025    0.027    1.000
##     LOCB_KARO            0.015    0.020   -0.025    0.054    1.000
##     LOCB_KYEM            0.019    0.011   -0.004    0.041    1.000
##     LOCB_MARA           -0.002    0.016   -0.033    0.028    1.000
##     LOCB_NONE            0.029    0.013    0.004    0.053    1.000
##     LOCB_NTWO           -0.056    0.014   -0.084   -0.029    1.000
##     LOCB_NYAB           -0.017    0.011   -0.039    0.004    1.000
##   Soci_est.1 ~~                                                   
##     MSTATUS_Div.wd      -0.037    0.015   -0.067   -0.009    1.000
##     MSTATUS_Single       0.030    0.010    0.011    0.049    1.000
##     Alcohol             -0.022    0.048   -0.116    0.073    1.000
##     SMOKING             -0.019    0.012   -0.043    0.004    1.000
##     LOCB_EWAF           -0.007    0.009   -0.025    0.011    1.000
##     LOCB_KADONE          0.009    0.010   -0.011    0.029    1.000
##     LOCB_KADTWO         -0.018    0.010   -0.039    0.002    1.000
##     LOCB_KARO           -0.006    0.016   -0.038    0.025    1.000
##     LOCB_KYEM            0.000    0.009   -0.018    0.019    1.000
##     LOCB_MARA            0.010    0.013   -0.014    0.035    1.000
##     LOCB_NONE           -0.001    0.010   -0.021    0.018    1.000
##     LOCB_NTWO           -0.014    0.011   -0.035    0.007    1.000
##     LOCB_NYAB            0.011    0.009   -0.006    0.028    1.000
##   MSTATUS_Div.wid ~~                                              
##     MSTATUS_Single      -0.011    0.004   -0.018   -0.004    1.000
##     Alcohol              0.023    0.018   -0.012    0.059    1.000
##     SMOKING              0.005    0.005   -0.004    0.013    1.000
##     LOCB_EWAF           -0.007    0.003   -0.014   -0.001    1.000
##     LOCB_KADONE         -0.007    0.004   -0.014        0    1.000
##     LOCB_KADTWO          0.004    0.004   -0.004    0.012    1.000
##     LOCB_KARO            0.001    0.006    -0.01    0.013    1.000
##     LOCB_KYEM            0.009    0.003    0.002    0.016    1.000
##     LOCB_MARA           -0.003    0.005   -0.012    0.007    1.000
##     LOCB_NONE           -0.008    0.004   -0.015        0    1.000
##     LOCB_NTWO           -0.003    0.004   -0.012    0.005    1.000
##     LOCB_NYAB           -0.000    0.003   -0.007    0.006    1.000
##   MSTATUS_Single ~~                                               
##     Alcohol             -0.010    0.012   -0.033    0.013    1.000
##     SMOKING             -0.006    0.003   -0.012        0    1.000
##     LOCB_EWAF           -0.001    0.002   -0.005    0.003    1.000
##     LOCB_KADONE         -0.001    0.003   -0.005    0.004    1.000
##     LOCB_KADTWO          0.001    0.003   -0.005    0.006    1.000
##     LOCB_KARO           -0.003    0.004   -0.011    0.005    1.000
##     LOCB_KYEM           -0.001    0.002   -0.005    0.003    1.000
##     LOCB_MARA            0.002    0.003   -0.004    0.008    1.000
##     LOCB_NONE            0.002    0.003   -0.003    0.007    1.000
##     LOCB_NTWO           -0.003    0.003   -0.008    0.002    1.000
##     LOCB_NYAB           -0.002    0.002   -0.006    0.002    1.000
##   Alcohol ~~                                                      
##     SMOKING              0.083    0.015    0.054    0.113    1.000
##     LOCB_EWAF            0.039    0.011    0.017    0.061    1.000
##     LOCB_KADONE         -0.014    0.012   -0.039    0.011    1.000
##     LOCB_KADTWO         -0.006    0.013   -0.032    0.019    1.000
##     LOCB_KARO           -0.019    0.020   -0.058    0.019    1.000
##     LOCB_KYEM           -0.014    0.011   -0.036    0.008    1.000
##     LOCB_MARA           -0.001    0.015   -0.031    0.029    1.000
##     LOCB_NONE           -0.003    0.012   -0.027    0.022    1.000
##     LOCB_NTWO            0.018    0.013   -0.008    0.045    1.000
##     LOCB_NYAB           -0.002    0.011   -0.023    0.018    1.000
##   SMOKING ~~                                                      
##     LOCB_EWAF            0.002    0.003   -0.004    0.008    1.000
##     LOCB_KADONE         -0.002    0.003   -0.009    0.004    1.000
##     LOCB_KADTWO         -0.006    0.003   -0.012        0    1.000
##     LOCB_KARO            0.009    0.005   -0.001    0.019    1.000
##     LOCB_KYEM           -0.002    0.003   -0.008    0.003    1.000
##     LOCB_MARA           -0.001    0.004   -0.009    0.006    1.000
##     LOCB_NONE            0.007    0.003    0.001    0.013    1.000
##     LOCB_NTWO            0.005    0.003   -0.002    0.011    1.000
##     LOCB_NYAB           -0.001    0.003   -0.007    0.004    1.000
##   LOCB_EWAF ~~                                                    
##     LOCB_KADONE         -0.004    0.002   -0.009        0    1.000
##     LOCB_KADTWO         -0.005    0.002    -0.01        0    1.000
##     LOCB_KARO           -0.013    0.004   -0.021   -0.006    1.000
##     LOCB_KYEM           -0.004    0.002   -0.008    0.001    1.000
##     LOCB_MARA           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NONE           -0.004    0.002   -0.009        0    1.000
##     LOCB_NTWO           -0.005    0.003    -0.01        0    1.000
##     LOCB_NYAB           -0.003    0.002   -0.007    0.001    1.000
##   LOCB_KADONE ~~                                                  
##     LOCB_KADTWO         -0.007    0.003   -0.012   -0.001    1.000
##     LOCB_KARO           -0.017    0.004   -0.025   -0.008    1.000
##     LOCB_KYEM           -0.004    0.002   -0.009        0    1.000
##     LOCB_MARA           -0.009    0.003   -0.015   -0.002    1.000
##     LOCB_NONE           -0.006    0.003   -0.011   -0.001    1.000
##     LOCB_NTWO           -0.006    0.003   -0.012   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.008        0    1.000
##   LOCB_KADTWO ~~                                                  
##     LOCB_KARO           -0.018    0.004   -0.026   -0.009    1.000
##     LOCB_KYEM           -0.005    0.002    -0.01        0    1.000
##     LOCB_MARA           -0.009    0.003   -0.016   -0.003    1.000
##     LOCB_NONE           -0.006    0.003   -0.011   -0.001    1.000
##     LOCB_NTWO           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.009        0    1.000
##   LOCB_KARO ~~                                                    
##     LOCB_KYEM           -0.013    0.004   -0.021   -0.006    1.000
##     LOCB_MARA           -0.027    0.005   -0.037   -0.017    1.000
##     LOCB_NONE           -0.016    0.004   -0.025   -0.008    1.000
##     LOCB_NTWO           -0.020    0.005   -0.029   -0.011    1.000
##     LOCB_NYAB           -0.012    0.004   -0.019   -0.005    1.000
##   LOCB_KYEM ~~                                                    
##     LOCB_MARA           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NONE           -0.004    0.002   -0.009        0    1.000
##     LOCB_NTWO           -0.005    0.003   -0.011        0    1.000
##     LOCB_NYAB           -0.003    0.002   -0.007    0.001    1.000
##   LOCB_MARA ~~                                                    
##     LOCB_NONE           -0.009    0.003   -0.015   -0.002    1.000
##     LOCB_NTWO           -0.011    0.004   -0.018   -0.004    1.000
##     LOCB_NYAB           -0.006    0.003   -0.012   -0.001    1.000
##   LOCB_NONE ~~                                                    
##     LOCB_NTWO           -0.006    0.003   -0.012   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.008    0.001    1.000
##   LOCB_NTWO ~~                                                    
##     LOCB_NYAB           -0.005    0.002    -0.01        0    1.000
##     Prior       
##                 
##        beta(3,2)
##                 
##        beta(3,2)
##        beta(2,3)
##                 
##        beta(2,3)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
## 
## Intercepts:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##    .PHQ8_est          0.019    0.139   -0.256    0.289    1.000    normal(0,10)
##    .FIES_est         -0.000    0.035   -0.068    0.068    1.000    normal(0,10)
##     Economic_pvrty    0.000    0.039   -0.077    0.076    1.000    normal(0,10)
##     Land_est          0.000    0.038   -0.074    0.074    1.000    normal(0,10)
##     FR.dist           0.000    0.038   -0.075    0.076    1.000    normal(0,10)
##     DOBB              0.000    0.038   -0.074    0.074    1.000    normal(0,10)
##     SEX               0.596    0.019    0.559    0.633    1.000    normal(0,10)
##     EDUCAT            2.641    0.048    2.548    2.735    1.000    normal(0,10)
##     Soci_est.1       -0.000    0.039   -0.076    0.076    1.000    normal(0,10)
##     MSTATUS_Div.wd    0.168    0.015     0.14    0.197    1.000    normal(0,10)
##     MSTATUS_Single    0.066    0.009    0.048    0.085    1.000    normal(0,10)
##     Alcohol           0.460    0.048    0.366    0.554    1.000    normal(0,10)
##     SMOKING           0.109    0.012    0.086    0.133    1.000    normal(0,10)
##     LOCB_EWAF         0.059    0.009    0.042    0.077    1.000    normal(0,10)
##     LOCB_KADONE       0.075    0.010    0.055    0.095    1.000    normal(0,10)
##     LOCB_KADTWO       0.079    0.010    0.059      0.1    1.000    normal(0,10)
##     LOCB_KARO         0.222    0.016     0.19    0.253    1.000    normal(0,10)
##     LOCB_KYEM         0.059    0.009    0.041    0.077    1.000    normal(0,10)
##     LOCB_MARA         0.118    0.012    0.094    0.142    1.000    normal(0,10)
##     LOCB_NONE         0.072    0.010    0.052    0.091    1.000    normal(0,10)
##     LOCB_NTWO         0.088    0.011    0.066    0.109    1.000    normal(0,10)
##     LOCB_NYAB         0.052    0.008    0.035    0.068    1.000    normal(0,10)
##     Forest_est.1     -0.000    0.038   -0.074    0.072    1.000    normal(0,10)
##     Health            3.222    0.035    3.153    3.291    1.000    normal(0,10)
## 
## Variances:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##    .PHQ8_est          0.828    0.046    0.745    0.924    1.000 gamma(1,.5)[sd]
##    .FIES_est          0.835    0.045    0.751    0.926    1.000 gamma(1,.5)[sd]
##     Economic_pvrty    1.008    0.054    0.906    1.118    1.000 gamma(1,.5)[sd]
##     Land_est          1.005    0.054    0.903    1.116    1.000 gamma(1,.5)[sd]
##     Forest_est.1      1.006    0.055    0.905    1.119    1.000 gamma(1,.5)[sd]
##     Health            0.852    0.046    0.768    0.946    1.000 gamma(1,.5)[sd]
##     FR.dist           1.005    0.054    0.904    1.115    1.001 gamma(1,.5)[sd]
##     DOBB              1.021    0.055    0.919    1.134    1.000 gamma(1,.5)[sd]
##     SEX               0.247    0.013    0.222    0.274    1.000 gamma(1,.5)[sd]
##     EDUCAT            1.622    0.088    1.459    1.806    1.000 gamma(1,.5)[sd]
##     Soci_est.1        1.026    0.057    0.921    1.144    1.000 gamma(1,.5)[sd]
##     MSTATUS_Div.wd    0.144    0.008    0.129     0.16    1.000 gamma(1,.5)[sd]
##     MSTATUS_Single    0.063    0.003    0.057     0.07    1.000 gamma(1,.5)[sd]
##     Alcohol           1.545    0.083    1.391    1.716    1.000 gamma(1,.5)[sd]
##     SMOKING           0.100    0.005     0.09    0.111    1.000 gamma(1,.5)[sd]
##     LOCB_EWAF         0.057    0.003    0.051    0.063    1.000 gamma(1,.5)[sd]
##     LOCB_KADONE       0.070    0.004    0.063    0.078    1.000 gamma(1,.5)[sd]
##     LOCB_KADTWO       0.075    0.004    0.067    0.083    1.000 gamma(1,.5)[sd]
##     LOCB_KARO         0.177    0.010    0.159    0.196    1.000 gamma(1,.5)[sd]
##     LOCB_KYEM         0.057    0.003    0.051    0.064    1.000 gamma(1,.5)[sd]
##     LOCB_MARA         0.107    0.006    0.096    0.119    1.000 gamma(1,.5)[sd]
##     LOCB_NONE         0.069    0.004    0.062    0.076    1.000 gamma(1,.5)[sd]
##     LOCB_NTWO         0.082    0.004    0.074    0.091    1.000 gamma(1,.5)[sd]
##     LOCB_NYAB         0.051    0.003    0.045    0.056    1.000 gamma(1,.5)[sd]
fit_main_4_sum <- data.frame(summary(fit_main_4))[,1:2]
## blavaan (0.3-15) results of 4000 samples after 4000 adapt/burnin iterations
## 
##   Number of observations                           695
## 
##   Number of missing patterns                         1
## 
##   Statistic                                 MargLogLik         PPP
##   Value                                     -12503.588       0.000
## 
## Regressions:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##   PHQ8_est ~                                                                   
##     FIES_est          0.212    0.038    0.137    0.288    1.000    normal(0,10)
##     Economic_pvrty    0.119    0.042    0.037    0.201    1.000    normal(0,10)
##   FIES_est ~                                                                   
##     Land_est         -0.158    0.036   -0.229   -0.088    1.000    normal(0,10)
##     Economic_pvrty    0.355    0.036    0.285    0.426    1.000    normal(0,10)
##     FR.dist          -0.012    0.035   -0.081    0.057    1.000    normal(0,10)
##   PHQ8_est ~                                                                   
##     DOBB              0.013    0.038   -0.062    0.086    1.000    normal(0,10)
##     SEX               0.088    0.079   -0.065    0.244    1.000    normal(0,10)
##     EDUCAT           -0.093    0.031   -0.153   -0.031    1.000    normal(0,10)
##     Soci_est.1       -0.048    0.038   -0.122    0.026    1.000    normal(0,10)
##     MSTATUS_Div.wd   -0.018    0.102   -0.219    0.181    1.000    normal(0,10)
##     MSTATUS_Single    0.120    0.149   -0.172     0.42    1.000    normal(0,10)
##     Alcohol           0.005    0.029    -0.05    0.063    1.000    normal(0,10)
##     SMOKING           0.074    0.117   -0.158    0.304    1.000    normal(0,10)
##     LOCB_EWAF         0.149    0.165   -0.172    0.477    1.000    normal(0,10)
##     LOCB_KADONE       0.255    0.148   -0.039     0.54    1.000    normal(0,10)
##     LOCB_KADTWO       0.059    0.148   -0.234    0.351    1.000    normal(0,10)
##     LOCB_KARO         0.285    0.110     0.07      0.5    1.000    normal(0,10)
##     LOCB_KYEM         0.485    0.161    0.171    0.805    1.000    normal(0,10)
##     LOCB_MARA         0.086    0.129   -0.169    0.339    1.000    normal(0,10)
##     LOCB_NONE         0.046    0.153   -0.253    0.345    1.000    normal(0,10)
##     LOCB_NTWO         0.041    0.142   -0.238    0.321    1.000    normal(0,10)
##     LOCB_NYAB         0.351    0.170    0.016    0.687    1.000    normal(0,10)
## 
## Covariances:
##                       Estimate  Post.SD pi.lower pi.upper     Rhat
##  .FIES_est ~~                                                     
##     Forest_est.1         0.137    0.036    0.068    0.207    1.000
##   Economic_poverty ~~                                             
##     Forest_est.1         0.033    0.036   -0.038    0.105    1.000
##     Land_est            -0.271    0.039    -0.35   -0.197    1.000
##  .PHQ8_est ~~                                                     
##     Health              -0.165    0.038   -0.242   -0.091    1.000
##   FR.dist ~~                                                      
##     DOBB                 0.038    0.038   -0.034    0.114    1.000
##     SEX                 -0.026    0.019   -0.063     0.01    1.000
##     EDUCAT               0.004    0.047   -0.088    0.097    1.000
##     Soci_est.1           0.012    0.039   -0.065    0.086    1.000
##     MSTATUS_Div.wd      -0.013    0.014    -0.04    0.015    1.000
##     MSTATUS_Single       0.001    0.009   -0.018    0.019    1.000
##     Alcohol             -0.068    0.047    -0.16    0.024    1.000
##     SMOKING             -0.007    0.012    -0.03    0.016    1.000
##     LOCB_EWAF           -0.024    0.009   -0.042   -0.007    1.000
##     LOCB_KADONE          0.185    0.012    0.162    0.211    1.000
##     LOCB_KADTWO          0.124    0.011    0.102    0.147    1.000
##     LOCB_KARO           -0.066    0.016   -0.098   -0.035    1.000
##     LOCB_KYEM           -0.039    0.009   -0.057   -0.021    1.001
##     LOCB_MARA           -0.088    0.013   -0.114   -0.063    1.000
##     LOCB_NONE            0.006    0.010   -0.014    0.025    1.000
##     LOCB_NTWO           -0.051    0.011   -0.073    -0.03    1.001
##     LOCB_NYAB           -0.024    0.008    -0.04   -0.007    1.000
##   DOBB ~~                                                         
##     SEX                 -0.044    0.019   -0.081   -0.007    1.000
##     EDUCAT              -0.249    0.050   -0.348   -0.153    1.000
##     Soci_est.1          -0.004    0.039   -0.081    0.072    1.000
##     MSTATUS_Div.wd       0.098    0.015    0.069    0.128    1.000
##     MSTATUS_Single      -0.063    0.010   -0.083   -0.044    1.000
##     Alcohol              0.180    0.047    0.089    0.275    1.000
##     SMOKING              0.063    0.012     0.04    0.088    1.000
##     LOCB_EWAF            0.013    0.009   -0.004    0.032    1.000
##     LOCB_KADONE         -0.002    0.010   -0.022    0.018    1.000
##     LOCB_KADTWO          0.016    0.010   -0.004    0.036    1.000
##     LOCB_KARO            0.000    0.016   -0.032    0.031    1.000
##     LOCB_KYEM            0.004    0.009   -0.013    0.022    1.000
##     LOCB_MARA           -0.024    0.013   -0.048    0.001    1.000
##     LOCB_NONE            0.000    0.010   -0.019     0.02    1.000
##     LOCB_NTWO           -0.011    0.011   -0.032    0.011    1.000
##     LOCB_NYAB            0.009    0.009   -0.008    0.026    1.000
##   SEX ~~                                                          
##     EDUCAT              -0.140    0.025   -0.189   -0.093    1.000
##     Soci_est.1          -0.027    0.019   -0.065     0.01    1.000
##     MSTATUS_Div.wd       0.036    0.007    0.023    0.051    1.000
##     MSTATUS_Single      -0.009    0.005   -0.019        0    1.000
##     Alcohol             -0.097    0.024   -0.143   -0.051    1.000
##     SMOKING             -0.038    0.006    -0.05   -0.026    1.000
##     LOCB_EWAF           -0.009    0.004   -0.018   -0.001    1.000
##     LOCB_KADONE          0.003    0.005   -0.007    0.013    1.000
##     LOCB_KADTWO         -0.007    0.005   -0.017    0.003    1.000
##     LOCB_KARO           -0.016    0.008   -0.031        0    1.000
##     LOCB_KYEM            0.001    0.004   -0.008     0.01    1.000
##     LOCB_MARA            0.000    0.006   -0.012    0.012    1.000
##     LOCB_NONE            0.005    0.005   -0.005    0.014    1.000
##     LOCB_NTWO            0.005    0.005   -0.005    0.016    1.000
##     LOCB_NYAB            0.002    0.004   -0.006    0.011    1.000
##   EDUCAT ~~                                                       
##     Soci_est.1           0.195    0.050    0.097    0.293    1.000
##     MSTATUS_Div.wd      -0.075    0.018   -0.112    -0.04    1.000
##     MSTATUS_Single       0.086    0.013    0.062    0.112    1.000
##     Alcohol             -0.049    0.059   -0.165    0.067    1.000
##     SMOKING             -0.042    0.015   -0.073   -0.013    1.000
##     LOCB_EWAF           -0.005    0.011   -0.027    0.018    1.000
##     LOCB_KADONE         -0.008    0.013   -0.033    0.017    1.000
##     LOCB_KADTWO          0.001    0.013   -0.025    0.027    1.000
##     LOCB_KARO            0.015    0.020   -0.025    0.054    1.000
##     LOCB_KYEM            0.018    0.011   -0.004    0.041    1.000
##     LOCB_MARA           -0.003    0.016   -0.034    0.028    1.000
##     LOCB_NONE            0.029    0.013    0.004    0.054    1.000
##     LOCB_NTWO           -0.056    0.014   -0.084   -0.029    1.000
##     LOCB_NYAB           -0.017    0.011   -0.039    0.004    1.000
##   Soci_est.1 ~~                                                   
##     MSTATUS_Div.wd      -0.038    0.015   -0.066   -0.009    1.000
##     MSTATUS_Single       0.030    0.010    0.011    0.049    1.000
##     Alcohol             -0.022    0.048   -0.117    0.072    1.000
##     SMOKING             -0.019    0.012   -0.043    0.004    1.000
##     LOCB_EWAF           -0.007    0.009   -0.025    0.012    1.000
##     LOCB_KADONE          0.009    0.010   -0.011    0.029    1.000
##     LOCB_KADTWO         -0.018    0.010   -0.038    0.002    1.000
##     LOCB_KARO           -0.006    0.016   -0.038    0.025    1.000
##     LOCB_KYEM            0.000    0.009   -0.018    0.018    1.000
##     LOCB_MARA            0.010    0.012   -0.015    0.035    1.000
##     LOCB_NONE           -0.001    0.010   -0.021    0.018    1.000
##     LOCB_NTWO           -0.014    0.011   -0.036    0.007    1.000
##     LOCB_NYAB            0.011    0.009   -0.006    0.028    1.000
##   MSTATUS_Div.wid ~~                                              
##     MSTATUS_Single      -0.011    0.004   -0.018   -0.004    1.000
##     Alcohol              0.023    0.018   -0.012    0.058    1.000
##     SMOKING              0.005    0.005   -0.004    0.013    1.000
##     LOCB_EWAF           -0.007    0.003   -0.014        0    1.000
##     LOCB_KADONE         -0.007    0.004   -0.014    0.001    1.000
##     LOCB_KADTWO          0.004    0.004   -0.004    0.012    1.000
##     LOCB_KARO            0.001    0.006    -0.01    0.013    1.000
##     LOCB_KYEM            0.009    0.003    0.002    0.016    1.000
##     LOCB_MARA           -0.003    0.005   -0.012    0.006    1.000
##     LOCB_NONE           -0.008    0.004   -0.015   -0.001    1.000
##     LOCB_NTWO           -0.003    0.004   -0.012    0.005    1.000
##     LOCB_NYAB           -0.000    0.003   -0.006    0.006    1.000
##   MSTATUS_Single ~~                                               
##     Alcohol             -0.010    0.012   -0.033    0.013    1.000
##     SMOKING             -0.006    0.003   -0.012        0    1.000
##     LOCB_EWAF           -0.001    0.002   -0.005    0.003    1.000
##     LOCB_KADONE         -0.001    0.002   -0.005    0.004    1.000
##     LOCB_KADTWO          0.001    0.003   -0.004    0.006    1.000
##     LOCB_KARO           -0.003    0.004   -0.011    0.005    1.000
##     LOCB_KYEM           -0.001    0.002   -0.005    0.003    1.000
##     LOCB_MARA            0.002    0.003   -0.004    0.008    1.000
##     LOCB_NONE            0.002    0.002   -0.003    0.007    1.000
##     LOCB_NTWO           -0.003    0.003   -0.008    0.003    1.000
##     LOCB_NYAB           -0.002    0.002   -0.006    0.002    1.000
##   Alcohol ~~                                                      
##     SMOKING              0.083    0.015    0.053    0.114    1.000
##     LOCB_EWAF            0.039    0.011    0.017    0.061    1.000
##     LOCB_KADONE         -0.014    0.012   -0.038     0.01    1.000
##     LOCB_KADTWO         -0.006    0.013   -0.032    0.019    1.000
##     LOCB_KARO           -0.019    0.020   -0.057    0.019    1.000
##     LOCB_KYEM           -0.014    0.011   -0.036    0.008    1.000
##     LOCB_MARA           -0.001    0.015   -0.031    0.029    1.000
##     LOCB_NONE           -0.003    0.012   -0.028    0.021    1.000
##     LOCB_NTWO            0.018    0.014   -0.008    0.045    1.000
##     LOCB_NYAB           -0.002    0.011   -0.024    0.019    1.000
##   SMOKING ~~                                                      
##     LOCB_EWAF            0.002    0.003   -0.004    0.008    1.000
##     LOCB_KADONE         -0.002    0.003   -0.009    0.004    1.000
##     LOCB_KADTWO         -0.006    0.003   -0.012        0    1.000
##     LOCB_KARO            0.009    0.005   -0.001    0.019    1.000
##     LOCB_KYEM           -0.002    0.003   -0.008    0.004    1.000
##     LOCB_MARA           -0.001    0.004   -0.009    0.006    1.000
##     LOCB_NONE            0.007    0.003    0.001    0.013    1.000
##     LOCB_NTWO            0.005    0.003   -0.002    0.012    1.000
##     LOCB_NYAB           -0.001    0.003   -0.007    0.004    1.000
##   LOCB_EWAF ~~                                                    
##     LOCB_KADONE         -0.004    0.002   -0.009        0    1.000
##     LOCB_KADTWO         -0.005    0.002    -0.01        0    1.000
##     LOCB_KARO           -0.013    0.004   -0.021   -0.006    1.000
##     LOCB_KYEM           -0.004    0.002   -0.008    0.001    1.000
##     LOCB_MARA           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NONE           -0.004    0.002   -0.009        0    1.000
##     LOCB_NTWO           -0.005    0.003   -0.011        0    1.000
##     LOCB_NYAB           -0.003    0.002   -0.007    0.001    1.000
##   LOCB_KADONE ~~                                                  
##     LOCB_KADTWO         -0.007    0.003   -0.012   -0.001    1.000
##     LOCB_KARO           -0.017    0.004   -0.025   -0.008    1.000
##     LOCB_KYEM           -0.004    0.002   -0.009        0    1.000
##     LOCB_MARA           -0.009    0.003   -0.015   -0.002    1.000
##     LOCB_NONE           -0.006    0.003   -0.011        0    1.000
##     LOCB_NTWO           -0.006    0.003   -0.012   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.008    0.001    1.000
##   LOCB_KADTWO ~~                                                  
##     LOCB_KARO           -0.018    0.004   -0.026   -0.009    1.000
##     LOCB_KYEM           -0.005    0.002   -0.009        0    1.000
##     LOCB_MARA           -0.009    0.003   -0.016   -0.002    1.000
##     LOCB_NONE           -0.006    0.003   -0.011   -0.001    1.000
##     LOCB_NTWO           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.009        0    1.000
##   LOCB_KARO ~~                                                    
##     LOCB_KYEM           -0.013    0.004   -0.021   -0.006    1.000
##     LOCB_MARA           -0.027    0.005   -0.037   -0.016    1.000
##     LOCB_NONE           -0.016    0.004   -0.025   -0.008    1.000
##     LOCB_NTWO           -0.020    0.005   -0.029   -0.011    1.000
##     LOCB_NYAB           -0.012    0.004   -0.019   -0.005    1.000
##   LOCB_KYEM ~~                                                    
##     LOCB_MARA           -0.007    0.003   -0.013   -0.002    1.000
##     LOCB_NONE           -0.004    0.002   -0.009        0    1.000
##     LOCB_NTWO           -0.005    0.003    -0.01        0    1.000
##     LOCB_NYAB           -0.003    0.002   -0.007    0.001    1.000
##   LOCB_MARA ~~                                                    
##     LOCB_NONE           -0.009    0.003   -0.015   -0.002    1.000
##     LOCB_NTWO           -0.011    0.004   -0.018   -0.004    1.000
##     LOCB_NYAB           -0.006    0.003   -0.012   -0.001    1.000
##   LOCB_NONE ~~                                                    
##     LOCB_NTWO           -0.006    0.003   -0.012   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.008    0.001    1.000
##   LOCB_NTWO ~~                                                    
##     LOCB_NYAB           -0.005    0.002   -0.009        0    1.000
##     Prior       
##                 
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
## 
## Intercepts:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##    .PHQ8_est          0.018    0.138   -0.257    0.287    1.000    normal(0,10)
##    .FIES_est          0.000    0.035   -0.067    0.068    1.000    normal(0,10)
##     Economic_pvrty   -0.000    0.038   -0.075    0.073    1.000    normal(0,10)
##     Land_est         -0.000    0.038   -0.075    0.074    1.000    normal(0,10)
##     FR.dist           0.000    0.038   -0.075    0.076    1.000    normal(0,10)
##     DOBB             -0.000    0.038   -0.074    0.074    1.000    normal(0,10)
##     SEX               0.596    0.019    0.559    0.633    1.000    normal(0,10)
##     EDUCAT            2.640    0.049    2.546    2.735    1.000    normal(0,10)
##     Soci_est.1        0.000    0.038   -0.073    0.075    1.000    normal(0,10)
##     MSTATUS_Div.wd    0.168    0.014     0.14    0.197    1.000    normal(0,10)
##     MSTATUS_Single    0.066    0.009    0.048    0.085    1.000    normal(0,10)
##     Alcohol           0.460    0.047    0.368    0.554    1.000    normal(0,10)
##     SMOKING           0.109    0.012    0.086    0.133    1.000    normal(0,10)
##     LOCB_EWAF         0.059    0.009    0.041    0.077    1.000    normal(0,10)
##     LOCB_KADONE       0.075    0.010    0.055    0.094    1.000    normal(0,10)
##     LOCB_KADTWO       0.079    0.010    0.059      0.1    1.000    normal(0,10)
##     LOCB_KARO         0.222    0.016     0.19    0.253    1.000    normal(0,10)
##     LOCB_KYEM         0.059    0.009    0.041    0.077    1.000    normal(0,10)
##     LOCB_MARA         0.118    0.012    0.093    0.143    1.000    normal(0,10)
##     LOCB_NONE         0.072    0.010    0.052    0.092    1.000    normal(0,10)
##     LOCB_NTWO         0.088    0.011    0.066    0.109    1.000    normal(0,10)
##     LOCB_NYAB         0.052    0.008    0.035    0.068    1.000    normal(0,10)
##     Forest_est.1      0.000    0.039   -0.074    0.076    1.000    normal(0,10)
##     Health            3.222    0.035    3.153    3.291    1.000    normal(0,10)
## 
## Variances:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##    .PHQ8_est          0.828    0.046    0.742    0.924    1.000 gamma(1,.5)[sd]
##    .FIES_est          0.836    0.045    0.753     0.93    1.000 gamma(1,.5)[sd]
##     Economic_pvrty    1.009    0.055    0.907    1.122    1.000 gamma(1,.5)[sd]
##     Land_est          1.005    0.054    0.904    1.116    1.000 gamma(1,.5)[sd]
##     Forest_est.1      1.007    0.054    0.907     1.12    1.000 gamma(1,.5)[sd]
##     Health            0.852    0.046    0.766    0.945    1.000 gamma(1,.5)[sd]
##     FR.dist           1.005    0.054    0.904    1.115    1.000 gamma(1,.5)[sd]
##     DOBB              1.022    0.054    0.921    1.133    1.000 gamma(1,.5)[sd]
##     SEX               0.247    0.013    0.222    0.274    1.000 gamma(1,.5)[sd]
##     EDUCAT            1.621    0.087    1.459    1.804    1.000 gamma(1,.5)[sd]
##     Soci_est.1        1.025    0.055    0.921    1.139    1.000 gamma(1,.5)[sd]
##     MSTATUS_Div.wd    0.143    0.008    0.129     0.16    1.000 gamma(1,.5)[sd]
##     MSTATUS_Single    0.063    0.003    0.057    0.071    1.000 gamma(1,.5)[sd]
##     Alcohol           1.545    0.082    1.391    1.714    1.000 gamma(1,.5)[sd]
##     SMOKING           0.100    0.005     0.09    0.111    1.000 gamma(1,.5)[sd]
##     LOCB_EWAF         0.057    0.003    0.051    0.063    1.000 gamma(1,.5)[sd]
##     LOCB_KADONE       0.070    0.004    0.063    0.078    1.000 gamma(1,.5)[sd]
##     LOCB_KADTWO       0.074    0.004    0.067    0.083    1.000 gamma(1,.5)[sd]
##     LOCB_KARO         0.177    0.010    0.159    0.197    1.000 gamma(1,.5)[sd]
##     LOCB_KYEM         0.057    0.003    0.051    0.063    1.000 gamma(1,.5)[sd]
##     LOCB_MARA         0.107    0.006    0.096    0.119    1.000 gamma(1,.5)[sd]
##     LOCB_NONE         0.069    0.004    0.062    0.076    1.000 gamma(1,.5)[sd]
##     LOCB_NTWO         0.082    0.004    0.074    0.091    1.000 gamma(1,.5)[sd]
##     LOCB_NYAB         0.051    0.003    0.045    0.056    1.000 gamma(1,.5)[sd]
round(100*(as.numeric(fit_main_1_sum$Estimate)-as.numeric(fit_main_4_sum$Estimate))/as.numeric(fit_main_4_sum$Estimate),2) # Fine, if it is only small 
##   [1]   0.00   0.00   0.00   0.28   0.00  -0.73   0.00   0.37   0.00   0.00
##  [11]   0.00   0.00   0.00   0.00   0.83   0.00   1.35   0.00  -0.78  -3.39
##  [21]  -0.35  -0.62  -2.33  -4.35  -2.44  -1.14   0.00  -0.12  -0.10   0.00
##  [31]  -0.10   0.00   0.00   0.00   0.00  25.00   0.00   0.00   0.00   0.00
##  [41]   0.00   0.00   0.54   0.00   0.00   0.00   0.00 -16.67   0.00   0.00
##  [51]  -0.10  -2.27   0.00   0.00   0.00   0.00  -0.56  -1.59   0.00   0.00
##  [61]   0.00    NaN   0.00  -4.17    NaN   0.00   0.00   0.00   0.00   0.00
##  [71]   2.78   0.00   0.00   0.00   0.00   0.00   0.00  -6.25   0.00    NaN
##  [81]   0.00   0.00   0.00   0.06   0.00   0.00   0.00  -2.04   2.38   0.00
##  [91]   0.00   0.00   0.00   5.56 -33.33   0.00   0.00   0.00   0.10  -2.63
## [101]   0.00   0.00   0.00   0.00   0.00   0.00   0.00    NaN   0.00   0.00
## [111]   0.00   0.00   0.70   0.00   0.00   0.00   0.00   0.00   0.00   0.00
## [121]   0.00   0.00   0.00   0.00    NaN   0.00   0.00   0.00   0.00   0.00
## [131]   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
## [141]   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
## [151]   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
## [161]   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
## [171]   0.00   0.00   0.00   0.00   0.00   1.35   0.00   0.00   0.00   0.00
## [181]   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
## [191]   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
## [201]   0.00   0.00   0.00   5.56    NaN    NaN    NaN    NaN    NaN   0.00
## [211]   0.04    NaN   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
## [221]   0.00   0.00   0.00   0.00   0.00    NaN   0.00

2.9) ‘Are the results stable from a sensitivity analysis?’

# Shifting the hyperparameters 'up' (specifically the mean and the shape of the beta distribution) 
model_main_5 <- ' 
    ### Main regression part
    # Key variables of interest
    PHQ8_est ~ prior("normal(2, 1)")*FIES_est + prior("normal(2, 1)")*Economic_poverty  
    FIES_est ~ prior("normal(0.5, 2)")*Land_est + prior("normal(2, 1)")*Economic_poverty  

    # Distance to forest reserve 
    FIES_est ~ prior("normal(0.5, 2)")*FR.dist

    ### Covariance
    # Between socio-ecological variables
    FIES_est ~~ prior("beta(4, 2)")*Forest_est.1 
    Economic_poverty ~~ prior("beta(4, 2)")*Forest_est.1
    Economic_poverty ~~ prior("beta(3, 3)")*Land_est
    
    # Health (treated as numeric)
    PHQ8_est ~~ prior("beta(3, 3)")*Health 
    
    ### Covariates 
    # Age 
    PHQ8_est ~ prior("normal(1.5, 2)")*DOBB + 
    
    # Sex
    prior("normal(1.5, 2)")*SEX +

    # Education (treated as numeric)
    prior("normal(0.5, 2)")*EDUCAT + 
    
    # Social support 
    prior("normal(0.5, 2)")*Soci_est.1 + 
    
    # Marital status (RL = MSTATUS_Mar.pol)
    prior("normal(1.5, 2)")*MSTATUS_Div.wid + prior("normal(0, 9)")*MSTATUS_Single +
    
    # Alchohol consumption  
    prior("normal(1.5, 2)")*Alcohol + 
    
    # Smoking 
    prior("normal(1.5, 2)")*SMOKING 
  
    ### Location (RL = LOCB_NTC)
    PHQ8_est ~ prior("normal(1, 9)")*LOCB_EWAF + prior("normal(1, 9)")*LOCB_KADONE + prior("normal(1, 9)")*LOCB_KADTWO + prior("normal(1, 9)")*LOCB_KARO + prior("normal(1, 9)")*LOCB_KYEM + prior("normal(1, 9)")*LOCB_MARA + prior("normal(1, 9)")*LOCB_NONE + prior("normal(1, 9)")*LOCB_NTWO + prior("normal(1, 9)")*LOCB_NYAB
    '
# Bayesian SEM  
fit_main_5 <- bsem(model_main_5, data=DF_analy.list[[1]], fixed.x = FALSE, n.chains = chains, burnin = burnin, sample = sample, seed = seed, target = "stan",  bcontrol = list(cores = 4))
# Load the model (if needed)
fit_main_5 <- readRDS("fit_main_5.rds")

# Calculate the bias associated with using 'up' shifted hyperparameters
fit_main_1_sum <- data.frame(summary(fit_main_1))[,1:2]
## blavaan (0.3-15) results of 4000 samples after 4000 adapt/burnin iterations
## 
##   Number of observations                           695
## 
##   Number of missing patterns                         1
## 
##   Statistic                                 MargLogLik         PPP
##   Value                                     -12480.392       0.000
## 
## Regressions:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##   PHQ8_est ~                                                                   
##     FIES_est          0.212    0.038    0.137    0.288    1.000     normal(1,1)
##     Economic_pvrty    0.119    0.042    0.036    0.202    1.000     normal(1,1)
##   FIES_est ~                                                                   
##     Land_est         -0.158    0.035   -0.226   -0.089    1.000  normal(-0.5,2)
##     Economic_pvrty    0.356    0.035    0.286    0.426    1.000     normal(1,1)
##     FR.dist          -0.012    0.034   -0.079    0.056    1.000  normal(-0.5,2)
##   PHQ8_est ~                                                                   
##     DOBB              0.013    0.039   -0.063    0.089    1.000   normal(0.5,2)
##     SEX               0.088    0.077   -0.061     0.24    1.000   normal(0.5,2)
##     EDUCAT           -0.093    0.031   -0.154   -0.031    1.000  normal(-0.5,2)
##     Soci_est.1       -0.048    0.037    -0.12    0.024    1.000  normal(-0.5,2)
##     MSTATUS_Div.wd   -0.018    0.101   -0.215    0.178    1.000   normal(0.5,2)
##     MSTATUS_Single    0.121    0.150    -0.17    0.413    1.000     normal(0,9)
##     Alcohol           0.005    0.029   -0.053    0.063    1.000   normal(0.5,2)
##     SMOKING           0.075    0.118   -0.158    0.307    1.000   normal(0.5,2)
##     LOCB_EWAF         0.149    0.162   -0.166    0.468    1.000     normal(0,9)
##     LOCB_KADONE       0.253    0.151   -0.045     0.55    1.000     normal(0,9)
##     LOCB_KADTWO       0.057    0.148   -0.236    0.347    1.000     normal(0,9)
##     LOCB_KARO         0.284    0.109    0.069    0.498    1.000     normal(0,9)
##     LOCB_KYEM         0.482    0.161    0.167    0.794    1.000     normal(0,9)
##     LOCB_MARA         0.084    0.129    -0.17    0.337    1.000     normal(0,9)
##     LOCB_NONE         0.044    0.152   -0.252    0.343    1.000     normal(0,9)
##     LOCB_NTWO         0.040    0.144   -0.243    0.322    1.000     normal(0,9)
##     LOCB_NYAB         0.347    0.171     0.01    0.679    1.000     normal(0,9)
## 
## Covariances:
##                       Estimate  Post.SD pi.lower pi.upper     Rhat
##  .FIES_est ~~                                                     
##     Forest_est.1         0.136    0.036    0.067    0.207    1.000
##   Economic_poverty ~~                                             
##     Forest_est.1         0.033    0.037   -0.039    0.107    1.000
##     Land_est            -0.272    0.040   -0.352   -0.195    1.000
##  .PHQ8_est ~~                                                     
##     Health              -0.165    0.038    -0.24   -0.093    1.000
##   FR.dist ~~                                                      
##     DOBB                 0.038    0.038   -0.038    0.113    1.000
##     SEX                 -0.026    0.019   -0.063    0.011    1.000
##     EDUCAT               0.005    0.047   -0.089    0.097    1.000
##     Soci_est.1           0.012    0.039   -0.065    0.088    1.000
##     MSTATUS_Div.wd      -0.013    0.014   -0.041    0.015    1.000
##     MSTATUS_Single       0.001    0.009   -0.018    0.019    1.000
##     Alcohol             -0.068    0.048   -0.162    0.023    1.000
##     SMOKING             -0.007    0.012   -0.031    0.016    1.000
##     LOCB_EWAF           -0.024    0.009   -0.042   -0.007    1.000
##     LOCB_KADONE          0.186    0.012    0.163    0.211    1.001
##     LOCB_KADTWO          0.124    0.011    0.102    0.147    1.000
##     LOCB_KARO           -0.066    0.016   -0.098   -0.035    1.000
##     LOCB_KYEM           -0.039    0.009   -0.056   -0.021    1.000
##     LOCB_MARA           -0.088    0.013   -0.114   -0.063    1.001
##     LOCB_NONE            0.005    0.010   -0.014    0.025    1.001
##     LOCB_NTWO           -0.051    0.011   -0.073    -0.03    1.000
##     LOCB_NYAB           -0.024    0.009   -0.041   -0.007    1.000
##   DOBB ~~                                                         
##     SEX                 -0.043    0.019   -0.081   -0.007    1.000
##     EDUCAT              -0.249    0.050   -0.349   -0.154    1.000
##     Soci_est.1          -0.004    0.038   -0.079     0.07    1.000
##     MSTATUS_Div.wd       0.098    0.015     0.07    0.128    1.000
##     MSTATUS_Single      -0.063    0.010   -0.083   -0.044    1.000
##     Alcohol              0.179    0.048    0.085    0.275    1.000
##     SMOKING              0.062    0.012    0.039    0.087    1.000
##     LOCB_EWAF            0.013    0.009   -0.004    0.031    1.000
##     LOCB_KADONE         -0.002    0.010   -0.022    0.017    1.000
##     LOCB_KADTWO          0.016    0.010   -0.005    0.036    1.000
##     LOCB_KARO            0.000    0.016   -0.032    0.032    1.000
##     LOCB_KYEM            0.004    0.009   -0.014    0.022    1.000
##     LOCB_MARA           -0.023    0.012   -0.048    0.001    1.000
##     LOCB_NONE            0.000    0.010   -0.019     0.02    1.000
##     LOCB_NTWO           -0.011    0.011   -0.032    0.011    1.000
##     LOCB_NYAB            0.009    0.009   -0.008    0.025    1.000
##   SEX ~~                                                          
##     EDUCAT              -0.140    0.025    -0.19   -0.093    1.000
##     Soci_est.1          -0.027    0.019   -0.065    0.011    1.000
##     MSTATUS_Div.wd       0.037    0.007    0.023    0.051    1.000
##     MSTATUS_Single      -0.009    0.005   -0.019        0    1.000
##     Alcohol             -0.097    0.023   -0.143   -0.052    1.000
##     SMOKING             -0.038    0.006    -0.05   -0.026    1.000
##     LOCB_EWAF           -0.009    0.005   -0.018        0    1.000
##     LOCB_KADONE          0.003    0.005   -0.007    0.013    1.000
##     LOCB_KADTWO         -0.007    0.005   -0.017    0.003    1.000
##     LOCB_KARO           -0.015    0.008   -0.031        0    1.000
##     LOCB_KYEM            0.001    0.004   -0.008    0.009    1.000
##     LOCB_MARA            0.000    0.006   -0.012    0.012    1.000
##     LOCB_NONE            0.005    0.005   -0.005    0.015    1.000
##     LOCB_NTWO            0.005    0.005   -0.006    0.015    1.000
##     LOCB_NYAB            0.002    0.004   -0.006     0.01    1.000
##   EDUCAT ~~                                                       
##     Soci_est.1           0.195    0.050    0.098    0.294    1.000
##     MSTATUS_Div.wd      -0.075    0.019   -0.112    -0.04    1.000
##     MSTATUS_Single       0.086    0.013    0.062    0.111    1.000
##     Alcohol             -0.048    0.060   -0.163    0.069    1.000
##     SMOKING             -0.043    0.015   -0.073   -0.013    1.000
##     LOCB_EWAF           -0.005    0.012   -0.028    0.018    1.000
##     LOCB_KADONE         -0.008    0.013   -0.032    0.017    1.000
##     LOCB_KADTWO          0.001    0.013   -0.025    0.027    1.000
##     LOCB_KARO            0.015    0.020   -0.025    0.054    1.000
##     LOCB_KYEM            0.019    0.011   -0.004    0.041    1.000
##     LOCB_MARA           -0.002    0.016   -0.033    0.028    1.000
##     LOCB_NONE            0.029    0.013    0.004    0.053    1.000
##     LOCB_NTWO           -0.056    0.014   -0.084   -0.029    1.000
##     LOCB_NYAB           -0.017    0.011   -0.039    0.004    1.000
##   Soci_est.1 ~~                                                   
##     MSTATUS_Div.wd      -0.037    0.015   -0.067   -0.009    1.000
##     MSTATUS_Single       0.030    0.010    0.011    0.049    1.000
##     Alcohol             -0.022    0.048   -0.116    0.073    1.000
##     SMOKING             -0.019    0.012   -0.043    0.004    1.000
##     LOCB_EWAF           -0.007    0.009   -0.025    0.011    1.000
##     LOCB_KADONE          0.009    0.010   -0.011    0.029    1.000
##     LOCB_KADTWO         -0.018    0.010   -0.039    0.002    1.000
##     LOCB_KARO           -0.006    0.016   -0.038    0.025    1.000
##     LOCB_KYEM            0.000    0.009   -0.018    0.019    1.000
##     LOCB_MARA            0.010    0.013   -0.014    0.035    1.000
##     LOCB_NONE           -0.001    0.010   -0.021    0.018    1.000
##     LOCB_NTWO           -0.014    0.011   -0.035    0.007    1.000
##     LOCB_NYAB            0.011    0.009   -0.006    0.028    1.000
##   MSTATUS_Div.wid ~~                                              
##     MSTATUS_Single      -0.011    0.004   -0.018   -0.004    1.000
##     Alcohol              0.023    0.018   -0.012    0.059    1.000
##     SMOKING              0.005    0.005   -0.004    0.013    1.000
##     LOCB_EWAF           -0.007    0.003   -0.014   -0.001    1.000
##     LOCB_KADONE         -0.007    0.004   -0.014        0    1.000
##     LOCB_KADTWO          0.004    0.004   -0.004    0.012    1.000
##     LOCB_KARO            0.001    0.006    -0.01    0.013    1.000
##     LOCB_KYEM            0.009    0.003    0.002    0.016    1.000
##     LOCB_MARA           -0.003    0.005   -0.012    0.007    1.000
##     LOCB_NONE           -0.008    0.004   -0.015        0    1.000
##     LOCB_NTWO           -0.003    0.004   -0.012    0.005    1.000
##     LOCB_NYAB           -0.000    0.003   -0.007    0.006    1.000
##   MSTATUS_Single ~~                                               
##     Alcohol             -0.010    0.012   -0.033    0.013    1.000
##     SMOKING             -0.006    0.003   -0.012        0    1.000
##     LOCB_EWAF           -0.001    0.002   -0.005    0.003    1.000
##     LOCB_KADONE         -0.001    0.003   -0.005    0.004    1.000
##     LOCB_KADTWO          0.001    0.003   -0.005    0.006    1.000
##     LOCB_KARO           -0.003    0.004   -0.011    0.005    1.000
##     LOCB_KYEM           -0.001    0.002   -0.005    0.003    1.000
##     LOCB_MARA            0.002    0.003   -0.004    0.008    1.000
##     LOCB_NONE            0.002    0.003   -0.003    0.007    1.000
##     LOCB_NTWO           -0.003    0.003   -0.008    0.002    1.000
##     LOCB_NYAB           -0.002    0.002   -0.006    0.002    1.000
##   Alcohol ~~                                                      
##     SMOKING              0.083    0.015    0.054    0.113    1.000
##     LOCB_EWAF            0.039    0.011    0.017    0.061    1.000
##     LOCB_KADONE         -0.014    0.012   -0.039    0.011    1.000
##     LOCB_KADTWO         -0.006    0.013   -0.032    0.019    1.000
##     LOCB_KARO           -0.019    0.020   -0.058    0.019    1.000
##     LOCB_KYEM           -0.014    0.011   -0.036    0.008    1.000
##     LOCB_MARA           -0.001    0.015   -0.031    0.029    1.000
##     LOCB_NONE           -0.003    0.012   -0.027    0.022    1.000
##     LOCB_NTWO            0.018    0.013   -0.008    0.045    1.000
##     LOCB_NYAB           -0.002    0.011   -0.023    0.018    1.000
##   SMOKING ~~                                                      
##     LOCB_EWAF            0.002    0.003   -0.004    0.008    1.000
##     LOCB_KADONE         -0.002    0.003   -0.009    0.004    1.000
##     LOCB_KADTWO         -0.006    0.003   -0.012        0    1.000
##     LOCB_KARO            0.009    0.005   -0.001    0.019    1.000
##     LOCB_KYEM           -0.002    0.003   -0.008    0.003    1.000
##     LOCB_MARA           -0.001    0.004   -0.009    0.006    1.000
##     LOCB_NONE            0.007    0.003    0.001    0.013    1.000
##     LOCB_NTWO            0.005    0.003   -0.002    0.011    1.000
##     LOCB_NYAB           -0.001    0.003   -0.007    0.004    1.000
##   LOCB_EWAF ~~                                                    
##     LOCB_KADONE         -0.004    0.002   -0.009        0    1.000
##     LOCB_KADTWO         -0.005    0.002    -0.01        0    1.000
##     LOCB_KARO           -0.013    0.004   -0.021   -0.006    1.000
##     LOCB_KYEM           -0.004    0.002   -0.008    0.001    1.000
##     LOCB_MARA           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NONE           -0.004    0.002   -0.009        0    1.000
##     LOCB_NTWO           -0.005    0.003    -0.01        0    1.000
##     LOCB_NYAB           -0.003    0.002   -0.007    0.001    1.000
##   LOCB_KADONE ~~                                                  
##     LOCB_KADTWO         -0.007    0.003   -0.012   -0.001    1.000
##     LOCB_KARO           -0.017    0.004   -0.025   -0.008    1.000
##     LOCB_KYEM           -0.004    0.002   -0.009        0    1.000
##     LOCB_MARA           -0.009    0.003   -0.015   -0.002    1.000
##     LOCB_NONE           -0.006    0.003   -0.011   -0.001    1.000
##     LOCB_NTWO           -0.006    0.003   -0.012   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.008        0    1.000
##   LOCB_KADTWO ~~                                                  
##     LOCB_KARO           -0.018    0.004   -0.026   -0.009    1.000
##     LOCB_KYEM           -0.005    0.002    -0.01        0    1.000
##     LOCB_MARA           -0.009    0.003   -0.016   -0.003    1.000
##     LOCB_NONE           -0.006    0.003   -0.011   -0.001    1.000
##     LOCB_NTWO           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.009        0    1.000
##   LOCB_KARO ~~                                                    
##     LOCB_KYEM           -0.013    0.004   -0.021   -0.006    1.000
##     LOCB_MARA           -0.027    0.005   -0.037   -0.017    1.000
##     LOCB_NONE           -0.016    0.004   -0.025   -0.008    1.000
##     LOCB_NTWO           -0.020    0.005   -0.029   -0.011    1.000
##     LOCB_NYAB           -0.012    0.004   -0.019   -0.005    1.000
##   LOCB_KYEM ~~                                                    
##     LOCB_MARA           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NONE           -0.004    0.002   -0.009        0    1.000
##     LOCB_NTWO           -0.005    0.003   -0.011        0    1.000
##     LOCB_NYAB           -0.003    0.002   -0.007    0.001    1.000
##   LOCB_MARA ~~                                                    
##     LOCB_NONE           -0.009    0.003   -0.015   -0.002    1.000
##     LOCB_NTWO           -0.011    0.004   -0.018   -0.004    1.000
##     LOCB_NYAB           -0.006    0.003   -0.012   -0.001    1.000
##   LOCB_NONE ~~                                                    
##     LOCB_NTWO           -0.006    0.003   -0.012   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.008    0.001    1.000
##   LOCB_NTWO ~~                                                    
##     LOCB_NYAB           -0.005    0.002    -0.01        0    1.000
##     Prior       
##                 
##        beta(3,2)
##                 
##        beta(3,2)
##        beta(2,3)
##                 
##        beta(2,3)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
## 
## Intercepts:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##    .PHQ8_est          0.019    0.139   -0.256    0.289    1.000    normal(0,10)
##    .FIES_est         -0.000    0.035   -0.068    0.068    1.000    normal(0,10)
##     Economic_pvrty    0.000    0.039   -0.077    0.076    1.000    normal(0,10)
##     Land_est          0.000    0.038   -0.074    0.074    1.000    normal(0,10)
##     FR.dist           0.000    0.038   -0.075    0.076    1.000    normal(0,10)
##     DOBB              0.000    0.038   -0.074    0.074    1.000    normal(0,10)
##     SEX               0.596    0.019    0.559    0.633    1.000    normal(0,10)
##     EDUCAT            2.641    0.048    2.548    2.735    1.000    normal(0,10)
##     Soci_est.1       -0.000    0.039   -0.076    0.076    1.000    normal(0,10)
##     MSTATUS_Div.wd    0.168    0.015     0.14    0.197    1.000    normal(0,10)
##     MSTATUS_Single    0.066    0.009    0.048    0.085    1.000    normal(0,10)
##     Alcohol           0.460    0.048    0.366    0.554    1.000    normal(0,10)
##     SMOKING           0.109    0.012    0.086    0.133    1.000    normal(0,10)
##     LOCB_EWAF         0.059    0.009    0.042    0.077    1.000    normal(0,10)
##     LOCB_KADONE       0.075    0.010    0.055    0.095    1.000    normal(0,10)
##     LOCB_KADTWO       0.079    0.010    0.059      0.1    1.000    normal(0,10)
##     LOCB_KARO         0.222    0.016     0.19    0.253    1.000    normal(0,10)
##     LOCB_KYEM         0.059    0.009    0.041    0.077    1.000    normal(0,10)
##     LOCB_MARA         0.118    0.012    0.094    0.142    1.000    normal(0,10)
##     LOCB_NONE         0.072    0.010    0.052    0.091    1.000    normal(0,10)
##     LOCB_NTWO         0.088    0.011    0.066    0.109    1.000    normal(0,10)
##     LOCB_NYAB         0.052    0.008    0.035    0.068    1.000    normal(0,10)
##     Forest_est.1     -0.000    0.038   -0.074    0.072    1.000    normal(0,10)
##     Health            3.222    0.035    3.153    3.291    1.000    normal(0,10)
## 
## Variances:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##    .PHQ8_est          0.828    0.046    0.745    0.924    1.000 gamma(1,.5)[sd]
##    .FIES_est          0.835    0.045    0.751    0.926    1.000 gamma(1,.5)[sd]
##     Economic_pvrty    1.008    0.054    0.906    1.118    1.000 gamma(1,.5)[sd]
##     Land_est          1.005    0.054    0.903    1.116    1.000 gamma(1,.5)[sd]
##     Forest_est.1      1.006    0.055    0.905    1.119    1.000 gamma(1,.5)[sd]
##     Health            0.852    0.046    0.768    0.946    1.000 gamma(1,.5)[sd]
##     FR.dist           1.005    0.054    0.904    1.115    1.001 gamma(1,.5)[sd]
##     DOBB              1.021    0.055    0.919    1.134    1.000 gamma(1,.5)[sd]
##     SEX               0.247    0.013    0.222    0.274    1.000 gamma(1,.5)[sd]
##     EDUCAT            1.622    0.088    1.459    1.806    1.000 gamma(1,.5)[sd]
##     Soci_est.1        1.026    0.057    0.921    1.144    1.000 gamma(1,.5)[sd]
##     MSTATUS_Div.wd    0.144    0.008    0.129     0.16    1.000 gamma(1,.5)[sd]
##     MSTATUS_Single    0.063    0.003    0.057     0.07    1.000 gamma(1,.5)[sd]
##     Alcohol           1.545    0.083    1.391    1.716    1.000 gamma(1,.5)[sd]
##     SMOKING           0.100    0.005     0.09    0.111    1.000 gamma(1,.5)[sd]
##     LOCB_EWAF         0.057    0.003    0.051    0.063    1.000 gamma(1,.5)[sd]
##     LOCB_KADONE       0.070    0.004    0.063    0.078    1.000 gamma(1,.5)[sd]
##     LOCB_KADTWO       0.075    0.004    0.067    0.083    1.000 gamma(1,.5)[sd]
##     LOCB_KARO         0.177    0.010    0.159    0.196    1.000 gamma(1,.5)[sd]
##     LOCB_KYEM         0.057    0.003    0.051    0.064    1.000 gamma(1,.5)[sd]
##     LOCB_MARA         0.107    0.006    0.096    0.119    1.000 gamma(1,.5)[sd]
##     LOCB_NONE         0.069    0.004    0.062    0.076    1.000 gamma(1,.5)[sd]
##     LOCB_NTWO         0.082    0.004    0.074    0.091    1.000 gamma(1,.5)[sd]
##     LOCB_NYAB         0.051    0.003    0.045    0.056    1.000 gamma(1,.5)[sd]
fit_main_5_sum <- data.frame(summary(fit_main_5))[,1:2]
## blavaan (0.3-15) results of 4000 samples after 4000 adapt/burnin iterations
## 
##   Number of observations                           695
## 
##   Number of missing patterns                         1
## 
##   Statistic                                 MargLogLik         PPP
##   Value                                     -12485.726       0.000
## 
## Regressions:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##   PHQ8_est ~                                                                   
##     FIES_est          0.214    0.038    0.138    0.289    1.000     normal(2,1)
##     Economic_pvrty    0.121    0.042    0.038    0.203    1.000     normal(2,1)
##   FIES_est ~                                                                   
##     Land_est         -0.157    0.035   -0.227   -0.088    1.000   normal(0.5,2)
##     Economic_pvrty    0.358    0.037    0.286    0.429    1.000     normal(2,1)
##     FR.dist          -0.011    0.035   -0.079    0.057    1.000   normal(0.5,2)
##   PHQ8_est ~                                                                   
##     DOBB              0.014    0.038   -0.061    0.089    1.000   normal(1.5,2)
##     SEX               0.090    0.078   -0.062    0.242    1.000   normal(1.5,2)
##     EDUCAT           -0.092    0.031   -0.153   -0.031    1.000   normal(0.5,2)
##     Soci_est.1       -0.047    0.037   -0.119    0.026    1.000   normal(0.5,2)
##     MSTATUS_Div.wd   -0.015    0.101   -0.213    0.185    1.000   normal(1.5,2)
##     MSTATUS_Single    0.124    0.144   -0.158    0.414    1.000     normal(0,9)
##     Alcohol           0.006    0.029   -0.052    0.062    1.000   normal(1.5,2)
##     SMOKING           0.078    0.118   -0.154    0.312    1.000   normal(1.5,2)
##     LOCB_EWAF         0.149    0.165   -0.174    0.477    1.000     normal(1,9)
##     LOCB_KADONE       0.254    0.150   -0.036    0.553    1.000     normal(1,9)
##     LOCB_KADTWO       0.057    0.147   -0.229    0.344    1.000     normal(1,9)
##     LOCB_KARO         0.284    0.110    0.067      0.5    1.000     normal(1,9)
##     LOCB_KYEM         0.482    0.163    0.161    0.805    1.000     normal(1,9)
##     LOCB_MARA         0.085    0.128   -0.165    0.337    1.000     normal(1,9)
##     LOCB_NONE         0.045    0.154   -0.258    0.346    1.000     normal(1,9)
##     LOCB_NTWO         0.040    0.144   -0.243    0.322    1.000     normal(1,9)
##     LOCB_NYAB         0.349    0.170    0.017     0.68    1.000     normal(1,9)
## 
## Covariances:
##                       Estimate  Post.SD pi.lower pi.upper     Rhat
##  .FIES_est ~~                                                     
##     Forest_est.1         0.137    0.036    0.068    0.209    1.000
##   Economic_poverty ~~                                             
##     Forest_est.1         0.034    0.037   -0.039    0.109    1.000
##     Land_est            -0.272    0.040   -0.352   -0.197    1.000
##  .PHQ8_est ~~                                                     
##     Health              -0.162    0.038   -0.239   -0.091    1.000
##   FR.dist ~~                                                      
##     DOBB                 0.038    0.038   -0.039    0.113    1.000
##     SEX                 -0.026    0.019   -0.063     0.01    1.000
##     EDUCAT               0.004    0.048    -0.09    0.099    1.000
##     Soci_est.1           0.011    0.038   -0.065    0.086    1.000
##     MSTATUS_Div.wd      -0.013    0.014   -0.041    0.015    1.000
##     MSTATUS_Single       0.001    0.009   -0.018    0.019    1.000
##     Alcohol             -0.068    0.047   -0.161    0.024    1.000
##     SMOKING             -0.007    0.012   -0.031    0.016    1.000
##     LOCB_EWAF           -0.024    0.009   -0.042   -0.007    1.000
##     LOCB_KADONE          0.185    0.012    0.162     0.21    1.000
##     LOCB_KADTWO          0.124    0.011    0.103    0.147    1.000
##     LOCB_KARO           -0.066    0.016   -0.098   -0.035    1.000
##     LOCB_KYEM           -0.039    0.009   -0.057   -0.021    1.001
##     LOCB_MARA           -0.088    0.013   -0.113   -0.064    1.000
##     LOCB_NONE            0.005    0.010   -0.014    0.025    1.000
##     LOCB_NTWO           -0.051    0.011   -0.073    -0.03    1.000
##     LOCB_NYAB           -0.024    0.009   -0.041   -0.007    1.001
##   DOBB ~~                                                         
##     SEX                 -0.044    0.019   -0.081   -0.007    1.000
##     EDUCAT              -0.249    0.050   -0.348   -0.153    1.000
##     Soci_est.1          -0.004    0.039   -0.079    0.072    1.000
##     MSTATUS_Div.wd       0.098    0.015    0.069    0.128    1.000
##     MSTATUS_Single      -0.063    0.010   -0.083   -0.044    1.000
##     Alcohol              0.178    0.048    0.086    0.273    1.000
##     SMOKING              0.062    0.012    0.039    0.087    1.000
##     LOCB_EWAF            0.013    0.009   -0.005    0.031    1.000
##     LOCB_KADONE         -0.002    0.010   -0.022    0.018    1.000
##     LOCB_KADTWO          0.016    0.010   -0.004    0.036    1.000
##     LOCB_KARO            0.000    0.016   -0.031    0.031    1.000
##     LOCB_KYEM            0.005    0.009   -0.013    0.022    1.000
##     LOCB_MARA           -0.023    0.012   -0.048    0.001    1.000
##     LOCB_NONE           -0.000    0.010   -0.019    0.019    1.000
##     LOCB_NTWO           -0.011    0.011   -0.032     0.01    1.000
##     LOCB_NYAB            0.009    0.009   -0.008    0.026    1.000
##   SEX ~~                                                          
##     EDUCAT              -0.140    0.024   -0.189   -0.092    1.000
##     Soci_est.1          -0.027    0.019   -0.065    0.009    1.000
##     MSTATUS_Div.wd       0.036    0.007    0.023    0.051    1.000
##     MSTATUS_Single      -0.009    0.005   -0.018        0    1.000
##     Alcohol             -0.097    0.024   -0.145   -0.051    1.000
##     SMOKING             -0.038    0.006    -0.05   -0.026    1.000
##     LOCB_EWAF           -0.009    0.004   -0.018   -0.001    1.000
##     LOCB_KADONE          0.003    0.005   -0.007    0.013    1.000
##     LOCB_KADTWO         -0.007    0.005   -0.017    0.003    1.000
##     LOCB_KARO           -0.015    0.008   -0.031        0    1.000
##     LOCB_KYEM            0.001    0.004   -0.008     0.01    1.000
##     LOCB_MARA            0.000    0.006   -0.012    0.012    1.000
##     LOCB_NONE            0.005    0.005   -0.005    0.014    1.000
##     LOCB_NTWO            0.005    0.005   -0.006    0.016    1.000
##     LOCB_NYAB            0.002    0.004   -0.006     0.01    1.000
##   EDUCAT ~~                                                       
##     Soci_est.1           0.194    0.049      0.1    0.292    1.000
##     MSTATUS_Div.wd      -0.075    0.019   -0.111   -0.038    1.000
##     MSTATUS_Single       0.086    0.013    0.062    0.112    1.000
##     Alcohol             -0.047    0.060   -0.164    0.068    1.000
##     SMOKING             -0.043    0.015   -0.073   -0.012    1.000
##     LOCB_EWAF           -0.005    0.011   -0.027    0.018    1.000
##     LOCB_KADONE         -0.008    0.013   -0.033    0.017    1.000
##     LOCB_KADTWO          0.001    0.013   -0.025    0.027    1.000
##     LOCB_KARO            0.015    0.020   -0.025    0.055    1.000
##     LOCB_KYEM            0.018    0.011   -0.004    0.041    1.000
##     LOCB_MARA           -0.003    0.016   -0.033    0.029    1.000
##     LOCB_NONE            0.029    0.013    0.004    0.053    1.000
##     LOCB_NTWO           -0.056    0.014   -0.083   -0.029    1.000
##     LOCB_NYAB           -0.017    0.011   -0.039    0.004    1.000
##   Soci_est.1 ~~                                                   
##     MSTATUS_Div.wd      -0.037    0.015   -0.067   -0.009    1.000
##     MSTATUS_Single       0.030    0.010    0.011    0.049    1.000
##     Alcohol             -0.022    0.048   -0.116    0.071    1.000
##     SMOKING             -0.019    0.012   -0.044    0.005    1.000
##     LOCB_EWAF           -0.007    0.009   -0.025    0.012    1.000
##     LOCB_KADONE          0.009    0.010   -0.011    0.029    1.000
##     LOCB_KADTWO         -0.018    0.010   -0.039    0.002    1.000
##     LOCB_KARO           -0.007    0.016   -0.038    0.025    1.000
##     LOCB_KYEM            0.000    0.009   -0.018    0.018    1.000
##     LOCB_MARA            0.011    0.013   -0.014    0.035    1.000
##     LOCB_NONE           -0.001    0.010   -0.021    0.018    1.000
##     LOCB_NTWO           -0.014    0.011   -0.036    0.007    1.000
##     LOCB_NYAB            0.011    0.009   -0.006    0.028    1.000
##   MSTATUS_Div.wid ~~                                              
##     MSTATUS_Single      -0.011    0.004   -0.018   -0.004    1.000
##     Alcohol              0.023    0.018   -0.012    0.058    1.000
##     SMOKING              0.005    0.004   -0.004    0.013    1.000
##     LOCB_EWAF           -0.007    0.003   -0.014        0    1.000
##     LOCB_KADONE         -0.007    0.004   -0.014        0    1.000
##     LOCB_KADTWO          0.004    0.004   -0.004    0.012    1.000
##     LOCB_KARO            0.002    0.006    -0.01    0.014    1.000
##     LOCB_KYEM            0.009    0.003    0.002    0.016    1.000
##     LOCB_MARA           -0.003    0.005   -0.012    0.007    1.000
##     LOCB_NONE           -0.008    0.004   -0.015   -0.001    1.000
##     LOCB_NTWO           -0.003    0.004   -0.011    0.005    1.000
##     LOCB_NYAB           -0.000    0.003   -0.006    0.006    1.000
##   MSTATUS_Single ~~                                               
##     Alcohol             -0.010    0.012   -0.033    0.014    1.000
##     SMOKING             -0.006    0.003   -0.012        0    1.000
##     LOCB_EWAF           -0.001    0.002   -0.005    0.003    1.000
##     LOCB_KADONE         -0.001    0.003   -0.006    0.004    1.000
##     LOCB_KADTWO          0.001    0.003   -0.005    0.006    1.000
##     LOCB_KARO           -0.003    0.004   -0.011    0.005    1.000
##     LOCB_KYEM           -0.001    0.002   -0.006    0.003    1.000
##     LOCB_MARA            0.002    0.003   -0.004    0.008    1.000
##     LOCB_NONE            0.002    0.003   -0.003    0.007    1.000
##     LOCB_NTWO           -0.003    0.003   -0.008    0.003    1.000
##     LOCB_NYAB           -0.002    0.002   -0.006    0.002    1.000
##   Alcohol ~~                                                      
##     SMOKING              0.083    0.015    0.054    0.113    1.000
##     LOCB_EWAF            0.039    0.011    0.017    0.062    1.000
##     LOCB_KADONE         -0.014    0.013   -0.039     0.01    1.000
##     LOCB_KADTWO         -0.006    0.013   -0.032    0.019    1.000
##     LOCB_KARO           -0.019    0.020   -0.058     0.02    1.000
##     LOCB_KYEM           -0.014    0.011   -0.036    0.007    1.000
##     LOCB_MARA           -0.001    0.015   -0.031    0.028    1.000
##     LOCB_NONE           -0.003    0.012   -0.027    0.021    1.000
##     LOCB_NTWO            0.018    0.014   -0.008    0.045    1.000
##     LOCB_NYAB           -0.002    0.011   -0.023    0.019    1.000
##   SMOKING ~~                                                      
##     LOCB_EWAF            0.002    0.003   -0.004    0.008    1.000
##     LOCB_KADONE         -0.002    0.003   -0.009    0.004    1.000
##     LOCB_KADTWO         -0.006    0.003   -0.012    0.001    1.000
##     LOCB_KARO            0.009    0.005   -0.001    0.019    1.000
##     LOCB_KYEM           -0.002    0.003   -0.008    0.004    1.000
##     LOCB_MARA           -0.001    0.004   -0.009    0.006    1.000
##     LOCB_NONE            0.007    0.003        0    0.013    1.000
##     LOCB_NTWO            0.005    0.003   -0.002    0.012    1.000
##     LOCB_NYAB           -0.001    0.003   -0.007    0.004    1.000
##   LOCB_EWAF ~~                                                    
##     LOCB_KADONE         -0.004    0.002   -0.009        0    1.000
##     LOCB_KADTWO         -0.005    0.002    -0.01        0    1.000
##     LOCB_KARO           -0.013    0.004   -0.021   -0.006    1.000
##     LOCB_KYEM           -0.004    0.002   -0.008    0.001    1.000
##     LOCB_MARA           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NONE           -0.004    0.002   -0.009        0    1.000
##     LOCB_NTWO           -0.005    0.003   -0.011        0    1.000
##     LOCB_NYAB           -0.003    0.002   -0.007    0.001    1.000
##   LOCB_KADONE ~~                                                  
##     LOCB_KADTWO         -0.007    0.003   -0.012   -0.001    1.000
##     LOCB_KARO           -0.017    0.004   -0.025   -0.008    1.000
##     LOCB_KYEM           -0.004    0.002   -0.009        0    1.000
##     LOCB_MARA           -0.009    0.003   -0.015   -0.002    1.000
##     LOCB_NONE           -0.006    0.003   -0.011        0    1.000
##     LOCB_NTWO           -0.007    0.003   -0.012   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.008    0.001    1.000
##   LOCB_KADTWO ~~                                                  
##     LOCB_KARO           -0.018    0.004   -0.026   -0.009    1.000
##     LOCB_KYEM           -0.005    0.002   -0.009        0    1.000
##     LOCB_MARA           -0.009    0.003   -0.016   -0.003    1.000
##     LOCB_NONE           -0.006    0.003   -0.011   -0.001    1.000
##     LOCB_NTWO           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.009        0    1.000
##   LOCB_KARO ~~                                                    
##     LOCB_KYEM           -0.013    0.004   -0.021   -0.006    1.000
##     LOCB_MARA           -0.027    0.005   -0.037   -0.017    1.000
##     LOCB_NONE           -0.016    0.004   -0.025   -0.008    1.000
##     LOCB_NTWO           -0.020    0.005   -0.029   -0.011    1.000
##     LOCB_NYAB           -0.012    0.004   -0.019   -0.005    1.000
##   LOCB_KYEM ~~                                                    
##     LOCB_MARA           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NONE           -0.004    0.002   -0.009        0    1.000
##     LOCB_NTWO           -0.005    0.003   -0.011        0    1.000
##     LOCB_NYAB           -0.003    0.002   -0.007    0.001    1.000
##   LOCB_MARA ~~                                                    
##     LOCB_NONE           -0.009    0.003   -0.015   -0.002    1.000
##     LOCB_NTWO           -0.011    0.004   -0.018   -0.004    1.000
##     LOCB_NYAB           -0.006    0.003   -0.012   -0.001    1.000
##   LOCB_NONE ~~                                                    
##     LOCB_NTWO           -0.006    0.003   -0.012   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.008    0.001    1.000
##   LOCB_NTWO ~~                                                    
##     LOCB_NYAB           -0.005    0.002    -0.01        0    1.000
##     Prior       
##                 
##        beta(4,2)
##                 
##        beta(4,2)
##        beta(3,3)
##                 
##        beta(3,3)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
## 
## Intercepts:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##    .PHQ8_est          0.014    0.137   -0.257    0.284    1.000    normal(0,10)
##    .FIES_est         -0.000    0.035   -0.069    0.068    1.000    normal(0,10)
##     Economic_pvrty   -0.000    0.038   -0.075    0.075    1.000    normal(0,10)
##     Land_est         -0.000    0.038   -0.075    0.074    1.000    normal(0,10)
##     FR.dist           0.000    0.038   -0.073    0.074    1.000    normal(0,10)
##     DOBB             -0.000    0.038   -0.077    0.075    1.000    normal(0,10)
##     SEX               0.596    0.019    0.559    0.632    1.000    normal(0,10)
##     EDUCAT            2.640    0.048    2.546    2.735    1.000    normal(0,10)
##     Soci_est.1       -0.000    0.038   -0.075    0.075    1.000    normal(0,10)
##     MSTATUS_Div.wd    0.168    0.015     0.14    0.197    1.000    normal(0,10)
##     MSTATUS_Single    0.066    0.009    0.048    0.085    1.000    normal(0,10)
##     Alcohol           0.460    0.047    0.368    0.553    1.000    normal(0,10)
##     SMOKING           0.109    0.012    0.086    0.133    1.000    normal(0,10)
##     LOCB_EWAF         0.059    0.009    0.041    0.077    1.000    normal(0,10)
##     LOCB_KADONE       0.075    0.010    0.055    0.094    1.000    normal(0,10)
##     LOCB_KADTWO       0.079    0.010    0.059    0.099    1.000    normal(0,10)
##     LOCB_KARO         0.222    0.016    0.191    0.253    1.000    normal(0,10)
##     LOCB_KYEM         0.059    0.009    0.041    0.077    1.000    normal(0,10)
##     LOCB_MARA         0.118    0.012    0.094    0.142    1.000    normal(0,10)
##     LOCB_NONE         0.072    0.010    0.052    0.091    1.000    normal(0,10)
##     LOCB_NTWO         0.088    0.011    0.067    0.109    1.000    normal(0,10)
##     LOCB_NYAB         0.052    0.008    0.035    0.069    1.000    normal(0,10)
##     Forest_est.1      0.000    0.038   -0.072    0.073    1.000    normal(0,10)
##     Health            3.222    0.035    3.153    3.291    1.000    normal(0,10)
## 
## Variances:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##    .PHQ8_est          0.827    0.046    0.741    0.923    1.000 gamma(1,.5)[sd]
##    .FIES_est          0.836    0.045    0.752    0.928    1.000 gamma(1,.5)[sd]
##     Economic_pvrty    1.008    0.054    0.908    1.121    1.000 gamma(1,.5)[sd]
##     Land_est          1.005    0.055    0.904     1.12    1.000 gamma(1,.5)[sd]
##     Forest_est.1      1.006    0.054    0.905    1.118    1.000 gamma(1,.5)[sd]
##     Health            0.851    0.046    0.765    0.946    1.000 gamma(1,.5)[sd]
##     FR.dist           1.004    0.053    0.904    1.111    1.000 gamma(1,.5)[sd]
##     DOBB              1.022    0.055     0.92    1.136    1.000 gamma(1,.5)[sd]
##     SEX               0.247    0.013    0.222    0.274    1.000 gamma(1,.5)[sd]
##     EDUCAT            1.620    0.089    1.453    1.802    1.000 gamma(1,.5)[sd]
##     Soci_est.1        1.026    0.055    0.924    1.139    1.000 gamma(1,.5)[sd]
##     MSTATUS_Div.wd    0.144    0.008    0.129    0.159    1.000 gamma(1,.5)[sd]
##     MSTATUS_Single    0.063    0.003    0.057     0.07    1.000 gamma(1,.5)[sd]
##     Alcohol           1.546    0.084    1.391    1.718    1.000 gamma(1,.5)[sd]
##     SMOKING           0.100    0.006     0.09    0.111    1.000 gamma(1,.5)[sd]
##     LOCB_EWAF         0.057    0.003    0.051    0.063    1.000 gamma(1,.5)[sd]
##     LOCB_KADONE       0.070    0.004    0.063    0.078    1.000 gamma(1,.5)[sd]
##     LOCB_KADTWO       0.075    0.004    0.067    0.083    1.000 gamma(1,.5)[sd]
##     LOCB_KARO         0.177    0.010    0.159    0.196    1.000 gamma(1,.5)[sd]
##     LOCB_KYEM         0.057    0.003    0.051    0.063    1.000 gamma(1,.5)[sd]
##     LOCB_MARA         0.107    0.006    0.096    0.119    1.000 gamma(1,.5)[sd]
##     LOCB_NONE         0.069    0.004    0.062    0.076    1.000 gamma(1,.5)[sd]
##     LOCB_NTWO         0.082    0.004    0.074    0.091    1.000 gamma(1,.5)[sd]
##     LOCB_NYAB         0.050    0.003    0.045    0.056    1.000 gamma(1,.5)[sd]
round(100*(as.numeric(fit_main_1_sum$Estimate)-as.numeric(fit_main_5_sum$Estimate))/as.numeric(fit_main_5_sum$Estimate),2) # Fine, if it is only small 
##   [1]  -0.93  -1.65   0.64  -0.56   9.09  -0.73  -2.94   0.00   1.85  -7.14
##  [11]  -2.22   1.09   2.13  20.00  -2.42 -16.67  -3.85   0.00  -0.39   0.00
##  [21]   0.00   0.00  -1.18  -2.22   0.00  -0.57   0.12  -0.12   0.00   0.00
##  [31]   0.00   0.12   0.10   0.00   0.00  25.00   9.09   0.00   0.00   0.00
##  [41]   0.00   0.00   0.54   0.00   0.00   0.00   0.00   0.00   0.00   0.00
##  [51]  -0.10  -2.27   0.00   0.00   0.00   0.00   0.56   0.00   0.00   0.00
##  [61]   0.00    NaN -20.00   0.00    NaN   0.00   0.00   0.00   0.00   0.00
##  [71]   2.78   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00    NaN
##  [81]   0.00   0.00   0.00   0.12   0.52   0.00   0.00   2.13   0.00   0.00
##  [91]   0.00   0.00   0.00   5.56 -33.33   0.00   0.00   0.00   0.00   0.00
## [101]   0.00   0.00   0.00   0.00   0.00   0.00 -14.29    NaN  -9.09   0.00
## [111]   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00 -50.00
## [121]   0.00   0.00   0.00   0.00    NaN   0.00   0.00   0.00   0.00   0.00
## [131]   0.00   0.00   0.00   0.00   0.00   0.00   0.00  -0.06   0.00   0.00
## [141]   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
## [151]   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
## [161]   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
## [171]   0.00   0.00   0.00 -14.29   0.00   0.00   0.00   0.00   0.00   0.00
## [181]   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
## [191]   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
## [201]   0.00   0.00   2.00  35.71    NaN    NaN    NaN    NaN    NaN   0.00
## [211]   0.04    NaN   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00
## [221]   0.00   0.00   0.00   0.00   0.00    NaN   0.00
# Shifting the hyperparameters 'down' (specifically the mean and the shape of the beta distribution) 
model_main_6 <- ' 
    ### Main regression part
    # Key variables of interest
    PHQ8_est ~ prior("normal(0, 1)")*FIES_est + prior("normal(0, 1)")*Economic_poverty  
    FIES_est ~ prior("normal(-1.5, 2)")*Land_est + prior("normal(0, 1)")*Economic_poverty  

    # Distance to forest reserve 
    FIES_est ~ prior("normal(-1.5, 2)")*FR.dist

    ### Covariance
    # Between socio-ecological variables
    FIES_est ~~ prior("beta(3, 3)")*Forest_est.1 
    Economic_poverty ~~ prior("beta(3, 3)")*Forest_est.1
    Economic_poverty ~~ prior("beta(2, 4)")*Land_est
    
    # Health (treated as numeric)
    PHQ8_est ~~ prior("beta(2, 4)")*Health 
    
    ### Covariates 
    # Age 
    PHQ8_est ~ prior("normal(-0.5, 2)")*DOBB + 
    
    # Sex
    prior("normal(-0.5, 2)")*SEX +

    # Education (treated as numeric)
    prior("normal(-1.5, 2)")*EDUCAT + 
    
    # Social support 
    prior("normal(-1.5, 2)")*Soci_est.1 + 
    
    # Marital status (RL = MSTATUS_Mar.pol)
    prior("normal(-0.5, 2)")*MSTATUS_Div.wid + prior("normal(0, 9)")*MSTATUS_Single +
    
    # Alchohol consumption  
    prior("normal(-0.5, 2)")*Alcohol + 
    
    # Smoking 
    prior("normal(-0.5, 2)")*SMOKING 
  
    ### Location (RL = LOCB_NTC)
    PHQ8_est ~ prior("normal(-1, 9)")*LOCB_EWAF + prior("normal(-1, 9)")*LOCB_KADONE + prior("normal(-1, 9)")*LOCB_KADTWO + prior("normal(-1, 9)")*LOCB_KARO + prior("normal(-1, 9)")*LOCB_KYEM + prior("normal(-1, 9)")*LOCB_MARA + prior("normal(-1, 9)")*LOCB_NONE + prior("normal(-1, 9)")*LOCB_NTWO + prior("normal(-1, 9)")*LOCB_NYAB
    '

# Bayesian SEM  
fit_main_6 <- bsem(model_main_6, data=DF_analy.list[[1]], fixed.x = FALSE, n.chains = chains, burnin = burnin, sample = sample, seed = seed, target = "stan",  bcontrol = list(cores = 4))
# Load the model (if needed)
fit_main_6 <- readRDS("fit_main_6.rds")

# Calculate the bias associated with using 'down' shifted hyperparameters
fit_main_1_sum <- data.frame(summary(fit_main_1))[,1:2]
## blavaan (0.3-15) results of 4000 samples after 4000 adapt/burnin iterations
## 
##   Number of observations                           695
## 
##   Number of missing patterns                         1
## 
##   Statistic                                 MargLogLik         PPP
##   Value                                     -12480.392       0.000
## 
## Regressions:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##   PHQ8_est ~                                                                   
##     FIES_est          0.212    0.038    0.137    0.288    1.000     normal(1,1)
##     Economic_pvrty    0.119    0.042    0.036    0.202    1.000     normal(1,1)
##   FIES_est ~                                                                   
##     Land_est         -0.158    0.035   -0.226   -0.089    1.000  normal(-0.5,2)
##     Economic_pvrty    0.356    0.035    0.286    0.426    1.000     normal(1,1)
##     FR.dist          -0.012    0.034   -0.079    0.056    1.000  normal(-0.5,2)
##   PHQ8_est ~                                                                   
##     DOBB              0.013    0.039   -0.063    0.089    1.000   normal(0.5,2)
##     SEX               0.088    0.077   -0.061     0.24    1.000   normal(0.5,2)
##     EDUCAT           -0.093    0.031   -0.154   -0.031    1.000  normal(-0.5,2)
##     Soci_est.1       -0.048    0.037    -0.12    0.024    1.000  normal(-0.5,2)
##     MSTATUS_Div.wd   -0.018    0.101   -0.215    0.178    1.000   normal(0.5,2)
##     MSTATUS_Single    0.121    0.150    -0.17    0.413    1.000     normal(0,9)
##     Alcohol           0.005    0.029   -0.053    0.063    1.000   normal(0.5,2)
##     SMOKING           0.075    0.118   -0.158    0.307    1.000   normal(0.5,2)
##     LOCB_EWAF         0.149    0.162   -0.166    0.468    1.000     normal(0,9)
##     LOCB_KADONE       0.253    0.151   -0.045     0.55    1.000     normal(0,9)
##     LOCB_KADTWO       0.057    0.148   -0.236    0.347    1.000     normal(0,9)
##     LOCB_KARO         0.284    0.109    0.069    0.498    1.000     normal(0,9)
##     LOCB_KYEM         0.482    0.161    0.167    0.794    1.000     normal(0,9)
##     LOCB_MARA         0.084    0.129    -0.17    0.337    1.000     normal(0,9)
##     LOCB_NONE         0.044    0.152   -0.252    0.343    1.000     normal(0,9)
##     LOCB_NTWO         0.040    0.144   -0.243    0.322    1.000     normal(0,9)
##     LOCB_NYAB         0.347    0.171     0.01    0.679    1.000     normal(0,9)
## 
## Covariances:
##                       Estimate  Post.SD pi.lower pi.upper     Rhat
##  .FIES_est ~~                                                     
##     Forest_est.1         0.136    0.036    0.067    0.207    1.000
##   Economic_poverty ~~                                             
##     Forest_est.1         0.033    0.037   -0.039    0.107    1.000
##     Land_est            -0.272    0.040   -0.352   -0.195    1.000
##  .PHQ8_est ~~                                                     
##     Health              -0.165    0.038    -0.24   -0.093    1.000
##   FR.dist ~~                                                      
##     DOBB                 0.038    0.038   -0.038    0.113    1.000
##     SEX                 -0.026    0.019   -0.063    0.011    1.000
##     EDUCAT               0.005    0.047   -0.089    0.097    1.000
##     Soci_est.1           0.012    0.039   -0.065    0.088    1.000
##     MSTATUS_Div.wd      -0.013    0.014   -0.041    0.015    1.000
##     MSTATUS_Single       0.001    0.009   -0.018    0.019    1.000
##     Alcohol             -0.068    0.048   -0.162    0.023    1.000
##     SMOKING             -0.007    0.012   -0.031    0.016    1.000
##     LOCB_EWAF           -0.024    0.009   -0.042   -0.007    1.000
##     LOCB_KADONE          0.186    0.012    0.163    0.211    1.001
##     LOCB_KADTWO          0.124    0.011    0.102    0.147    1.000
##     LOCB_KARO           -0.066    0.016   -0.098   -0.035    1.000
##     LOCB_KYEM           -0.039    0.009   -0.056   -0.021    1.000
##     LOCB_MARA           -0.088    0.013   -0.114   -0.063    1.001
##     LOCB_NONE            0.005    0.010   -0.014    0.025    1.001
##     LOCB_NTWO           -0.051    0.011   -0.073    -0.03    1.000
##     LOCB_NYAB           -0.024    0.009   -0.041   -0.007    1.000
##   DOBB ~~                                                         
##     SEX                 -0.043    0.019   -0.081   -0.007    1.000
##     EDUCAT              -0.249    0.050   -0.349   -0.154    1.000
##     Soci_est.1          -0.004    0.038   -0.079     0.07    1.000
##     MSTATUS_Div.wd       0.098    0.015     0.07    0.128    1.000
##     MSTATUS_Single      -0.063    0.010   -0.083   -0.044    1.000
##     Alcohol              0.179    0.048    0.085    0.275    1.000
##     SMOKING              0.062    0.012    0.039    0.087    1.000
##     LOCB_EWAF            0.013    0.009   -0.004    0.031    1.000
##     LOCB_KADONE         -0.002    0.010   -0.022    0.017    1.000
##     LOCB_KADTWO          0.016    0.010   -0.005    0.036    1.000
##     LOCB_KARO            0.000    0.016   -0.032    0.032    1.000
##     LOCB_KYEM            0.004    0.009   -0.014    0.022    1.000
##     LOCB_MARA           -0.023    0.012   -0.048    0.001    1.000
##     LOCB_NONE            0.000    0.010   -0.019     0.02    1.000
##     LOCB_NTWO           -0.011    0.011   -0.032    0.011    1.000
##     LOCB_NYAB            0.009    0.009   -0.008    0.025    1.000
##   SEX ~~                                                          
##     EDUCAT              -0.140    0.025    -0.19   -0.093    1.000
##     Soci_est.1          -0.027    0.019   -0.065    0.011    1.000
##     MSTATUS_Div.wd       0.037    0.007    0.023    0.051    1.000
##     MSTATUS_Single      -0.009    0.005   -0.019        0    1.000
##     Alcohol             -0.097    0.023   -0.143   -0.052    1.000
##     SMOKING             -0.038    0.006    -0.05   -0.026    1.000
##     LOCB_EWAF           -0.009    0.005   -0.018        0    1.000
##     LOCB_KADONE          0.003    0.005   -0.007    0.013    1.000
##     LOCB_KADTWO         -0.007    0.005   -0.017    0.003    1.000
##     LOCB_KARO           -0.015    0.008   -0.031        0    1.000
##     LOCB_KYEM            0.001    0.004   -0.008    0.009    1.000
##     LOCB_MARA            0.000    0.006   -0.012    0.012    1.000
##     LOCB_NONE            0.005    0.005   -0.005    0.015    1.000
##     LOCB_NTWO            0.005    0.005   -0.006    0.015    1.000
##     LOCB_NYAB            0.002    0.004   -0.006     0.01    1.000
##   EDUCAT ~~                                                       
##     Soci_est.1           0.195    0.050    0.098    0.294    1.000
##     MSTATUS_Div.wd      -0.075    0.019   -0.112    -0.04    1.000
##     MSTATUS_Single       0.086    0.013    0.062    0.111    1.000
##     Alcohol             -0.048    0.060   -0.163    0.069    1.000
##     SMOKING             -0.043    0.015   -0.073   -0.013    1.000
##     LOCB_EWAF           -0.005    0.012   -0.028    0.018    1.000
##     LOCB_KADONE         -0.008    0.013   -0.032    0.017    1.000
##     LOCB_KADTWO          0.001    0.013   -0.025    0.027    1.000
##     LOCB_KARO            0.015    0.020   -0.025    0.054    1.000
##     LOCB_KYEM            0.019    0.011   -0.004    0.041    1.000
##     LOCB_MARA           -0.002    0.016   -0.033    0.028    1.000
##     LOCB_NONE            0.029    0.013    0.004    0.053    1.000
##     LOCB_NTWO           -0.056    0.014   -0.084   -0.029    1.000
##     LOCB_NYAB           -0.017    0.011   -0.039    0.004    1.000
##   Soci_est.1 ~~                                                   
##     MSTATUS_Div.wd      -0.037    0.015   -0.067   -0.009    1.000
##     MSTATUS_Single       0.030    0.010    0.011    0.049    1.000
##     Alcohol             -0.022    0.048   -0.116    0.073    1.000
##     SMOKING             -0.019    0.012   -0.043    0.004    1.000
##     LOCB_EWAF           -0.007    0.009   -0.025    0.011    1.000
##     LOCB_KADONE          0.009    0.010   -0.011    0.029    1.000
##     LOCB_KADTWO         -0.018    0.010   -0.039    0.002    1.000
##     LOCB_KARO           -0.006    0.016   -0.038    0.025    1.000
##     LOCB_KYEM            0.000    0.009   -0.018    0.019    1.000
##     LOCB_MARA            0.010    0.013   -0.014    0.035    1.000
##     LOCB_NONE           -0.001    0.010   -0.021    0.018    1.000
##     LOCB_NTWO           -0.014    0.011   -0.035    0.007    1.000
##     LOCB_NYAB            0.011    0.009   -0.006    0.028    1.000
##   MSTATUS_Div.wid ~~                                              
##     MSTATUS_Single      -0.011    0.004   -0.018   -0.004    1.000
##     Alcohol              0.023    0.018   -0.012    0.059    1.000
##     SMOKING              0.005    0.005   -0.004    0.013    1.000
##     LOCB_EWAF           -0.007    0.003   -0.014   -0.001    1.000
##     LOCB_KADONE         -0.007    0.004   -0.014        0    1.000
##     LOCB_KADTWO          0.004    0.004   -0.004    0.012    1.000
##     LOCB_KARO            0.001    0.006    -0.01    0.013    1.000
##     LOCB_KYEM            0.009    0.003    0.002    0.016    1.000
##     LOCB_MARA           -0.003    0.005   -0.012    0.007    1.000
##     LOCB_NONE           -0.008    0.004   -0.015        0    1.000
##     LOCB_NTWO           -0.003    0.004   -0.012    0.005    1.000
##     LOCB_NYAB           -0.000    0.003   -0.007    0.006    1.000
##   MSTATUS_Single ~~                                               
##     Alcohol             -0.010    0.012   -0.033    0.013    1.000
##     SMOKING             -0.006    0.003   -0.012        0    1.000
##     LOCB_EWAF           -0.001    0.002   -0.005    0.003    1.000
##     LOCB_KADONE         -0.001    0.003   -0.005    0.004    1.000
##     LOCB_KADTWO          0.001    0.003   -0.005    0.006    1.000
##     LOCB_KARO           -0.003    0.004   -0.011    0.005    1.000
##     LOCB_KYEM           -0.001    0.002   -0.005    0.003    1.000
##     LOCB_MARA            0.002    0.003   -0.004    0.008    1.000
##     LOCB_NONE            0.002    0.003   -0.003    0.007    1.000
##     LOCB_NTWO           -0.003    0.003   -0.008    0.002    1.000
##     LOCB_NYAB           -0.002    0.002   -0.006    0.002    1.000
##   Alcohol ~~                                                      
##     SMOKING              0.083    0.015    0.054    0.113    1.000
##     LOCB_EWAF            0.039    0.011    0.017    0.061    1.000
##     LOCB_KADONE         -0.014    0.012   -0.039    0.011    1.000
##     LOCB_KADTWO         -0.006    0.013   -0.032    0.019    1.000
##     LOCB_KARO           -0.019    0.020   -0.058    0.019    1.000
##     LOCB_KYEM           -0.014    0.011   -0.036    0.008    1.000
##     LOCB_MARA           -0.001    0.015   -0.031    0.029    1.000
##     LOCB_NONE           -0.003    0.012   -0.027    0.022    1.000
##     LOCB_NTWO            0.018    0.013   -0.008    0.045    1.000
##     LOCB_NYAB           -0.002    0.011   -0.023    0.018    1.000
##   SMOKING ~~                                                      
##     LOCB_EWAF            0.002    0.003   -0.004    0.008    1.000
##     LOCB_KADONE         -0.002    0.003   -0.009    0.004    1.000
##     LOCB_KADTWO         -0.006    0.003   -0.012        0    1.000
##     LOCB_KARO            0.009    0.005   -0.001    0.019    1.000
##     LOCB_KYEM           -0.002    0.003   -0.008    0.003    1.000
##     LOCB_MARA           -0.001    0.004   -0.009    0.006    1.000
##     LOCB_NONE            0.007    0.003    0.001    0.013    1.000
##     LOCB_NTWO            0.005    0.003   -0.002    0.011    1.000
##     LOCB_NYAB           -0.001    0.003   -0.007    0.004    1.000
##   LOCB_EWAF ~~                                                    
##     LOCB_KADONE         -0.004    0.002   -0.009        0    1.000
##     LOCB_KADTWO         -0.005    0.002    -0.01        0    1.000
##     LOCB_KARO           -0.013    0.004   -0.021   -0.006    1.000
##     LOCB_KYEM           -0.004    0.002   -0.008    0.001    1.000
##     LOCB_MARA           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NONE           -0.004    0.002   -0.009        0    1.000
##     LOCB_NTWO           -0.005    0.003    -0.01        0    1.000
##     LOCB_NYAB           -0.003    0.002   -0.007    0.001    1.000
##   LOCB_KADONE ~~                                                  
##     LOCB_KADTWO         -0.007    0.003   -0.012   -0.001    1.000
##     LOCB_KARO           -0.017    0.004   -0.025   -0.008    1.000
##     LOCB_KYEM           -0.004    0.002   -0.009        0    1.000
##     LOCB_MARA           -0.009    0.003   -0.015   -0.002    1.000
##     LOCB_NONE           -0.006    0.003   -0.011   -0.001    1.000
##     LOCB_NTWO           -0.006    0.003   -0.012   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.008        0    1.000
##   LOCB_KADTWO ~~                                                  
##     LOCB_KARO           -0.018    0.004   -0.026   -0.009    1.000
##     LOCB_KYEM           -0.005    0.002    -0.01        0    1.000
##     LOCB_MARA           -0.009    0.003   -0.016   -0.003    1.000
##     LOCB_NONE           -0.006    0.003   -0.011   -0.001    1.000
##     LOCB_NTWO           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.009        0    1.000
##   LOCB_KARO ~~                                                    
##     LOCB_KYEM           -0.013    0.004   -0.021   -0.006    1.000
##     LOCB_MARA           -0.027    0.005   -0.037   -0.017    1.000
##     LOCB_NONE           -0.016    0.004   -0.025   -0.008    1.000
##     LOCB_NTWO           -0.020    0.005   -0.029   -0.011    1.000
##     LOCB_NYAB           -0.012    0.004   -0.019   -0.005    1.000
##   LOCB_KYEM ~~                                                    
##     LOCB_MARA           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NONE           -0.004    0.002   -0.009        0    1.000
##     LOCB_NTWO           -0.005    0.003   -0.011        0    1.000
##     LOCB_NYAB           -0.003    0.002   -0.007    0.001    1.000
##   LOCB_MARA ~~                                                    
##     LOCB_NONE           -0.009    0.003   -0.015   -0.002    1.000
##     LOCB_NTWO           -0.011    0.004   -0.018   -0.004    1.000
##     LOCB_NYAB           -0.006    0.003   -0.012   -0.001    1.000
##   LOCB_NONE ~~                                                    
##     LOCB_NTWO           -0.006    0.003   -0.012   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.008    0.001    1.000
##   LOCB_NTWO ~~                                                    
##     LOCB_NYAB           -0.005    0.002    -0.01        0    1.000
##     Prior       
##                 
##        beta(3,2)
##                 
##        beta(3,2)
##        beta(2,3)
##                 
##        beta(2,3)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
## 
## Intercepts:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##    .PHQ8_est          0.019    0.139   -0.256    0.289    1.000    normal(0,10)
##    .FIES_est         -0.000    0.035   -0.068    0.068    1.000    normal(0,10)
##     Economic_pvrty    0.000    0.039   -0.077    0.076    1.000    normal(0,10)
##     Land_est          0.000    0.038   -0.074    0.074    1.000    normal(0,10)
##     FR.dist           0.000    0.038   -0.075    0.076    1.000    normal(0,10)
##     DOBB              0.000    0.038   -0.074    0.074    1.000    normal(0,10)
##     SEX               0.596    0.019    0.559    0.633    1.000    normal(0,10)
##     EDUCAT            2.641    0.048    2.548    2.735    1.000    normal(0,10)
##     Soci_est.1       -0.000    0.039   -0.076    0.076    1.000    normal(0,10)
##     MSTATUS_Div.wd    0.168    0.015     0.14    0.197    1.000    normal(0,10)
##     MSTATUS_Single    0.066    0.009    0.048    0.085    1.000    normal(0,10)
##     Alcohol           0.460    0.048    0.366    0.554    1.000    normal(0,10)
##     SMOKING           0.109    0.012    0.086    0.133    1.000    normal(0,10)
##     LOCB_EWAF         0.059    0.009    0.042    0.077    1.000    normal(0,10)
##     LOCB_KADONE       0.075    0.010    0.055    0.095    1.000    normal(0,10)
##     LOCB_KADTWO       0.079    0.010    0.059      0.1    1.000    normal(0,10)
##     LOCB_KARO         0.222    0.016     0.19    0.253    1.000    normal(0,10)
##     LOCB_KYEM         0.059    0.009    0.041    0.077    1.000    normal(0,10)
##     LOCB_MARA         0.118    0.012    0.094    0.142    1.000    normal(0,10)
##     LOCB_NONE         0.072    0.010    0.052    0.091    1.000    normal(0,10)
##     LOCB_NTWO         0.088    0.011    0.066    0.109    1.000    normal(0,10)
##     LOCB_NYAB         0.052    0.008    0.035    0.068    1.000    normal(0,10)
##     Forest_est.1     -0.000    0.038   -0.074    0.072    1.000    normal(0,10)
##     Health            3.222    0.035    3.153    3.291    1.000    normal(0,10)
## 
## Variances:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##    .PHQ8_est          0.828    0.046    0.745    0.924    1.000 gamma(1,.5)[sd]
##    .FIES_est          0.835    0.045    0.751    0.926    1.000 gamma(1,.5)[sd]
##     Economic_pvrty    1.008    0.054    0.906    1.118    1.000 gamma(1,.5)[sd]
##     Land_est          1.005    0.054    0.903    1.116    1.000 gamma(1,.5)[sd]
##     Forest_est.1      1.006    0.055    0.905    1.119    1.000 gamma(1,.5)[sd]
##     Health            0.852    0.046    0.768    0.946    1.000 gamma(1,.5)[sd]
##     FR.dist           1.005    0.054    0.904    1.115    1.001 gamma(1,.5)[sd]
##     DOBB              1.021    0.055    0.919    1.134    1.000 gamma(1,.5)[sd]
##     SEX               0.247    0.013    0.222    0.274    1.000 gamma(1,.5)[sd]
##     EDUCAT            1.622    0.088    1.459    1.806    1.000 gamma(1,.5)[sd]
##     Soci_est.1        1.026    0.057    0.921    1.144    1.000 gamma(1,.5)[sd]
##     MSTATUS_Div.wd    0.144    0.008    0.129     0.16    1.000 gamma(1,.5)[sd]
##     MSTATUS_Single    0.063    0.003    0.057     0.07    1.000 gamma(1,.5)[sd]
##     Alcohol           1.545    0.083    1.391    1.716    1.000 gamma(1,.5)[sd]
##     SMOKING           0.100    0.005     0.09    0.111    1.000 gamma(1,.5)[sd]
##     LOCB_EWAF         0.057    0.003    0.051    0.063    1.000 gamma(1,.5)[sd]
##     LOCB_KADONE       0.070    0.004    0.063    0.078    1.000 gamma(1,.5)[sd]
##     LOCB_KADTWO       0.075    0.004    0.067    0.083    1.000 gamma(1,.5)[sd]
##     LOCB_KARO         0.177    0.010    0.159    0.196    1.000 gamma(1,.5)[sd]
##     LOCB_KYEM         0.057    0.003    0.051    0.064    1.000 gamma(1,.5)[sd]
##     LOCB_MARA         0.107    0.006    0.096    0.119    1.000 gamma(1,.5)[sd]
##     LOCB_NONE         0.069    0.004    0.062    0.076    1.000 gamma(1,.5)[sd]
##     LOCB_NTWO         0.082    0.004    0.074    0.091    1.000 gamma(1,.5)[sd]
##     LOCB_NYAB         0.051    0.003    0.045    0.056    1.000 gamma(1,.5)[sd]
fit_main_6_sum <- data.frame(summary(fit_main_6))[,1:2]
## blavaan (0.3-15) results of 4000 samples after 4000 adapt/burnin iterations
## 
##   Number of observations                           695
## 
##   Number of missing patterns                         1
## 
##   Statistic                                 MargLogLik         PPP
##   Value                                     -12480.188       0.000
## 
## Regressions:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##   PHQ8_est ~                                                                   
##     FIES_est          0.212    0.038    0.136    0.288    1.000     normal(0,1)
##     Economic_pvrty    0.117    0.042    0.036    0.199    1.000     normal(0,1)
##   FIES_est ~                                                                   
##     Land_est         -0.158    0.036   -0.229   -0.087    1.000  normal(-1.5,2)
##     Economic_pvrty    0.354    0.036    0.284    0.425    1.000     normal(0,1)
##     FR.dist          -0.012    0.034   -0.079    0.055    1.000  normal(-1.5,2)
##   PHQ8_est ~                                                                   
##     DOBB              0.013    0.038    -0.06    0.086    1.000  normal(-0.5,2)
##     SEX               0.087    0.079   -0.068     0.24    1.000  normal(-0.5,2)
##     EDUCAT           -0.094    0.031   -0.155   -0.032    1.000  normal(-1.5,2)
##     Soci_est.1       -0.049    0.037   -0.121    0.025    1.000  normal(-1.5,2)
##     MSTATUS_Div.wd   -0.020    0.102    -0.22    0.179    1.000  normal(-0.5,2)
##     MSTATUS_Single    0.123    0.148   -0.164     0.41    1.000     normal(0,9)
##     Alcohol           0.005    0.029   -0.053    0.064    1.000  normal(-0.5,2)
##     SMOKING           0.070    0.119   -0.164    0.304    1.000  normal(-0.5,2)
##     LOCB_EWAF         0.147    0.164   -0.177    0.469    1.000    normal(-1,9)
##     LOCB_KADONE       0.254    0.151   -0.036     0.55    1.001    normal(-1,9)
##     LOCB_KADTWO       0.056    0.148   -0.236    0.341    1.000    normal(-1,9)
##     LOCB_KARO         0.284    0.109     0.07    0.496    1.001    normal(-1,9)
##     LOCB_KYEM         0.484    0.165     0.16    0.807    1.000    normal(-1,9)
##     LOCB_MARA         0.085    0.129   -0.166    0.337    1.001    normal(-1,9)
##     LOCB_NONE         0.045    0.153    -0.26    0.345    1.000    normal(-1,9)
##     LOCB_NTWO         0.038    0.143   -0.241    0.316    1.000    normal(-1,9)
##     LOCB_NYAB         0.347    0.172    0.008    0.683    1.000    normal(-1,9)
## 
## Covariances:
##                       Estimate  Post.SD pi.lower pi.upper     Rhat
##  .FIES_est ~~                                                     
##     Forest_est.1         0.137    0.036    0.068     0.21    1.000
##   Economic_poverty ~~                                             
##     Forest_est.1         0.033    0.037   -0.039    0.106    1.000
##     Land_est            -0.271    0.040    -0.35   -0.195    1.000
##  .PHQ8_est ~~                                                     
##     Health              -0.167    0.037   -0.242   -0.095    1.000
##   FR.dist ~~                                                      
##     DOBB                 0.037    0.038   -0.037    0.112    1.000
##     SEX                 -0.026    0.019   -0.063    0.011    1.000
##     EDUCAT               0.005    0.049   -0.091      0.1    1.000
##     Soci_est.1           0.011    0.038   -0.065    0.086    1.000
##     MSTATUS_Div.wd      -0.013    0.014   -0.041    0.015    1.000
##     MSTATUS_Single       0.001    0.009   -0.018    0.019    1.000
##     Alcohol             -0.068    0.047   -0.161    0.024    1.000
##     SMOKING             -0.007    0.012    -0.03    0.016    1.001
##     LOCB_EWAF           -0.024    0.009   -0.042   -0.007    1.001
##     LOCB_KADONE          0.185    0.012    0.163    0.211    1.000
##     LOCB_KADTWO          0.124    0.011    0.102    0.146    1.000
##     LOCB_KARO           -0.066    0.016   -0.097   -0.035    1.000
##     LOCB_KYEM           -0.039    0.009   -0.056   -0.021    1.000
##     LOCB_MARA           -0.088    0.013   -0.113   -0.064    1.000
##     LOCB_NONE            0.005    0.010   -0.014    0.025    1.000
##     LOCB_NTWO           -0.051    0.011   -0.073    -0.03    1.000
##     LOCB_NYAB           -0.024    0.009   -0.041   -0.007    1.000
##   DOBB ~~                                                         
##     SEX                 -0.044    0.019   -0.081   -0.007    1.000
##     EDUCAT              -0.250    0.050   -0.349   -0.154    1.000
##     Soci_est.1          -0.004    0.039    -0.08    0.071    1.000
##     MSTATUS_Div.wd       0.098    0.015    0.069    0.128    1.000
##     MSTATUS_Single      -0.063    0.010   -0.083   -0.044    1.000
##     Alcohol              0.179    0.047    0.088    0.274    1.000
##     SMOKING              0.063    0.012    0.039    0.087    1.000
##     LOCB_EWAF            0.013    0.009   -0.005    0.031    1.000
##     LOCB_KADONE         -0.002    0.010   -0.022    0.018    1.000
##     LOCB_KADTWO          0.016    0.010   -0.005    0.036    1.000
##     LOCB_KARO            0.000    0.016   -0.031    0.031    1.000
##     LOCB_KYEM            0.005    0.009   -0.013    0.023    1.000
##     LOCB_MARA           -0.023    0.013   -0.048    0.001    1.000
##     LOCB_NONE           -0.000    0.010    -0.02    0.019    1.000
##     LOCB_NTWO           -0.011    0.011   -0.033    0.011    1.000
##     LOCB_NYAB            0.009    0.009   -0.008    0.026    1.000
##   SEX ~~                                                          
##     EDUCAT              -0.140    0.025   -0.189   -0.092    1.000
##     Soci_est.1          -0.027    0.019   -0.065     0.01    1.000
##     MSTATUS_Div.wd       0.036    0.007    0.022    0.051    1.000
##     MSTATUS_Single      -0.009    0.005   -0.018        0    1.000
##     Alcohol             -0.097    0.024   -0.144   -0.051    1.000
##     SMOKING             -0.038    0.006    -0.05   -0.026    1.000
##     LOCB_EWAF           -0.009    0.004   -0.018   -0.001    1.000
##     LOCB_KADONE          0.003    0.005   -0.007    0.013    1.000
##     LOCB_KADTWO         -0.007    0.005   -0.017    0.003    1.000
##     LOCB_KARO           -0.015    0.008   -0.031        0    1.000
##     LOCB_KYEM            0.001    0.004   -0.008     0.01    1.000
##     LOCB_MARA            0.000    0.006   -0.012    0.012    1.000
##     LOCB_NONE            0.005    0.005   -0.005    0.014    1.000
##     LOCB_NTWO            0.005    0.005   -0.005    0.016    1.000
##     LOCB_NYAB            0.002    0.004   -0.006    0.011    1.000
##   EDUCAT ~~                                                       
##     Soci_est.1           0.195    0.049      0.1    0.292    1.000
##     MSTATUS_Div.wd      -0.075    0.018   -0.111   -0.039    1.000
##     MSTATUS_Single       0.086    0.013    0.062    0.112    1.000
##     Alcohol             -0.049    0.060   -0.167    0.068    1.000
##     SMOKING             -0.043    0.015   -0.073   -0.013    1.000
##     LOCB_EWAF           -0.005    0.012   -0.027    0.018    1.000
##     LOCB_KADONE         -0.008    0.013   -0.033    0.017    1.000
##     LOCB_KADTWO          0.001    0.013   -0.025    0.027    1.000
##     LOCB_KARO            0.015    0.020   -0.025    0.055    1.000
##     LOCB_KYEM            0.018    0.011   -0.004    0.041    1.000
##     LOCB_MARA           -0.003    0.016   -0.034    0.028    1.000
##     LOCB_NONE            0.029    0.012    0.004    0.053    1.000
##     LOCB_NTWO           -0.056    0.014   -0.084    -0.03    1.000
##     LOCB_NYAB           -0.017    0.011   -0.039    0.004    1.000
##   Soci_est.1 ~~                                                   
##     MSTATUS_Div.wd      -0.038    0.015   -0.067   -0.009    1.000
##     MSTATUS_Single       0.030    0.010    0.011    0.049    1.000
##     Alcohol             -0.023    0.047   -0.115     0.07    1.000
##     SMOKING             -0.019    0.012   -0.044    0.005    1.000
##     LOCB_EWAF           -0.007    0.009   -0.025    0.011    1.000
##     LOCB_KADONE          0.008    0.010   -0.011    0.029    1.000
##     LOCB_KADTWO         -0.018    0.011   -0.039    0.002    1.000
##     LOCB_KARO           -0.006    0.016   -0.038    0.025    1.000
##     LOCB_KYEM            0.000    0.009   -0.018    0.018    1.000
##     LOCB_MARA            0.011    0.013   -0.014    0.035    1.000
##     LOCB_NONE           -0.001    0.010   -0.021    0.018    1.000
##     LOCB_NTWO           -0.014    0.011   -0.035    0.008    1.000
##     LOCB_NYAB            0.011    0.009   -0.006    0.028    1.000
##   MSTATUS_Div.wid ~~                                              
##     MSTATUS_Single      -0.011    0.004   -0.018   -0.004    1.000
##     Alcohol              0.023    0.018   -0.012    0.059    1.000
##     SMOKING              0.005    0.005   -0.004    0.013    1.000
##     LOCB_EWAF           -0.007    0.003   -0.014        0    1.000
##     LOCB_KADONE         -0.007    0.004   -0.014    0.001    1.000
##     LOCB_KADTWO          0.004    0.004   -0.004    0.012    1.000
##     LOCB_KARO            0.001    0.006    -0.01    0.013    1.000
##     LOCB_KYEM            0.009    0.003    0.002    0.016    1.000
##     LOCB_MARA           -0.003    0.005   -0.012    0.006    1.000
##     LOCB_NONE           -0.008    0.004   -0.015        0    1.000
##     LOCB_NTWO           -0.003    0.004   -0.012    0.005    1.000
##     LOCB_NYAB           -0.000    0.003   -0.007    0.006    1.000
##   MSTATUS_Single ~~                                               
##     Alcohol             -0.010    0.012   -0.033    0.013    1.000
##     SMOKING             -0.006    0.003   -0.012        0    1.000
##     LOCB_EWAF           -0.001    0.002   -0.005    0.003    1.000
##     LOCB_KADONE         -0.001    0.003   -0.006    0.004    1.000
##     LOCB_KADTWO          0.001    0.003   -0.004    0.006    1.000
##     LOCB_KARO           -0.003    0.004   -0.011    0.005    1.000
##     LOCB_KYEM           -0.001    0.002   -0.005    0.003    1.000
##     LOCB_MARA            0.002    0.003   -0.004    0.008    1.000
##     LOCB_NONE            0.002    0.002   -0.002    0.007    1.000
##     LOCB_NTWO           -0.003    0.003   -0.008    0.002    1.000
##     LOCB_NYAB           -0.002    0.002   -0.006    0.002    1.000
##   Alcohol ~~                                                      
##     SMOKING              0.083    0.015    0.054    0.113    1.000
##     LOCB_EWAF            0.039    0.011    0.017    0.061    1.000
##     LOCB_KADONE         -0.014    0.012   -0.038     0.01    1.000
##     LOCB_KADTWO         -0.006    0.013   -0.031    0.019    1.000
##     LOCB_KARO           -0.019    0.020   -0.059     0.02    1.000
##     LOCB_KYEM           -0.014    0.011   -0.036    0.008    1.000
##     LOCB_MARA           -0.001    0.015   -0.031     0.03    1.000
##     LOCB_NONE           -0.003    0.012   -0.027    0.021    1.000
##     LOCB_NTWO            0.018    0.013   -0.008    0.045    1.000
##     LOCB_NYAB           -0.002    0.011   -0.023    0.018    1.000
##   SMOKING ~~                                                      
##     LOCB_EWAF            0.002    0.003   -0.004    0.008    1.000
##     LOCB_KADONE         -0.002    0.003   -0.008    0.004    1.000
##     LOCB_KADTWO         -0.006    0.003   -0.012    0.001    1.000
##     LOCB_KARO            0.009    0.005   -0.001    0.019    1.000
##     LOCB_KYEM           -0.002    0.003   -0.008    0.003    1.000
##     LOCB_MARA           -0.001    0.004   -0.009    0.006    1.000
##     LOCB_NONE            0.007    0.003    0.001    0.013    1.000
##     LOCB_NTWO            0.005    0.003   -0.002    0.012    1.000
##     LOCB_NYAB           -0.001    0.003   -0.007    0.004    1.000
##   LOCB_EWAF ~~                                                    
##     LOCB_KADONE         -0.004    0.002   -0.009        0    1.000
##     LOCB_KADTWO         -0.005    0.002    -0.01        0    1.001
##     LOCB_KARO           -0.013    0.004   -0.021   -0.006    1.000
##     LOCB_KYEM           -0.004    0.002   -0.008    0.001    1.000
##     LOCB_MARA           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NONE           -0.004    0.002   -0.009        0    1.000
##     LOCB_NTWO           -0.005    0.003   -0.011        0    1.000
##     LOCB_NYAB           -0.003    0.002   -0.007    0.001    1.000
##   LOCB_KADONE ~~                                                  
##     LOCB_KADTWO         -0.007    0.003   -0.012   -0.001    1.000
##     LOCB_KARO           -0.017    0.004   -0.025   -0.008    1.000
##     LOCB_KYEM           -0.004    0.002   -0.009        0    1.000
##     LOCB_MARA           -0.009    0.003   -0.015   -0.002    1.000
##     LOCB_NONE           -0.006    0.003   -0.011        0    1.000
##     LOCB_NTWO           -0.006    0.003   -0.012   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.008    0.001    1.000
##   LOCB_KADTWO ~~                                                  
##     LOCB_KARO           -0.018    0.004   -0.026   -0.009    1.000
##     LOCB_KYEM           -0.005    0.002    -0.01        0    1.000
##     LOCB_MARA           -0.009    0.003   -0.016   -0.003    1.000
##     LOCB_NONE           -0.006    0.003   -0.011   -0.001    1.000
##     LOCB_NTWO           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.009        0    1.000
##   LOCB_KARO ~~                                                    
##     LOCB_KYEM           -0.013    0.004   -0.021   -0.006    1.000
##     LOCB_MARA           -0.027    0.005   -0.038   -0.017    1.000
##     LOCB_NONE           -0.016    0.004   -0.025   -0.008    1.000
##     LOCB_NTWO           -0.020    0.005   -0.029   -0.011    1.000
##     LOCB_NYAB           -0.012    0.004   -0.019   -0.005    1.000
##   LOCB_KYEM ~~                                                    
##     LOCB_MARA           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NONE           -0.004    0.002   -0.009        0    1.000
##     LOCB_NTWO           -0.005    0.003    -0.01        0    1.000
##     LOCB_NYAB           -0.003    0.002   -0.007    0.001    1.000
##   LOCB_MARA ~~                                                    
##     LOCB_NONE           -0.009    0.003   -0.015   -0.002    1.000
##     LOCB_NTWO           -0.011    0.004   -0.018   -0.004    1.000
##     LOCB_NYAB           -0.006    0.003   -0.012   -0.001    1.000
##   LOCB_NONE ~~                                                    
##     LOCB_NTWO           -0.006    0.003   -0.012   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.008    0.001    1.000
##   LOCB_NTWO ~~                                                    
##     LOCB_NYAB           -0.005    0.002    -0.01        0    1.000
##     Prior       
##                 
##        beta(3,3)
##                 
##        beta(3,3)
##        beta(2,4)
##                 
##        beta(2,4)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
## 
## Intercepts:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##    .PHQ8_est          0.023    0.139    -0.25    0.296    1.001    normal(0,10)
##    .FIES_est          0.000    0.035   -0.068    0.067    1.000    normal(0,10)
##     Economic_pvrty   -0.000    0.037   -0.073    0.074    1.000    normal(0,10)
##     Land_est          0.000    0.038   -0.074    0.074    1.000    normal(0,10)
##     FR.dist           0.000    0.038   -0.074    0.075    1.000    normal(0,10)
##     DOBB              0.001    0.039   -0.076    0.076    1.000    normal(0,10)
##     SEX               0.595    0.019    0.558    0.633    1.000    normal(0,10)
##     EDUCAT            2.640    0.048    2.546    2.733    1.000    normal(0,10)
##     Soci_est.1       -0.000    0.039   -0.076    0.075    1.000    normal(0,10)
##     MSTATUS_Div.wd    0.168    0.014     0.14    0.197    1.000    normal(0,10)
##     MSTATUS_Single    0.066    0.010    0.047    0.085    1.000    normal(0,10)
##     Alcohol           0.460    0.047    0.369    0.552    1.000    normal(0,10)
##     SMOKING           0.109    0.012    0.085    0.133    1.000    normal(0,10)
##     LOCB_EWAF         0.059    0.009    0.041    0.077    1.000    normal(0,10)
##     LOCB_KADONE       0.075    0.010    0.055    0.095    1.000    normal(0,10)
##     LOCB_KADTWO       0.079    0.010    0.059      0.1    1.000    normal(0,10)
##     LOCB_KARO         0.222    0.016     0.19    0.253    1.000    normal(0,10)
##     LOCB_KYEM         0.059    0.009    0.041    0.077    1.000    normal(0,10)
##     LOCB_MARA         0.118    0.012    0.093    0.142    1.000    normal(0,10)
##     LOCB_NONE         0.072    0.010    0.053    0.091    1.000    normal(0,10)
##     LOCB_NTWO         0.088    0.011    0.066    0.109    1.000    normal(0,10)
##     LOCB_NYAB         0.052    0.009    0.035    0.069    1.000    normal(0,10)
##     Forest_est.1      0.000    0.038   -0.075    0.075    1.000    normal(0,10)
##     Health            3.221    0.035    3.153    3.289    1.000    normal(0,10)
## 
## Variances:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##    .PHQ8_est          0.829    0.046    0.743    0.922    1.000 gamma(1,.5)[sd]
##    .FIES_est          0.836    0.045    0.751    0.929    1.000 gamma(1,.5)[sd]
##     Economic_pvrty    1.008    0.055    0.907     1.12    1.000 gamma(1,.5)[sd]
##     Land_est          1.004    0.053    0.904    1.114    1.000 gamma(1,.5)[sd]
##     Forest_est.1      1.007    0.055    0.905    1.122    1.000 gamma(1,.5)[sd]
##     Health            0.851    0.046    0.767    0.946    1.000 gamma(1,.5)[sd]
##     FR.dist           1.004    0.054    0.905    1.113    1.000 gamma(1,.5)[sd]
##     DOBB              1.022    0.056    0.919    1.137    1.000 gamma(1,.5)[sd]
##     SEX               0.247    0.013    0.222    0.274    1.000 gamma(1,.5)[sd]
##     EDUCAT            1.621    0.088     1.46    1.802    1.000 gamma(1,.5)[sd]
##     Soci_est.1        1.026    0.056    0.922    1.142    1.000 gamma(1,.5)[sd]
##     MSTATUS_Div.wd    0.144    0.008    0.129    0.159    1.000 gamma(1,.5)[sd]
##     MSTATUS_Single    0.063    0.003    0.057     0.07    1.000 gamma(1,.5)[sd]
##     Alcohol           1.546    0.083    1.392    1.716    1.000 gamma(1,.5)[sd]
##     SMOKING           0.100    0.005     0.09    0.111    1.000 gamma(1,.5)[sd]
##     LOCB_EWAF         0.057    0.003    0.051    0.063    1.000 gamma(1,.5)[sd]
##     LOCB_KADONE       0.070    0.004    0.063    0.078    1.000 gamma(1,.5)[sd]
##     LOCB_KADTWO       0.075    0.004    0.067    0.083    1.000 gamma(1,.5)[sd]
##     LOCB_KARO         0.177    0.010    0.159    0.197    1.000 gamma(1,.5)[sd]
##     LOCB_KYEM         0.057    0.003    0.051    0.063    1.000 gamma(1,.5)[sd]
##     LOCB_MARA         0.107    0.006    0.096    0.119    1.000 gamma(1,.5)[sd]
##     LOCB_NONE         0.069    0.004    0.062    0.076    1.000 gamma(1,.5)[sd]
##     LOCB_NTWO         0.082    0.004    0.074    0.091    1.000 gamma(1,.5)[sd]
##     LOCB_NYAB         0.051    0.003    0.045    0.056    1.000 gamma(1,.5)[sd]
round(100*(as.numeric(fit_main_1_sum$Estimate)-as.numeric(fit_main_6_sum$Estimate))/as.numeric(fit_main_6_sum$Estimate),2) # Fine, if it is only small 
##   [1]    0.00    1.71    0.00    0.56    0.00   -0.73    0.00    0.37   -1.20
##  [10]    0.00    1.15   -1.06   -2.04  -10.00   -1.63    0.00    7.14    1.36
##  [19]   -0.39    1.79    0.00   -0.41   -1.18   -2.22    5.26    0.00   -0.12
##  [28]   -0.12    0.00    0.10   -0.10    0.12    0.10    2.70    0.00    0.00
##  [37]    9.09    0.00    0.00    0.00    0.00    0.00    0.54    0.00    0.00
##  [46]    0.00    0.00    0.00    0.00    0.00   -0.10   -2.27   -0.40    0.00
##  [55]    0.00    0.00    0.00   -1.59    0.00    0.00    0.00     NaN  -20.00
##  [64]    0.00     NaN    0.00    0.00    0.00    0.00    0.00    2.78    0.00
##  [73]    0.00    0.00    0.00    0.00    0.00    0.00    0.00     NaN    0.00
##  [82]    0.00    0.00    0.06    0.00    0.00    0.00   -2.04    0.00    0.00
##  [91]    0.00    0.00    0.00    5.56  -33.33    0.00    0.00    0.00    0.00
## [100]   -2.63    0.00   -4.35    0.00    0.00   12.50    0.00    0.00     NaN
## [109]   -9.09    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
## [118]    0.00    0.00    0.00    0.00    0.00    0.00    0.00     NaN    0.00
## [127]    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
## [136]    0.00    0.00   -0.06    0.00    0.00    0.00    0.00    0.00    0.00
## [145]    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
## [154]    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
## [163]    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
## [172]    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
## [181]    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
## [190]    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
## [199]    0.00    0.00    0.00    0.00    0.00  -17.39     NaN     NaN     NaN
## [208]     NaN -100.00    0.17    0.04     NaN    0.00    0.00    0.00    0.00
## [217]    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
## [226]     NaN    0.03

2.10) ‘Is the Bayesian way of interpreting and reporting model results used?’

# Refer to this article: https://www.rensvandeschoot.com/wp-content/uploads/2017/02/2014-JA-RENS-Depaoli.pdf
# Credibility interval - there is a 95% probability that the true coefficient exists between the credibility interval. 
summary(fit_main_1)
## blavaan (0.3-15) results of 4000 samples after 4000 adapt/burnin iterations
## 
##   Number of observations                           695
## 
##   Number of missing patterns                         1
## 
##   Statistic                                 MargLogLik         PPP
##   Value                                     -12480.392       0.000
## 
## Regressions:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##   PHQ8_est ~                                                                   
##     FIES_est          0.212    0.038    0.137    0.288    1.000     normal(1,1)
##     Economic_pvrty    0.119    0.042    0.036    0.202    1.000     normal(1,1)
##   FIES_est ~                                                                   
##     Land_est         -0.158    0.035   -0.226   -0.089    1.000  normal(-0.5,2)
##     Economic_pvrty    0.356    0.035    0.286    0.426    1.000     normal(1,1)
##     FR.dist          -0.012    0.034   -0.079    0.056    1.000  normal(-0.5,2)
##   PHQ8_est ~                                                                   
##     DOBB              0.013    0.039   -0.063    0.089    1.000   normal(0.5,2)
##     SEX               0.088    0.077   -0.061     0.24    1.000   normal(0.5,2)
##     EDUCAT           -0.093    0.031   -0.154   -0.031    1.000  normal(-0.5,2)
##     Soci_est.1       -0.048    0.037    -0.12    0.024    1.000  normal(-0.5,2)
##     MSTATUS_Div.wd   -0.018    0.101   -0.215    0.178    1.000   normal(0.5,2)
##     MSTATUS_Single    0.121    0.150    -0.17    0.413    1.000     normal(0,9)
##     Alcohol           0.005    0.029   -0.053    0.063    1.000   normal(0.5,2)
##     SMOKING           0.075    0.118   -0.158    0.307    1.000   normal(0.5,2)
##     LOCB_EWAF         0.149    0.162   -0.166    0.468    1.000     normal(0,9)
##     LOCB_KADONE       0.253    0.151   -0.045     0.55    1.000     normal(0,9)
##     LOCB_KADTWO       0.057    0.148   -0.236    0.347    1.000     normal(0,9)
##     LOCB_KARO         0.284    0.109    0.069    0.498    1.000     normal(0,9)
##     LOCB_KYEM         0.482    0.161    0.167    0.794    1.000     normal(0,9)
##     LOCB_MARA         0.084    0.129    -0.17    0.337    1.000     normal(0,9)
##     LOCB_NONE         0.044    0.152   -0.252    0.343    1.000     normal(0,9)
##     LOCB_NTWO         0.040    0.144   -0.243    0.322    1.000     normal(0,9)
##     LOCB_NYAB         0.347    0.171     0.01    0.679    1.000     normal(0,9)
## 
## Covariances:
##                       Estimate  Post.SD pi.lower pi.upper     Rhat
##  .FIES_est ~~                                                     
##     Forest_est.1         0.136    0.036    0.067    0.207    1.000
##   Economic_poverty ~~                                             
##     Forest_est.1         0.033    0.037   -0.039    0.107    1.000
##     Land_est            -0.272    0.040   -0.352   -0.195    1.000
##  .PHQ8_est ~~                                                     
##     Health              -0.165    0.038    -0.24   -0.093    1.000
##   FR.dist ~~                                                      
##     DOBB                 0.038    0.038   -0.038    0.113    1.000
##     SEX                 -0.026    0.019   -0.063    0.011    1.000
##     EDUCAT               0.005    0.047   -0.089    0.097    1.000
##     Soci_est.1           0.012    0.039   -0.065    0.088    1.000
##     MSTATUS_Div.wd      -0.013    0.014   -0.041    0.015    1.000
##     MSTATUS_Single       0.001    0.009   -0.018    0.019    1.000
##     Alcohol             -0.068    0.048   -0.162    0.023    1.000
##     SMOKING             -0.007    0.012   -0.031    0.016    1.000
##     LOCB_EWAF           -0.024    0.009   -0.042   -0.007    1.000
##     LOCB_KADONE          0.186    0.012    0.163    0.211    1.001
##     LOCB_KADTWO          0.124    0.011    0.102    0.147    1.000
##     LOCB_KARO           -0.066    0.016   -0.098   -0.035    1.000
##     LOCB_KYEM           -0.039    0.009   -0.056   -0.021    1.000
##     LOCB_MARA           -0.088    0.013   -0.114   -0.063    1.001
##     LOCB_NONE            0.005    0.010   -0.014    0.025    1.001
##     LOCB_NTWO           -0.051    0.011   -0.073    -0.03    1.000
##     LOCB_NYAB           -0.024    0.009   -0.041   -0.007    1.000
##   DOBB ~~                                                         
##     SEX                 -0.043    0.019   -0.081   -0.007    1.000
##     EDUCAT              -0.249    0.050   -0.349   -0.154    1.000
##     Soci_est.1          -0.004    0.038   -0.079     0.07    1.000
##     MSTATUS_Div.wd       0.098    0.015     0.07    0.128    1.000
##     MSTATUS_Single      -0.063    0.010   -0.083   -0.044    1.000
##     Alcohol              0.179    0.048    0.085    0.275    1.000
##     SMOKING              0.062    0.012    0.039    0.087    1.000
##     LOCB_EWAF            0.013    0.009   -0.004    0.031    1.000
##     LOCB_KADONE         -0.002    0.010   -0.022    0.017    1.000
##     LOCB_KADTWO          0.016    0.010   -0.005    0.036    1.000
##     LOCB_KARO            0.000    0.016   -0.032    0.032    1.000
##     LOCB_KYEM            0.004    0.009   -0.014    0.022    1.000
##     LOCB_MARA           -0.023    0.012   -0.048    0.001    1.000
##     LOCB_NONE            0.000    0.010   -0.019     0.02    1.000
##     LOCB_NTWO           -0.011    0.011   -0.032    0.011    1.000
##     LOCB_NYAB            0.009    0.009   -0.008    0.025    1.000
##   SEX ~~                                                          
##     EDUCAT              -0.140    0.025    -0.19   -0.093    1.000
##     Soci_est.1          -0.027    0.019   -0.065    0.011    1.000
##     MSTATUS_Div.wd       0.037    0.007    0.023    0.051    1.000
##     MSTATUS_Single      -0.009    0.005   -0.019        0    1.000
##     Alcohol             -0.097    0.023   -0.143   -0.052    1.000
##     SMOKING             -0.038    0.006    -0.05   -0.026    1.000
##     LOCB_EWAF           -0.009    0.005   -0.018        0    1.000
##     LOCB_KADONE          0.003    0.005   -0.007    0.013    1.000
##     LOCB_KADTWO         -0.007    0.005   -0.017    0.003    1.000
##     LOCB_KARO           -0.015    0.008   -0.031        0    1.000
##     LOCB_KYEM            0.001    0.004   -0.008    0.009    1.000
##     LOCB_MARA            0.000    0.006   -0.012    0.012    1.000
##     LOCB_NONE            0.005    0.005   -0.005    0.015    1.000
##     LOCB_NTWO            0.005    0.005   -0.006    0.015    1.000
##     LOCB_NYAB            0.002    0.004   -0.006     0.01    1.000
##   EDUCAT ~~                                                       
##     Soci_est.1           0.195    0.050    0.098    0.294    1.000
##     MSTATUS_Div.wd      -0.075    0.019   -0.112    -0.04    1.000
##     MSTATUS_Single       0.086    0.013    0.062    0.111    1.000
##     Alcohol             -0.048    0.060   -0.163    0.069    1.000
##     SMOKING             -0.043    0.015   -0.073   -0.013    1.000
##     LOCB_EWAF           -0.005    0.012   -0.028    0.018    1.000
##     LOCB_KADONE         -0.008    0.013   -0.032    0.017    1.000
##     LOCB_KADTWO          0.001    0.013   -0.025    0.027    1.000
##     LOCB_KARO            0.015    0.020   -0.025    0.054    1.000
##     LOCB_KYEM            0.019    0.011   -0.004    0.041    1.000
##     LOCB_MARA           -0.002    0.016   -0.033    0.028    1.000
##     LOCB_NONE            0.029    0.013    0.004    0.053    1.000
##     LOCB_NTWO           -0.056    0.014   -0.084   -0.029    1.000
##     LOCB_NYAB           -0.017    0.011   -0.039    0.004    1.000
##   Soci_est.1 ~~                                                   
##     MSTATUS_Div.wd      -0.037    0.015   -0.067   -0.009    1.000
##     MSTATUS_Single       0.030    0.010    0.011    0.049    1.000
##     Alcohol             -0.022    0.048   -0.116    0.073    1.000
##     SMOKING             -0.019    0.012   -0.043    0.004    1.000
##     LOCB_EWAF           -0.007    0.009   -0.025    0.011    1.000
##     LOCB_KADONE          0.009    0.010   -0.011    0.029    1.000
##     LOCB_KADTWO         -0.018    0.010   -0.039    0.002    1.000
##     LOCB_KARO           -0.006    0.016   -0.038    0.025    1.000
##     LOCB_KYEM            0.000    0.009   -0.018    0.019    1.000
##     LOCB_MARA            0.010    0.013   -0.014    0.035    1.000
##     LOCB_NONE           -0.001    0.010   -0.021    0.018    1.000
##     LOCB_NTWO           -0.014    0.011   -0.035    0.007    1.000
##     LOCB_NYAB            0.011    0.009   -0.006    0.028    1.000
##   MSTATUS_Div.wid ~~                                              
##     MSTATUS_Single      -0.011    0.004   -0.018   -0.004    1.000
##     Alcohol              0.023    0.018   -0.012    0.059    1.000
##     SMOKING              0.005    0.005   -0.004    0.013    1.000
##     LOCB_EWAF           -0.007    0.003   -0.014   -0.001    1.000
##     LOCB_KADONE         -0.007    0.004   -0.014        0    1.000
##     LOCB_KADTWO          0.004    0.004   -0.004    0.012    1.000
##     LOCB_KARO            0.001    0.006    -0.01    0.013    1.000
##     LOCB_KYEM            0.009    0.003    0.002    0.016    1.000
##     LOCB_MARA           -0.003    0.005   -0.012    0.007    1.000
##     LOCB_NONE           -0.008    0.004   -0.015        0    1.000
##     LOCB_NTWO           -0.003    0.004   -0.012    0.005    1.000
##     LOCB_NYAB           -0.000    0.003   -0.007    0.006    1.000
##   MSTATUS_Single ~~                                               
##     Alcohol             -0.010    0.012   -0.033    0.013    1.000
##     SMOKING             -0.006    0.003   -0.012        0    1.000
##     LOCB_EWAF           -0.001    0.002   -0.005    0.003    1.000
##     LOCB_KADONE         -0.001    0.003   -0.005    0.004    1.000
##     LOCB_KADTWO          0.001    0.003   -0.005    0.006    1.000
##     LOCB_KARO           -0.003    0.004   -0.011    0.005    1.000
##     LOCB_KYEM           -0.001    0.002   -0.005    0.003    1.000
##     LOCB_MARA            0.002    0.003   -0.004    0.008    1.000
##     LOCB_NONE            0.002    0.003   -0.003    0.007    1.000
##     LOCB_NTWO           -0.003    0.003   -0.008    0.002    1.000
##     LOCB_NYAB           -0.002    0.002   -0.006    0.002    1.000
##   Alcohol ~~                                                      
##     SMOKING              0.083    0.015    0.054    0.113    1.000
##     LOCB_EWAF            0.039    0.011    0.017    0.061    1.000
##     LOCB_KADONE         -0.014    0.012   -0.039    0.011    1.000
##     LOCB_KADTWO         -0.006    0.013   -0.032    0.019    1.000
##     LOCB_KARO           -0.019    0.020   -0.058    0.019    1.000
##     LOCB_KYEM           -0.014    0.011   -0.036    0.008    1.000
##     LOCB_MARA           -0.001    0.015   -0.031    0.029    1.000
##     LOCB_NONE           -0.003    0.012   -0.027    0.022    1.000
##     LOCB_NTWO            0.018    0.013   -0.008    0.045    1.000
##     LOCB_NYAB           -0.002    0.011   -0.023    0.018    1.000
##   SMOKING ~~                                                      
##     LOCB_EWAF            0.002    0.003   -0.004    0.008    1.000
##     LOCB_KADONE         -0.002    0.003   -0.009    0.004    1.000
##     LOCB_KADTWO         -0.006    0.003   -0.012        0    1.000
##     LOCB_KARO            0.009    0.005   -0.001    0.019    1.000
##     LOCB_KYEM           -0.002    0.003   -0.008    0.003    1.000
##     LOCB_MARA           -0.001    0.004   -0.009    0.006    1.000
##     LOCB_NONE            0.007    0.003    0.001    0.013    1.000
##     LOCB_NTWO            0.005    0.003   -0.002    0.011    1.000
##     LOCB_NYAB           -0.001    0.003   -0.007    0.004    1.000
##   LOCB_EWAF ~~                                                    
##     LOCB_KADONE         -0.004    0.002   -0.009        0    1.000
##     LOCB_KADTWO         -0.005    0.002    -0.01        0    1.000
##     LOCB_KARO           -0.013    0.004   -0.021   -0.006    1.000
##     LOCB_KYEM           -0.004    0.002   -0.008    0.001    1.000
##     LOCB_MARA           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NONE           -0.004    0.002   -0.009        0    1.000
##     LOCB_NTWO           -0.005    0.003    -0.01        0    1.000
##     LOCB_NYAB           -0.003    0.002   -0.007    0.001    1.000
##   LOCB_KADONE ~~                                                  
##     LOCB_KADTWO         -0.007    0.003   -0.012   -0.001    1.000
##     LOCB_KARO           -0.017    0.004   -0.025   -0.008    1.000
##     LOCB_KYEM           -0.004    0.002   -0.009        0    1.000
##     LOCB_MARA           -0.009    0.003   -0.015   -0.002    1.000
##     LOCB_NONE           -0.006    0.003   -0.011   -0.001    1.000
##     LOCB_NTWO           -0.006    0.003   -0.012   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.008        0    1.000
##   LOCB_KADTWO ~~                                                  
##     LOCB_KARO           -0.018    0.004   -0.026   -0.009    1.000
##     LOCB_KYEM           -0.005    0.002    -0.01        0    1.000
##     LOCB_MARA           -0.009    0.003   -0.016   -0.003    1.000
##     LOCB_NONE           -0.006    0.003   -0.011   -0.001    1.000
##     LOCB_NTWO           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.009        0    1.000
##   LOCB_KARO ~~                                                    
##     LOCB_KYEM           -0.013    0.004   -0.021   -0.006    1.000
##     LOCB_MARA           -0.027    0.005   -0.037   -0.017    1.000
##     LOCB_NONE           -0.016    0.004   -0.025   -0.008    1.000
##     LOCB_NTWO           -0.020    0.005   -0.029   -0.011    1.000
##     LOCB_NYAB           -0.012    0.004   -0.019   -0.005    1.000
##   LOCB_KYEM ~~                                                    
##     LOCB_MARA           -0.007    0.003   -0.013   -0.001    1.000
##     LOCB_NONE           -0.004    0.002   -0.009        0    1.000
##     LOCB_NTWO           -0.005    0.003   -0.011        0    1.000
##     LOCB_NYAB           -0.003    0.002   -0.007    0.001    1.000
##   LOCB_MARA ~~                                                    
##     LOCB_NONE           -0.009    0.003   -0.015   -0.002    1.000
##     LOCB_NTWO           -0.011    0.004   -0.018   -0.004    1.000
##     LOCB_NYAB           -0.006    0.003   -0.012   -0.001    1.000
##   LOCB_NONE ~~                                                    
##     LOCB_NTWO           -0.006    0.003   -0.012   -0.001    1.000
##     LOCB_NYAB           -0.004    0.002   -0.008    0.001    1.000
##   LOCB_NTWO ~~                                                    
##     LOCB_NYAB           -0.005    0.002    -0.01        0    1.000
##     Prior       
##                 
##        beta(3,2)
##                 
##        beta(3,2)
##        beta(2,3)
##                 
##        beta(2,3)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
##        beta(1,1)
##                 
##        beta(1,1)
## 
## Intercepts:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##    .PHQ8_est          0.019    0.139   -0.256    0.289    1.000    normal(0,10)
##    .FIES_est         -0.000    0.035   -0.068    0.068    1.000    normal(0,10)
##     Economic_pvrty    0.000    0.039   -0.077    0.076    1.000    normal(0,10)
##     Land_est          0.000    0.038   -0.074    0.074    1.000    normal(0,10)
##     FR.dist           0.000    0.038   -0.075    0.076    1.000    normal(0,10)
##     DOBB              0.000    0.038   -0.074    0.074    1.000    normal(0,10)
##     SEX               0.596    0.019    0.559    0.633    1.000    normal(0,10)
##     EDUCAT            2.641    0.048    2.548    2.735    1.000    normal(0,10)
##     Soci_est.1       -0.000    0.039   -0.076    0.076    1.000    normal(0,10)
##     MSTATUS_Div.wd    0.168    0.015     0.14    0.197    1.000    normal(0,10)
##     MSTATUS_Single    0.066    0.009    0.048    0.085    1.000    normal(0,10)
##     Alcohol           0.460    0.048    0.366    0.554    1.000    normal(0,10)
##     SMOKING           0.109    0.012    0.086    0.133    1.000    normal(0,10)
##     LOCB_EWAF         0.059    0.009    0.042    0.077    1.000    normal(0,10)
##     LOCB_KADONE       0.075    0.010    0.055    0.095    1.000    normal(0,10)
##     LOCB_KADTWO       0.079    0.010    0.059      0.1    1.000    normal(0,10)
##     LOCB_KARO         0.222    0.016     0.19    0.253    1.000    normal(0,10)
##     LOCB_KYEM         0.059    0.009    0.041    0.077    1.000    normal(0,10)
##     LOCB_MARA         0.118    0.012    0.094    0.142    1.000    normal(0,10)
##     LOCB_NONE         0.072    0.010    0.052    0.091    1.000    normal(0,10)
##     LOCB_NTWO         0.088    0.011    0.066    0.109    1.000    normal(0,10)
##     LOCB_NYAB         0.052    0.008    0.035    0.068    1.000    normal(0,10)
##     Forest_est.1     -0.000    0.038   -0.074    0.072    1.000    normal(0,10)
##     Health            3.222    0.035    3.153    3.291    1.000    normal(0,10)
## 
## Variances:
##                    Estimate  Post.SD pi.lower pi.upper     Rhat    Prior       
##    .PHQ8_est          0.828    0.046    0.745    0.924    1.000 gamma(1,.5)[sd]
##    .FIES_est          0.835    0.045    0.751    0.926    1.000 gamma(1,.5)[sd]
##     Economic_pvrty    1.008    0.054    0.906    1.118    1.000 gamma(1,.5)[sd]
##     Land_est          1.005    0.054    0.903    1.116    1.000 gamma(1,.5)[sd]
##     Forest_est.1      1.006    0.055    0.905    1.119    1.000 gamma(1,.5)[sd]
##     Health            0.852    0.046    0.768    0.946    1.000 gamma(1,.5)[sd]
##     FR.dist           1.005    0.054    0.904    1.115    1.001 gamma(1,.5)[sd]
##     DOBB              1.021    0.055    0.919    1.134    1.000 gamma(1,.5)[sd]
##     SEX               0.247    0.013    0.222    0.274    1.000 gamma(1,.5)[sd]
##     EDUCAT            1.622    0.088    1.459    1.806    1.000 gamma(1,.5)[sd]
##     Soci_est.1        1.026    0.057    0.921    1.144    1.000 gamma(1,.5)[sd]
##     MSTATUS_Div.wd    0.144    0.008    0.129     0.16    1.000 gamma(1,.5)[sd]
##     MSTATUS_Single    0.063    0.003    0.057     0.07    1.000 gamma(1,.5)[sd]
##     Alcohol           1.545    0.083    1.391    1.716    1.000 gamma(1,.5)[sd]
##     SMOKING           0.100    0.005     0.09    0.111    1.000 gamma(1,.5)[sd]
##     LOCB_EWAF         0.057    0.003    0.051    0.063    1.000 gamma(1,.5)[sd]
##     LOCB_KADONE       0.070    0.004    0.063    0.078    1.000 gamma(1,.5)[sd]
##     LOCB_KADTWO       0.075    0.004    0.067    0.083    1.000 gamma(1,.5)[sd]
##     LOCB_KARO         0.177    0.010    0.159    0.196    1.000 gamma(1,.5)[sd]
##     LOCB_KYEM         0.057    0.003    0.051    0.064    1.000 gamma(1,.5)[sd]
##     LOCB_MARA         0.107    0.006    0.096    0.119    1.000 gamma(1,.5)[sd]
##     LOCB_NONE         0.069    0.004    0.062    0.076    1.000 gamma(1,.5)[sd]
##     LOCB_NTWO         0.082    0.004    0.074    0.091    1.000 gamma(1,.5)[sd]
##     LOCB_NYAB         0.051    0.003    0.045    0.056    1.000 gamma(1,.5)[sd]

Extra) Looking posteriors on the same scale as the priors

# Extract the variable names 
summary_DF_names <- paste0(fit_main_1@ParTable$lhs, fit_main_1@ParTable$op , fit_main_1@ParTable$rhs)

# Create a DF from the MCMC draws 
fit_1_MCMCbinded_DF <- data.frame(fit_1_MCMCbinded)

# Rename the columns 
colnames(fit_1_MCMCbinded_DF) <- make.unique(summary_DF_names)
# Function for creating prior DF  
prior.posterior.plot <- function(type="normal", mean=0, variance=1, shape.a=1, shape.b=1, sec.min=-6, sec.max=6, step=.01) {
    x <- seq(sec.min, sec.max, by = step)
  
  # For a normally distributed prior 
  if (type == "normal") {
    prior.d <- dnorm(x,mean = mean, sd = sqrt(variance))
  }
  
  # For a beta distributed prior 
  if (type == "beta") {
    prior.d <- dbeta(x, shape1  = shape.a, shape2 = shape.b)
  }
  
  # Plot 
  df <- data.frame(x = x, prior.d = prior.d)  
  
  return(df)
  }

### Depression ~ Food insecurity ###
Dep_FI_DF <- prior.posterior.plot(type = "normal", mean = 1, variance = 1)

# Plot the prior (red) and posterior (black)
ggplot(data=Dep_FI_DF, aes(x=x, y=prior.d, group=1)) +
      geom_line(size = .5, color = "red") +
  xlab("Depression ~ Food insecurity") +
  ylab("Prob. den.")  +
  geom_density(data = fit_1_MCMCbinded_DF,
               aes(x = `PHQ8_est~FIES_est`),
               inherit.aes = FALSE,
               size = .5)

### Depression ~ Economic poverty ### 
Dep_EP_DF <- prior.posterior.plot(type = "normal", mean = 1, variance = 1)

# Plot the prior (red) and posterior (black)
ggplot(data=Dep_EP_DF, aes(x=x, y=prior.d, group=1)) +
      geom_line(size = .5, color = "red") +
  xlab("Depression ~ Economic poverty") +
  ylab("Prob. den.")  +
  geom_density(data = fit_1_MCMCbinded_DF,
               aes(x = `PHQ8_est~Economic_poverty`),
               inherit.aes = FALSE,
               size = .5)

# Food insecurity ~ Forest dependence (covariance)
# Unclear how to convert between a prior on the beta scale and posterior on the linear scale 

# Food insecurity   ~   Farm size   
FI_Farm_DF <- prior.posterior.plot(type = "normal", mean = -0.5, variance = 4)

# Plot the prior (red) and posterior (black)
ggplot(data=FI_Farm_DF, aes(x=x, y=prior.d, group=1)) +
      geom_line(size = .5, color = "red") +
  xlab("Food insecurity ~ Farm size") +
  ylab("Prob. den.")  +
  geom_density(data = fit_1_MCMCbinded_DF,
               aes(x = `FIES_est~Land_est`),
               inherit.aes = FALSE,
               size = .5)

# Food insecurity   ~   Economic poverty
FI_EP_DF <- prior.posterior.plot(type = "normal", mean = 1, variance = 1)

# Plot the prior (red) and posterior (black)
ggplot(data=FI_EP_DF, aes(x=x, y=prior.d, group=1)) +
      geom_line(size = .5, color = "red") +
  xlab("Food insecurity ~ Economic poverty") +
  ylab("Prob. den.")  +
  geom_density(data = fit_1_MCMCbinded_DF,
               aes(x = `FIES_est~Economic_poverty`),
               inherit.aes = FALSE,
               size = .5)

# Food insecurity   ~   Distance for forest reserve 
FI_Dist_DF <- prior.posterior.plot(type = "normal", mean = -0.5, variance = 4)

# Plot the prior (red) and posterior (black)
ggplot(data=FI_Dist_DF, aes(x=x, y=prior.d, group=1)) +
      geom_line(size = .5, color = "red") +
  xlab("Food insecurity ~ Distance for forest reserve") +
  ylab("Prob. den.")  +
  geom_density(data = fit_1_MCMCbinded_DF,
               aes(x = `FIES_est~FR.dist`),
               inherit.aes = FALSE,
               size = .5)

# Economic poverty ~ Forest dependence
# Unclear how to convert between a prior on the beta scale and posterior on the linear scale 

# Economic poverty ~ Farm size
# Unclear how to convert between a prior on the beta scale and posterior on the linear scale 

# Depression ~ Age
De_Age_DF <- prior.posterior.plot(type = "normal", mean = 0.5, variance = 4)

# Plot the prior (red) and posterior (black)
ggplot(data=De_Age_DF, aes(x=x, y=prior.d, group=1)) +
      geom_line(size = .5, color = "red") +
  xlab("Depression ~ Age") +
  ylab("Prob. den.")  +
  geom_density(data = fit_1_MCMCbinded_DF,
               aes(x = `PHQ8_est~DOBB`),
               inherit.aes = FALSE,
               size = .5)

# Depression ~ Gender 
De_Gen_DF <- prior.posterior.plot(type = "normal", mean = 0.5, variance = 4)

# Plot the prior (red) and posterior (black)
ggplot(data=De_Gen_DF, aes(x=x, y=prior.d, group=1)) +
      geom_line(size = .5, color = "red") +
  xlab("Depression ~ Gender") +
  ylab("Prob. den.")  +
  geom_density(data = fit_1_MCMCbinded_DF,
               aes(x = `PHQ8_est~SEX`),
               inherit.aes = FALSE,
               size = .5)

# Depression ~ Education 
De_Edu_DF <- prior.posterior.plot(type = "normal", mean = -0.5, variance = 4)

# Plot the prior (red) and posterior (black)
ggplot(data=De_Edu_DF, aes(x=x, y=prior.d, group=1)) +
      geom_line(size = .5, color = "red") +
  xlab("Depression ~ Education") +
  ylab("Prob. den.")  +
  geom_density(data = fit_1_MCMCbinded_DF,
               aes(x = `PHQ8_est~EDUCAT`),
               inherit.aes = FALSE,
               size = .5)

# Depression ~ Social support 
De_Soc_DF <- prior.posterior.plot(type = "normal", mean = -0.5, variance = 4)

# Plot the prior (red) and posterior (black)
ggplot(data=De_Soc_DF, aes(x=x, y=prior.d, group=1)) +
      geom_line(size = .5, color = "red") +
  xlab("Depression ~ Social support") +
  ylab("Prob. den.")  +
  geom_density(data = fit_1_MCMCbinded_DF,
               aes(x = `PHQ8_est~Soci_est.1`),
               inherit.aes = FALSE,
               size = .5)

# Depression ~ Divorced or widowed   
De_Mar_DF <- prior.posterior.plot(type = "normal", mean = 0.5, variance = 4)

# Plot the prior (red) and posterior (black)
ggplot(data=De_Mar_DF, aes(x=x, y=prior.d, group=1)) +
      geom_line(size = .5, color = "red") +
  xlab("Depression ~ Divorced or widowed") +
  ylab("Prob. den.")  +
  geom_density(data = fit_1_MCMCbinded_DF,
               aes(x = `PHQ8_est~MSTATUS_Div.wid`),
               inherit.aes = FALSE,
               size = .5)

# Depression ~ Never married  
De_Mar2_DF <- prior.posterior.plot(type = "normal", mean = 0, variance = 9, sec.min=-9, sec.max=9)

# Plot the prior (red) and posterior (black)
ggplot(data=De_Mar2_DF, aes(x=x, y=prior.d, group=1)) +
      geom_line(size = .5, color = "red") +
  xlab("Depression ~ Never married") +
  ylab("Prob. den.")  +
  geom_density(data = fit_1_MCMCbinded_DF,
               aes(x = `PHQ8_est~MSTATUS_Single`),
               inherit.aes = FALSE,
               size = .5)

# Depression ~ General health 
# Unclear how to convert between a prior on the beta scale and posterior on the linear scale 

# Depression ~ Alcohol consumption 
De_Alc_DF <- prior.posterior.plot(type = "normal", mean = 0.5, variance = 4)

# Plot the prior (red) and posterior (black)
ggplot(data=De_Alc_DF, aes(x=x, y=prior.d, group=1)) +
      geom_line(size = .5, color = "red") +
  xlab("Depression ~ Alcohol consumption") +
  ylab("Prob. den.")  +
  geom_density(data = fit_1_MCMCbinded_DF,
               aes(x = `PHQ8_est~Alcohol`),
               inherit.aes = FALSE,
               size = .5)

# Depression ~ Smoking
De_Smok_DF <- prior.posterior.plot(type = "normal", mean = 0.5, variance = 4)

# Plot the prior (red) and posterior (black)
ggplot(data=De_Smok_DF, aes(x=x, y=prior.d, group=1)) +
      geom_line(size = .5, color = "red") +
  xlab("Depression ~ Smoking") +
  ylab("Prob. den.")  +
  geom_density(data = fit_1_MCMCbinded_DF,
               aes(x = `PHQ8_est~SMOKING`),
               inherit.aes = FALSE,
               size = .5)

# # Depression ~ Community (all)
# De_COM_DF <- prior.posterior.plot(type = "normal", mean = 0, variance = 9, sec.min=-9, sec.max=9)
# 
# # Plot the prior (red) and posterior (black)
# ggplot(data=De_COM_DF, aes(x=x, y=prior.d, group=1)) +
#       geom_line(size = .5, color = "red") +
#   xlab("Depression ~ Community (all)") +
#   ylab("Prob. den.")  +
#   geom_density(data = fit_1_MCMCbinded_DF,
#                aes(x = `PHQ8_est~LOCB_EWAF`),
#                inherit.aes = FALSE,
#                size = .5) +
#   geom_density(data = fit_1_MCMCbinded_DF,
#                aes(x = `PHQ8_est~LOCB_KADONE`),
#                inherit.aes = FALSE,
#                size = .5)+
#   geom_density(data = fit_1_MCMCbinded_DF,
#                aes(x = `PHQ8_est~LOCB_KADTWO`),
#                inherit.aes = FALSE,
#                size = .5)+
#   geom_density(data = fit_1_MCMCbinded_DF,
#                aes(x = `PHQ8_est~LOCB_KARO`),
#                inherit.aes = FALSE,
#                size = .5)+
#   geom_density(data = fit_1_MCMCbinded_DF,
#                aes(x = `PHQ8_est~LOCB_KYEM`),
#                inherit.aes = FALSE,
#                size = .5)+
#   geom_density(data = fit_1_MCMCbinded_DF,
#                aes(x = `PHQ8_est~LOCB_MARA`),
#                inherit.aes = FALSE,
#                size = .5)+
#   geom_density(data = fit_1_MCMCbinded_DF,
#                aes(x = `PHQ8_est~LOCB_NONE`),
#                inherit.aes = FALSE,
#                size = .5)+
#   geom_density(data = fit_1_MCMCbinded_DF,
#                aes(x = `PHQ8_est~LOCB_NTWO`),
#                inherit.aes = FALSE,
#                size = .5)+
#   geom_density(data = fit_1_MCMCbinded_DF,
#                aes(x = `PHQ8_est~LOCB_NYAB`),
#                inherit.aes = FALSE,
#                size = .5)+
#   geom_density(data = fit_1_MCMCbinded_DF,
#                aes(x = `PHQ8_est~LOCB_NYAK`),
#                inherit.aes = FALSE,
#                size = .5) 

Examine the patterns within the scenarios