ComenzarEmpieza gratis

BIBD - cat's kidney function

To be sure we truly understand what a BIBD looks like, let's build a dataset containing a BIBD from scratch.

Say we want to test the difference between four different wet foods in cats' diets on their kidney function. Cat food, however, is expensive, so we'll only test 3 foods per block to save some money. The blocking factor is the color of cat, as we aren't interested in that as part of our experiment. The outcome will be measured blood creatinine level, an indicator of kidney function and dysfunction in cats and humans alike.

Este ejercicio forma parte del curso

Experimental Design in R

Ver curso

Instrucciones del ejercicio

  • The custom function lambda() has been loaded for you. Calculate lambda with t = 4, k = 3, and r = 3 to make sure a BIBD is possible.
  • Run the code to assemble the dataset. You can see the order in which the food treatments are used in each block.
  • Create cat_model with aov() according to the description of the experiment above and examine the results with summary(). Does type of wet food make a difference on creatinine levels?

Ejercicio interactivo práctico

Prueba este ejercicio y completa el código de muestra.

# Calculate lambda
___

# Build the data.frame
creatinine <- c(1.98, 1.97, 2.35, 2.09, 1.87, 1.95, 2.08, 2.01, 1.84, 2.06, 1.97, 2.22)
food <- as.factor(c("A", "C", "D", "A", "B", "C", "B", "C", "D", "A", "B", "D"))
color <- as.factor(rep(c("Black", "White", "Orange", "Spotted"), each = 3))
cat_experiment <- as.data.frame(cbind(creatinine, food, color))

# Create cat_model and examine with summary()
___ <- ___ (___ ~ ___ + color, data = ___)
___
Editar y ejecutar código