Skip to content
Prev 16759 / 20628 Next

Question on hierarchical nature and data format using lmer

Thanks Thierry,

I thought so. So this leads on to the next question of how to then specify the random effects structure. Given predictors of study programme (4 levels: physio, med, nurse, speed), clinicA (yes/no), clinicB(yes/no), clinicC(yes/no), clinicD(yes/no), clinicE(yes/no), and s clinic A,B,C are nested in study programme [ie. Some clinics are only offered in some programme), and D,E are crossed across programme (common to all programmes)

Is the following logical? I am using the ordinal package, but the formula follows that of lmer.

clmm (as.factor (Sharing) ~ Programme + clinicA + clinicB + clinicC+ clinicD+ clinicE + 
                  (1| Programme) + (1| Programme:clinicA) + (1| Programme:clinicB) + (1| Programme:clinicC) + 
	    (1| clinicD)  + (1| clinicE) + (1| Programme:clinicD) + (1| Programme:clinicE) , 
                  data = dat,
                  link = "logit",
                  threshold = "equidistant") 

Many thanks,
Bernard

-----Original Message-----
From: thierry.onkelinx at inbo.be <thierry.onkelinx at inbo.be> 
Sent: 26 June 2018 09:38
To: Bernard Liew (School of Sport Exercise and Rehabilitation Sciences) <B.Liew at bham.ac.uk>
Cc: r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] Question on hierarchical nature and data format using lmer

Dear Bernard,

The typical format is one row of data per observation. If you have one measurement per student, then you need to have a column per clinical placement (with a TRUE or FALSE value).

Best regards,

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 at inbo.be Havenlaan 88 bus 73, 1000 Brussel 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 ///////////////////////////////////////////////////////////////////////////////////////////




2018-06-25 17:09 GMT+02:00 Bernard Liew <B.Liew at bham.ac.uk>: