createCarry {CrossCarry} | R Documentation |
Create dummy variables associated with first-order carryover effect in a Crossover Design
createCarry(data, treatment, period, id, carrySimple = TRUE)
data |
A data frame with the variables of the crossover experimental design |
treatment |
A character string specifying the name of vector with the treatment applied at each observation of the crossover experimental design |
period |
A character string specifying the name of vector with the observation period of the responses of the crossover experimental design |
id |
A character string specifying the name of vector which identifies the experimental units. |
carrySimple |
|
data
A data frame with all the variables of
the crossover experimental design and the carryover variables
carryover
The new carryover variables
data(Water)
carryover <- createCarry(data=Water,
treatment = "Treatment", id = "ID",
period = "Period", carrySimple = FALSE)
carryover$carryover
carryover$data