0

I'm tring to to an RCBD, as given by this source, but the issue is my matrix is a 64x9. Where every 8 rows correspond to a single block.

In the given example, each row is a block so it is very simple to make it work, how might I do this but group it so every 8 rows counts as a block?

I tried simply making the "n" value 8, but this does not work.

r = c(t(as.matrix(hosp)))
r

f = c('3D', 'Plaster', 'Fiberglass', "ExternalFix",
      'SimpSplint', "Semi-Rigid", 'Spongy', "Airboot", 
      "3DSplint")

#K = treatment levels
#n = blocks
k = 9
n = 8

#Treatment factors
tm = gl(k, 1, n*k, factor(f))
tm
#Blocks
blk = gl(n, k, k*n)
blk

av = aov(r ~ tm + blk)
summary(av)
john dave
  • 31
  • 1
  • Provide a reproducible example refer https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example. Use `dput()` to provide your data. – Nad Pat Oct 07 '21 at 07:33

0 Answers0