Replies: 1 comment 1 reply
-
|
This gets a bit complicated I think honestly! To do it really properly you need to consider that the regulation of NA may anyway differ based on the level of NA itself, and then ask whether allowing this to be additionally moderated by binge is improving the model. I gave it a few iterations with some ai help, see if this makes sense to you: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
First off, thanks for ctsem and the supporting papers/tutorials, which really helped me get into continuous-time thinking!
I'm currently working on a research question about the effects of binge-eating episodes on momentary negative affect, and a continuous-time model seems like the perfect fit. The ambulatory assessment data contain around 130 participants, 20–25 prompts per participant across 5 days, with a mean interval of ~3h. My outcome is negative affect (NA). The binge episodes (and their timing) were recorded on a continuous scale, but they were heavily zero-inflated, so I recoded them into a binary 0/1 indicator using prespecified clinical thresholds.
What I want to know is whether a binge changes the post-binge NA trajectory beyond the ordinary auto-effect, in other words, whether regulation is faster than usual in the window after a binge (previous discrete models implicate this but ignored regression-to-the-mean effects). I'm currently trying to figure out how best to model that.
My first instinct was a TDpred impulse for the binges: it's the sparsest option, captures their immediate impact, and fits the data really well. But since binges are associated with elevated NA, they aren't really external shocks, so I suspect the impulse effect would mostly just absorb the contemporaneous binge–NA association (or am I missing something?).
So I'm weighing a few options and would really appreciate some advice, because I'm not sure which is best:
I appreciate any tips and there's probably an even better approach I haven't thought of.
Thanks so much!
Steffen
Code:
#Impulse Model:
ct_model <- ctModel(type = 'ct',
manifestNames = "negAffect",
latentNames = "negAffect",
time = 'continuous_time',
id = 'id',
LAMBDA = matrix(1, nrow = 1, ncol = 1),
MANIFESTMEANS = 'B||TRUE',
MANIFESTVAR = 'residualSD',
T0MEANS = 'initialAffect||TRUE',
CINT = 0,
DRIFT = 'tendency_NA||TRUE',
DIFFUSION = 'systemNoise',
TDpredNames = 'Binge_Imp',
TDPREDEFFECT = 'bingeImpulse' )
#Disspiative:
ct_model <- ctModel(type = 'ct',
manifestNames = "negAffect",
latentNames = c("negAffect", "Binge),
time = 'continuous_time',
id = 'id',
LAMBDA = matrix(c(1,0), nrow = 1, ncol = 2),
MANIFESTMEANS = matrix(c('B||TRUE'),nrow=1, ncol=1),
MANIFESTVAR = matrix(c('residualSD'), nrow=1, ncol=1),
T0MEANS = matrix(c('initialAffect||TRUE',0), nrow=2, ncol=1),
T0VAR = matrix(c('T0sd_NA', 0,0,0), nrow = 2, ncol = 2),
CINT = 0,
DRIFT = matrix(c('tendency_NA||TRUE', 0,'bingeEffect', 'binge_Regulation'), nrow=2, ncol=2), DIFFUSION = matrix(c('systemNoise',0,0,0),nrow=2, ncol=2),
TDpredNames = 'Binge_Imp',
TDPREDEFFECT = matrix(c(0, 1), nrow=2, ncol=1))
#Moderator:
ct_model <- ctModel(type = 'ct',
manifestNames = "negAffect",
latentNames = "negAffect",
time = 'continuous_time',
id = 'id',
LAMBDA = matrix(1, nrow = 1, ncol = 1),
MANIFESTMEANS = 'B||TRUE',
MANIFESTVAR = 'residualSD',
T0MEANS = 'initialAffect||TRUE',
CINT = 0,
DRIFT = 'tendency_NA+tendency_post*postBinge’,
DIFFUSION = 'systemNoise',
TDpredNames = c('Binge_Imp','postBinge'),
TDPREDEFFECT = c('Binge_Impulse', 0),
PARS=c('tendency_NA','tendency_post') #extra params )
#Transform for Pars (?)
ct_model$pars$transform[ct_model$pars$param == "tendency_NA"] <- "-log(exp(-1.5 * param) + 1)"
Beta Was this translation helpful? Give feedback.
All reactions