Dear all, I?m new to mixed models, and I?m analysing a patients? data set whose response variable is adherence/no adherence to medication (binary variable, 0/1). For each patient there are different types of independent variables: sociodemographic; clinical; blood pressure control; etc. Additionally, patients are grouped (nested) within doctors. Due to the sampling design, I only have one replicate for each patient. I want to study the impact of the independent variables on the adherence/no adherence to medication. I?m not interested in studying the patients by themselves. My question is: should I consider the simplest model response ~ Indep. Variables + (1|Doctor), or should I explicitly introduce the nested structure of patient within doctor, response ~ Indep. Variables + (Patient|Doctor) ? Thanks in advanced! Best regards, Helena.
Random intercepts and/or slopes
4 messages · Maria Helena Mourino Silva Nunes, Gabriel Baud-Bovy, Viechtbauer Wolfgang (STAT)
On 10/10/2013 12:39 PM, Maria Helena Mourino Silva Nunes wrote:
Dear all, I?m new to mixed models, and I?m analysing a patients? data set whose response variable is adherence/no adherence to medication (binary variable, 0/1). For each patient there are different types of independent variables: sociodemographic; clinical; blood pressure control; etc. Additionally, patients are grouped (nested) within doctors. Due to the sampling design, I only have one replicate for each patient. I want to study the impact of the independent variables on the adherence/no adherence to medication. I?m not interested in studying the patients by themselves. My question is: should I consider the simplest model response ~ Indep. Variables + (1|Doctor), or should I explicitly introduce the nested structure of patient within doctor, response ~ Indep. Variables + (Patient|Doctor) ?
Hi Helena, Here a some syntax for your random effects assuming that all IV are between-subject factors response ~ Indep. Variables + (1|Patient) response ~ Indep. Variables + (1|Doctor) + (1|Patient) The last one allow to define random effects for differences across doctors as well as patients (with lmer, patients need to be uniquely identified) If you have repeated-measure (within-subject factors), then things become more complex as the effect of some factor might also be different across patients. With lme, one advise in this case is to include a maximal random structures (Barr et al., 2012, 2013) (all within subject factor |Patient) it one is interested only in fixed effects. However, other expert recommend introducing random effects only for factors with a sufficient large number of levels because variance estimates might not be reliable. In any case, the situation with binomial model might be different. As you will see, there is not (yet) a generally agreed methodology with mixed-effect models, the way you have it with old-fashioned ANOVA. It takes a deep understanding of the methods and your data to decide exactly what to do. There are now quite a bit of books and papers on GLMM that might help to learn more on this topic. Best, Gabriel
Thanks in advanced! Best regards, Helena.
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
--------------------------------------------------------------------- Gabriel Baud-Bovy tel.: (+39) 02 2643 4839 (office) UHSR University (+39) 02 2643 3429 (laboratory) via Olgettina, 58 (+39) 02 2643 4891 (secretary) 20132 Milan, Italy fax: (+39) 02 2643 4892
Since there is only a single replicate per patient, it is not possible to estimate the patient-level variance in these models: response ~ Indep. Variables + (1|Patient) response ~ Indep. Variables + (1|Doctor) + (1|Patient) So, the only model that is really applicable here is: response ~ Indep. Variables + (1|Doctor) This model accounts for the nesting of patients within doctors. Best, Wolfgang -- Wolfgang Viechtbauer, Ph.D., Statistician Department of Psychiatry and Psychology School for Mental Health and Neuroscience Faculty of Health, Medicine, and Life Sciences Maastricht University, P.O. Box 616 (VIJV1) 6200 MD Maastricht, The Netherlands +31 (43) 388-4170 | http://www.wvbauer.com
-----Original Message----- From: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models- bounces at r-project.org] On Behalf Of Gabriel Baud-Bovy Sent: Thursday, October 10, 2013 13:48 To: r-sig-mixed-models at r-project.org Subject: Re: [R-sig-ME] Random intercepts and/or slopes On 10/10/2013 12:39 PM, Maria Helena Mourino Silva Nunes wrote:
Dear all, I'm new to mixed models, and I'm analysing a patients' data set whose
response variable is adherence/no adherence to medication (binary variable, 0/1). For each patient there are different types of independent variables: sociodemographic; clinical; blood pressure control; etc. Additionally, patients are grouped (nested) within doctors. Due to the sampling design, I only have one replicate for each patient.
I want to study the impact of the independent variables on the
adherence/no adherence to medication. I'm not interested in studying the patients by themselves.
My question is: should I consider the simplest model response ~
Indep. Variables + (1|Doctor),
or should I explicitly introduce the nested structure of patient within
doctor, response ~ Indep. Variables + (Patient|Doctor) ? Hi Helena, Here a some syntax for your random effects assuming that all IV are between-subject factors response ~ Indep. Variables + (1|Patient) response ~ Indep. Variables + (1|Doctor) + (1|Patient) The last one allow to define random effects for differences across doctors as well as patients (with lmer, patients need to be uniquely identified) If you have repeated-measure (within-subject factors), then things become more complex as the effect of some factor might also be different across patients. With lme, one advise in this case is to include a maximal random structures (Barr et al., 2012, 2013) (all within subject factor |Patient) it one is interested only in fixed effects. However, other expert recommend introducing random effects only for factors with a sufficient large number of levels because variance estimates might not be reliable. In any case, the situation with binomial model might be different. As you will see, there is not (yet) a generally agreed methodology with mixed-effect models, the way you have it with old-fashioned ANOVA. It takes a deep understanding of the methods and your data to decide exactly what to do. There are now quite a bit of books and papers on GLMM that might help to learn more on this topic. Best, Gabriel
Dear list members Dear Wolfgang, Gabriel and Hans, thanks a lot for your suggestions! It has been very useful. I will use the model response ~ Indep. Variables + (1|Doctor) because I only have one set of observations for each patient (response variable + independent variables). Best regards, Helena.
De: r-sig-mixed-models-bounces at r-project.org [r-sig-mixed-models-bounces at r-project.org] Em Nome De Viechtbauer Wolfgang (STAT) [wolfgang.viechtbauer at maastrichtuniversity.nl]
Enviado: quinta-feira, 10 de Outubro de 2013 13:21 Para: r-sig-mixed-models at r-project.org Assunto: Re: [R-sig-ME] Random intercepts and/or slopes Since there is only a single replicate per patient, it is not possible to estimate the patient-level variance in these models: response ~ Indep. Variables + (1|Patient) response ~ Indep. Variables + (1|Doctor) + (1|Patient) So, the only model that is really applicable here is: response ~ Indep. Variables + (1|Doctor) This model accounts for the nesting of patients within doctors. Best, Wolfgang -- Wolfgang Viechtbauer, Ph.D., Statistician Department of Psychiatry and Psychology School for Mental Health and Neuroscience Faculty of Health, Medicine, and Life Sciences Maastricht University, P.O. Box 616 (VIJV1) 6200 MD Maastricht, The Netherlands +31 (43) 388-4170 | http://www.wvbauer.com > -----Original Message----- > From: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models- > bounces at r-project.org] On Behalf Of Gabriel Baud-Bovy > Sent: Thursday, October 10, 2013 13:48 > To: r-sig-mixed-models at r-project.org > Subject: Re: [R-sig-ME] Random intercepts and/or slopes > > On 10/10/2013 12:39 PM, Maria Helena Mourino Silva Nunes wrote: > > Dear all, > > > > I'm new to mixed models, and I'm analysing a patients' data set whose > response variable is adherence/no adherence to medication (binary > variable, 0/1). For each patient there are different types of independent > variables: sociodemographic; clinical; blood pressure control; etc. > Additionally, patients are grouped (nested) within doctors. Due to the > sampling design, I only have one replicate for each patient. > > > > I want to study the impact of the independent variables on the > adherence/no adherence to medication. I'm not interested in studying the > patients by themselves. > > My question is: should I consider the simplest model response ~ > Indep. Variables + (1|Doctor), > > or should I explicitly introduce the nested structure of patient within > doctor, response ~ Indep. Variables + (Patient|Doctor) ? > > Hi Helena, > > Here a some syntax for your random effects assuming that all IV are > between-subject factors > > response ~ Indep. Variables + (1|Patient) > > response ~ Indep. Variables + (1|Doctor) + (1|Patient) > > The last one allow to define random effects for differences > across doctors as well as patients (with lmer, patients need to be > uniquely > identified) > > If you have repeated-measure (within-subject factors), then > things become more complex as the effect of some factor might > also be different across patients. With lme, one advise in this > case is to include a maximal random structures (Barr et al., 2012, 2013) > > (all within subject factor |Patient) > > it one is interested only in fixed effects. However, other expert > recommend introducing random effects only for factors with a sufficient > large number of levels because variance estimates might not be > reliable. In any case, the situation with binomial model might be > different. > > As you will see, there is not (yet) a generally agreed methodology > with mixed-effect models, the way you have it with old-fashioned ANOVA. > It takes a deep understanding of the methods and your data to > decide exactly what to do. There are now quite a bit of books and > papers on GLMM that might help to learn more on this topic. > > Best, > > Gabriel _______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models