Pre-post design
Posted: Mon Jan 06, 2020 12:59 pm
Hi everyone,
I'm currently implementing a model for a binary variable of mental health condition (i.e. whether or not someone has the condition)
I have two options in R,one MLM and one standard binomial regresssion, but I'm wanting to check if a) this makes sense the way I'm doing it, 2) if MLwiN would provide improvements in performance as it's currently very slow:
The model is specified like this
MeanLM<- glm(HealthCondition~ XMean+Age+Sex+Diet+Deprivation, data = data, family = binomial)
DayMLMMean <- glmer(HealthCondition~ XMean+Age+Sex+Diet+Deprivation+(0+Age|ID)+(1|ID), data = data,
family = binomial(link=logit))
XMean and Age continuous variables, and the rest are categorical.
The data are specified in long form, with two measures of HealthCondition corresponding to the two difference participant ages at mearsurement before and after exposure (XMean). As it stands I get very similar results for both the simple binomial regression and the multi-level model - which I think makes sense as the data are restricted to two measurements.
I've read the Bristol MLM course on pre-post design (specifically the repeat mesures part). Any tips would be very well received!
Cheers
Ken
I'm currently implementing a model for a binary variable of mental health condition (i.e. whether or not someone has the condition)
I have two options in R,one MLM and one standard binomial regresssion, but I'm wanting to check if a) this makes sense the way I'm doing it, 2) if MLwiN would provide improvements in performance as it's currently very slow:
The model is specified like this
MeanLM<- glm(HealthCondition~ XMean+Age+Sex+Diet+Deprivation, data = data, family = binomial)
DayMLMMean <- glmer(HealthCondition~ XMean+Age+Sex+Diet+Deprivation+(0+Age|ID)+(1|ID), data = data,
family = binomial(link=logit))
XMean and Age continuous variables, and the rest are categorical.
The data are specified in long form, with two measures of HealthCondition corresponding to the two difference participant ages at mearsurement before and after exposure (XMean). As it stands I get very similar results for both the simple binomial regression and the multi-level model - which I think makes sense as the data are restricted to two measurements.
I've read the Bristol MLM course on pre-post design (specifically the repeat mesures part). Any tips would be very well received!
Cheers
Ken