Random coef models, applied to longitudinal data, capture response heterogeneity by cross-sectional unit.
I've got a longitudinal prediction problem, in which I know that some "features" (or derived features) should be treated like "fixed effects" -- their influence is homogeneous across cross-sectional units, while others should be treated like "random effects" -- their influence should vary across CSUs.
I've tried to implement this in a couple of ways, but I'm running into trouble, largely stemming from the fact that RNNs represent time series as a
N x t x P array, and a random coef would be represented by a
P x k x N coefficient matrix multiplied by a
N*t x P longitudinal dataset.
So, my problems are both conceptual and implementation-related. I don't know how linear algebra works beyond two dimensions, nor do I know how to implement it in Keras (or anywhere else, for that matter). I'd appreciate pointers to approaches that others have taken to these sorts of problems, or suggestions for fundamental things to read.