Nesting Observations in Days? #44
Replies: 3 comments 3 replies
-
|
Well, whether you need to nest depends on things like research question and the relevance of within day structure to your data, whether it's a regression model or a ct model. More than 2 levels of random effects gets tricky, but this kind of dependence can also be addressed through use of models with periodicity and or time dependent predictor effects. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks. Yes, it worked. Much appreciated your help. |
Beta Was this translation helpful? Give feedback.
-
|
You could make every parameter of the system dependent on time of day in the way you ask, and it might offer interesting insight or some kind of reasonable approximation, but these things get tricky when you are thinking about continuous processes through time -- if at 10:30am somebodies temporal effect parameter goes higher, what should be the assumption? Should we assume that the parameter only changed at that moment, and up until then it had the value assigned to the previous time of day covariate, say at 9pm? Do you expect some kind of linear or other interpolation between your time of day observations? The point is that parameters in a continuous time model are relevant at every time of the day, but with your desired covariate approach you are only saying how the parameters are at the few specific times of day you happen to observe. A more sophisticated approach would be to model some kind of extra time of day process, possibly as an oscillator, and then make your parameters dependent on the latent state. This would quickly get complicated but you can see an example of how to begin in the nonlinear section of the manual via The approach you were asking about is possible by including your times of day as distinct time dependent predictors, so e.g. a 'morning' column coded as 1 if it's morning and 0 otherwise, then making the parameters dependent on morning via something like: where the 1 and 2 refer to 1st and 2nd time dependent predictors This all seems pretty complicated I assume, and that's kind of true, but if you want a serious interpretation of time of day moderation of dynamics I don't think there are simpler options. If you just want to account for time of day effects in the average levels of the process (and not the parameters), including some kind of oscillating process would be one option. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Charles,
thanks for all the support you've given me so far!
I would like to use ctsem for ESM data analysis. The dataset contains 4 observations per day over 4 weeks and I am wondering if I need to nest the observations in days as one would do with traditional multilevel models?
Best
Carlotta
Beta Was this translation helpful? Give feedback.
All reactions