library(knitr)
opts_chunk$set(echo = FALSE, comment = NA)
# Pass arguments

dfr <- params$dfr
vars <- params$vars
mpf <- params$mpf
spf <- params$spf
sspf <- params$sspf
rep <- params$rep

# Check factors structure

out <- ck.fs(dfr, c(mpf, spf, sspf), rep)
dfr <- out$dfr
nmpf <- out$nl[[1]]
nspf <- out$nl[[2]]
nsspf <- out$nl[[3]]
nrep <- out$nrep
nmis.fac <- out$nmis.fac

1. Model specification and data description

There are data for a split-split-plot design with r nmpf levels for the main plot factor, r nspf levels for the sub-plot factor, r nsspf levels for the sub-sub-plot factor, and r nrep replications for the main plot factor. The statistical model is $$ y_{ijk} = \mu + \alpha_i + \beta_j + \gamma_k + \delta_l + (\alpha\beta){ij} + (\alpha\gamma){ik} + (\alpha\delta){il} + (\beta\gamma){jk} + (\beta\delta){jl} + (\gamma\delta){kl} \ + (\alpha\beta\gamma){ijk} + (\alpha\beta\delta){ijl} + (\alpha\gamma\delta){ikl} + (\beta\gamma\delta){jkl} + (\alpha\beta\gamma\delta)_{ijkl} $$ where

In this model $(\alpha\delta){il}$ is the error term for the main plot factor, $(\beta\delta){jl}$ and $(\alpha\beta\delta){ijl}$ are pooled to form the error term for the split-plot factor, and $(\gamma\delta){kl}$, $(\alpha\gamma\delta){ikl}$, $(\beta\gamma\delta){jkl}$, and $(\alpha\beta\gamma\delta)_{ijkl}$ are pooled to form the error term for the sub-sub-plot factor.

r if (nmis.fac == 1) paste("Note: There is", nmis.fac, "data row with missing values for classifications factors. This row has been deleted.") r if (nmis.fac > 1) paste("Note: There are", nmis.fac, "data rows with missing values for classifications factors. These rows have been deleted.")

out <- NULL
for (i in 1:length(vars))
  out <- c(out, knit_expand('child_spld.Rmd'))

r paste(knit(text = out), collapse = '\n')



reyzaguirre/pepa documentation built on March 29, 2025, 9:56 p.m.