Marginalization and subsequent conditional sampling of latents in simple Structural Equation Models

14 views
Skip to first unread message

Mike Lawrence

unread,
Apr 20, 2022, 10:12:39 AMApr 20
to TensorFlow Probability
I'm not super well-versed in the underlying math of Structural Equation Models, more an end-user still, but the blavaan package for R employs a trick whereby for sampling purposes latent quantities are marginalized out (See Eqn 6 here) , with optional subsequent conditional sampling of the latent quantities from the posterior samples. Has anyone done/seen anything equivalent for SEMs in TFP?

Christopher Suter

unread,
Apr 20, 2022, 10:55:54 AMApr 20
to Mike Lawrence, TensorFlow Probability
We have a few util functions for dealing with normal distribution maths but nothing about SEMs in particular. What are the latents of interest here (that aren't marginalized), the residual covariances? 

On Wed, Apr 20, 2022 at 10:12 Mike Lawrence <mike....@gmail.com> wrote:
I'm not super well-versed in the underlying math of Structural Equation Models, more an end-user still, but the blavaan package for R employs a trick whereby for sampling purposes latent quantities are marginalized out (See Eqn 6 here) , with optional subsequent conditional sampling of the latent quantities from the posterior samples. Has anyone done/seen anything equivalent for SEMs in TFP?

--
You received this message because you are subscribed to the Google Groups "TensorFlow Probability" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tfprobabilit...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tfprobability/f21e1003-cd2a-4b0f-8667-2588d7db2219n%40tensorflow.org.

Mike Lawrence

unread,
Apr 20, 2022, 5:19:26 PMApr 20
to Christopher Suter, TensorFlow Probability
A couple hours after posting here I found some decently readable Stan code [here](
https://gist.github.com/rmcelreath/68fb40bf7a3e73bf2623e10a5973216d) showing how to do the marginalization trick I’m referring to. It’s the latent quantity U I’m referring to. 
--

--
Mike Lawrence, PhD
Co-founder & Research Scientist
Axem Neurotechnology
axemneuro.com

~ Certainty is (usually) folly ~
Reply all
Reply to author
Forward
0 new messages