library(knitr) opts_chunk$set(echo = FALSE, comment = NA)
# Pass arguments dfr <- params$dfr vars <- params$vars factors <- params$factors rep <- params$rep maxp <- params$maxp pe <- params$pe se <- params$se # Check factors structure out <- ck.fs(dfr, factors, rep) dfr <- out$dfr nla <- out$nl[1] nlb <- out$nl[2] nrep <- out$nrep nmis.fac <- out$nmis.fac # Everything as character dfr[, factors[1]] <- as.character(dfr[, factors[1]]) dfr[, factors[2]] <- as.character(dfr[, factors[2]])
The data frame has two factors with r nla
and r nlb
levels. The experimental design is a completely randomized design with r nrep
replications. The statistical model is
$$
y_{ijk} = \mu + \alpha_i + \beta_j + (\alpha\beta){ij} + \epsilon{ijk}
$$
where
In this model we assume that the errors are independent and have a normal distribution with common variance, that is, $\epsilon_{ijk} \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(vars)) { lc <- ck.f(dfr, vars[i], factors, rep) if (lc$nt.0 == 0 & lc$nrep > 1 & lc$nt.mult == 0 & lc$pmis <= maxp) { out <- c(out, knit_expand('child_f.Rmd')) } else { out <- c(out, knit_expand('child_f_fail.Rmd')) } }
r paste(knit(text = out), collapse = '\n')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.