Interpreting cosine amplitude parameter in log-link model

I have a dataset of microbial counts measured in 8 mice over 6 timepoints each. 4 of the mice were exposed to control conditions and the other 4 were exposed to sleep apnea conditions (IHC). I am interested in determining the effect of IHC on counts of a given microbe while accounting for the circadian nature of the data.

I have model that I’ve fit but I’m a bit confused about how the resultant parameters should be interpreted. IHC is encoded as a fixed effect and subject ID is encoded as a random effect.

\log \left( \eta_i \right) = \beta_{\textrm{Intercept}} + x_i\beta_{\textrm{IHC}} + z_i u_{\textrm{Subject}} + A\cos\left( \frac{2\pi \left(t_i - \psi \right )}{P} \right) + \log\left( \textrm{Depth}_i \right)
y_i \sim \textrm{NegativeBinomial2}\left( \eta_i, \phi \right)

where x_i is binary exposure status, t = time, P = period, \psi = phase shift

My understanding is that \beta_{\textrm{IHC}} can be interpreted as the log-fold change of the microbial abundance between IHC and control. However, I am less certain of how to interpret A. Would it just be the log amplitude associated with the sinusoidal signal?

Furthermore, if I wanted to extend this model to determine whether amplitude varies by exposure, would this be as simple as specifying the amplitude as \left( A_{\textrm{Intercept}} + x_i A_{\textrm{IHC}} \right) rather than just A? Where A_{\textrm{IHC}} is the log-fold change in amplitude associated with IHC status?

Please feel free to ask for clarification.


1 Like


Correct again!

Though note that periodic models like this have inherently multimodal likelihoods when attempting inference on the frequency, which is not particularly compatible with HMC-style samplers as used by Stan. If you have good prior information on the frequency you might be able to use this to isolate the peak, but if not you might need to try some of the reparameterizations in the thread I linked or a different sampler.


Thank you! Really appreciate the linked thread - will be sure to give it a good read.

1 Like