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

TRUE = simple carry-over, where the residual effect of a treatment affects equally each of the treatments that are preceded by it, and FALSE = carry-over complex, where the residual effect of the treatment affects each of the other treatments differently.

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

[Package CrossCarry version 0.1.0 Index]