BRMS for PCA and latent variable modelling to sequential mediation modelling?

In my SEM analysis which from longitudinal data collected over two time period .since i have more than 1000 variables and had to model a latent variable for mediator and outcome both. I have used PCA for dimensionality reduction, Laavan package for latent variable modelling and mediation package for my causal mediation analysis which is a sequential mediation model, But i want to reanalyze my results using Bayesian approach . Can I use BRMS package to include all of these techniques ? I have already tried to use BRMS but since i am a beginner in BRMS and Bayesian approach to be honest :) could use a professional help.
which function do I use to do following

  1. for reduction of dimensionality of my data like PCA and latent variable modelling like lavaan (should i use blavaan or is there a specialized function for this). well I have read Estimating Multivariate Models with brms as well as
    Latent Variable Modelling in brms
    but i just wanted to know if there has been development since.

2.As per i have used the lavaan output to merge with brm fit my sequential mediation model, but i cannot find the function to plot direct ,indirect and total effects, cannot even print them , have tried sjstats package didnt worked.

  • Operating System: Windows 10 pro
  • brms Version: 2.20.4

Thanks in advance for any help,

Welcome to the Stan Discourse.

Im not a BRMS expert, but it sounds like blavaan would be the easiest approach for your situation. You can use the same code ffrom lavaan. blavaan also uses some nice optimizations that should make the latent variable modelling more efficient. I see no reason why you couldn’t integrate all three pieces into blavaan, assuming you’re treating the PCA as a fixed calculation rather than probabilistic model.

You might share your code from the three steps (PCA, lavaan/latent variable, and mediation) which would clarify things.