createCarry {CrossCarry} | R Documentation |
Add carryover dummy variables
Description
Create dummy variables associated with first-order carryover effect in a Crossover Design
Usage
createCarry(data, treatment, period, id, carrySimple = TRUE)
Arguments
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 |
|
Value
data
A data frame with all the variables of
the crossover experimental design and the carryover variables
carryover
The new carryover variables
Examples
data(Water)
carryover <- createCarry(data=Water,
treatment = "Treatment", id = "ID",
period = "Period", carrySimple = FALSE)
carryover$carryover
carryover$data