apdesign_i {apdesign} | R Documentation |
apdesign_i: AP coding for a single subject
Description
apdesign_i: AP coding for a single subject
Usage
apdesign_i(data, cycle_var, center_cycle, time_var, center_time,
max_degree = c(1, 1), matricies = FALSE)
Arguments
data |
A data frame. |
cycle_var |
A character that indicates the cycle indicator in
|
center_cycle |
A numeric specifying the cycle to center on. |
time_var |
A character that indicates the within-cycle time indicator in
|
center_time |
A numeric specifying the within-cycle time to center on. |
max_degree |
A vector of numerics specifying the highest degree for each polynomial. |
matricies |
If |
Value
Output will be a matrix.
Examples
y <- c(10, 15, 21, 20, 23, 25, 27, 25, 28, 29)
time <- c(c(0.2, 0.5, 0.7), c(0.3, 0.6, 0.75, 0.89), c(0.1, 0.3, 0.8))
cycle <- c(rep(1, 3), rep(2, 4), rep(3, 3))
df <- data.frame(y, time, cycle)
apdesign_i(data = df, time_var = "time", cycle_var = "cycle",
center_cycle = 1, center_time = 0, max_degree = c(2,1))
[Package apdesign version 1.0.0 Index]