0
$\begingroup$

I'm going through some trouble to understand how to translate my experimental design into a mixed model. The idea is to compare the sources of variance in a method of measurement.

The design is as follows: we took 3 samples, each sample went through 3 different treatments (not the same 3 for each sample - this is a biological problem, the treatment is a staining procedure necessary for the measure, not an experimental intervention), then each one of 3 raters took 3 measures of each sample/treatment combination to a total of 81 measures.

Sample data would look like this:

sample treatment rater rep measure 1 1 Person A 1 200 2 1 Person B 1 210 3 1 Person C 1 190 1 2 Person A 1 230 2 2 Person B 1 235 3 2 Person C 1 210 1 3 Person A 1 250 2 3 Person B 1 270 3 3 Person C 1 260 1 1 Person A 2 180 2 1 Person B 2 220 3 1 Person C 2 200 1 2 Person A 2 230 2 2 Person B 2 245 3 2 Person C 2 220 1 3 Person A 2 240 2 3 Person B 2 275 3 3 Person C 2 280 ...

The thing is then how to specify and interpret the model for lmer to be able to tell something about where the variability comes from (the treatments, the samples, inter-rater or intra-rater). More fundamentally, is a mixed model a good way to answer this question about the sources of variability? What's the difference between this an analysis of variance?

I guess I'm looking for something like these, but I'm not sure I got the way of model specification (nor how to interpret the model when it has many interactions):

measure ~ (1|sample/treatment) + rater
measure ~ (1|sample) + (1|treatment) + rater

Regarding interpretation, say I've run the second model above and get this output:

Linear mixed model fit by REML ['lmerMod']
Formula: PercNeurons ~ (1 | sample) + (1 | treatment) + rater
   Data: sample.data
REML criterion at convergence: 438.5817
Random effects:
 Groups       Name          Std.Dev.
 sample       (Intercept)   0.3377  
 treatment    (Intercept)   1.0087  
 Residual                   3.7154  
Number of obs: 81, groups:  sample, 3; treatment, 3
Fixed Effects:
     (Intercept)  raterPersonB    raterPersonC  
          25.379          1.604          2.477  

Can I interpret this output as follows:

  1. inter-rater reliability (between each pair) being 1.604 and 2.477
  2. variability due to different treatments is smaller than inter-rater, 1.0087
  3. variability in the samples is even smaller, 0.3377
  4. the residual variance is the intra-rater variability plus a random error

In that case, could I specify the model differently as to be able to separate the intra-rater variability from the random error?

Let me know if can clarify anything. Thanks.

$\endgroup$
0
$\begingroup$

This may just be the way you've presented your simulated data set, but it seems that always Person A = sample 1, Person B = sample 2, Person = sample 3 and so in their current presentation they shouldn't be in the same model.

Maybe you want to asses the within-rater repeatability, and you should check out Nakagawa & Schielzeth (2010) Repeatability for Gaussian and non-Gaussian data: a practical guide for biologists 10.1111/j.1469-185X.2010.00141.x and associated package "rptR" https://cran.r-project.org/web/packages/rptR/vignettes/rptR.html

You might also want to check out the ranef() function, using your example which will show you the variance in your model attributable to each of the levels of a random factor

mod1<- lmer(PercNeurons ~ (1 | sample) + (1 | treatment) + rater, data=sample.data)

ranef(mod1)

Hope that gives you a starting point.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.