[R-sig-ME] lme4 for a 4 level hierarchy

Thierry Onkelinx th|erry@onke||nx @end|ng |rom |nbo@be
Wed Sep 4 14:48:05 CEST 2024


Dear Kim,

Since every nurse has a single binary response, you can summarise the data
at the ward level
c(number of nurse success, number of nurses failure)
In this case the ward random effect would be an observation level random
effect. I'm not sure if you want that.

Best wishes,

ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkelinx using inbo.be
Havenlaan 88 bus 73, 1000 Brussel
*Postadres:* Koning Albert II-laan 15 bus 186, 1210 Brussel
*Poststukken die naar dit adres worden gestuurd, worden ingescand en
digitaal aan de geadresseerde bezorgd. Zo kan de Vlaamse overheid haar
dossiers volledig digitaal behandelen. Poststukken met de vermelding
‘vertrouwelijk’ worden niet ingescand, maar ongeopend aan de geadresseerde
bezorgd.*
www.inbo.be

///////////////////////////////////////////////////////////////////////////////////////////
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
///////////////////////////////////////////////////////////////////////////////////////////

<https://www.inbo.be>


Op wo 4 sep 2024 om 13:55 schreef Kim Pearce via R-sig-mixed-models <
r-sig-mixed-models using r-project.org>:

>
> Hello everyone,
>
> If I may, I'd like to ask if I am visualising the correct syntax to use
> for a hypothetical situation using a mixed effects logistic regression with
> a 4 level hierarchy.
>
> Say we have nurses which are nested within wards and the wards are nested
> within hospitals and hospitals are nested within regions of the UK. Each
> nurse has a binary response recorded (Y). Nurses are at level 1, wards at
> level 2, hospitals at level 3 and regions at level 4.  Say each ward has
> one category of an ordered 3 category intervention applied where a higher
> ordered category of intervention was hypothesised to affect a nurse's
> binary response.
>
> Hypothetically, I wish to generate a model with a fixed effect for
> "Intervention" and random (and fixed) intercepts for (i) each region, (ii)
> each region x hospital combination and (iii) each region x hospital x ward
> combination.  Would the following syntax be appropriate?
>
> Note intervention appears in the model as a factor below.
>
>
> m1<-glmer(Y~interventionf+(1|region/hospital/ward),data=data,family=binomial,control=glmerControl(optimizer="bobyqa"))
>
> Many thanks for your views.
> Kind regards,
> Kim
>
> Dr Kim Pearce PhD, CStat, Fellow HEA
> Newcastle University
>
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list