library(knitr)

# Pass arguments

traits <- params$traits
trt <- params$trt
trt.lab <- params$trt.lab
nct <- nchar(trt.lab)
trt.lab.s <- paste0(trt.lab, "s")
trt.lab.c <- paste0(toupper(substr(trt.lab, 1, 1)), substr(trt.lab, 2, nct))
trt.lab.sc <- paste0(toupper(substr(trt.lab, 1, 1)), substr(trt.lab, 2, nct), "s")
dfr <- params$dfr
maxp <- params$maxp

# Check factors structure

out <- ck.fs(trt, NULL, dfr)
nt <- out$nl[[1]]
dfr <- out$dfr
nmis.fac <- out$nmis.fac

1. Model specification and data description

There are data from r nt r trt.lab.s evaluated using a completely randomized design. The statistical model is $$ y_{ij} = \mu + \tau_i + \epsilon_{ij} $$ where

In this model we assume that the errors are independent and have a normal distribution with common variance, that is, $\epsilon_{ij} \sim N(0,\sigma_{\epsilon}^2)$.

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

out <- NULL
for (i in 1:length(traits)) {
  lc <- ck.crd(traits[i], trt, dfr)
  if (lc$ng.0 == 0 & lc$nrep > 1 & lc$ng > 2) {
    out <- c(out, knit_expand('child_crd.Rmd'))
  } else {
    out <- c(out, knit_expand('child_crd_fail.Rmd'))
  }
}

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



AGROFIMS/hagrofims documentation built on May 6, 2020, 7:43 p.m.