I have attached code that generates time series data according a hierarchical GP regression model structure. The code then models the simulated data using a hierarchical GP regression model that is identical to the generative model. The only variable in this simulation is the choice of contrast matrix. Each unit (participant) in the simulation generates a waveform for each of two conditions. One can model these waveforms by using a 0/1 contrast matrix such that the waveform from each condition is modelled independently. Conversely, one can model the waveform of each condition as the sum of some intercept waveform and half some effect waveform (the difference between the two conditions).
My simulations appear to indicate that the choice of contrast matrix does not seem to matter. However, I am trying to understand why that is. Shouldn’t a 0/1 contrast matrix fail to account for within-subject variability, which would be accounted for my an intercept/effect representation?
To add, you all will notice that the hierarchical GP regression model accounts for heteroscedastic noise. The population noise functions and the population mean functions are both modelled as GPs within the context of the hierarchical model.
Please let me know if you would like anything at all about my question clarified. Any sort of insight would be greatly appreciated.