View source: R/plm_contrasts.R
add_dummy_variables | R Documentation |
Adds dummy variables to an scdf for calculating piecewise linear models.
add_dummy_variables(
scdf,
model = c("W", "H-M", "B&L-B"),
contrast_level = c("first", "preceding"),
contrast_slope = c("first", "preceding")
)
scdf |
A single-case data frame. See |
model |
Model used for calculating the dummy parameters (see Huitema &
McKean, 2000). Default is |
contrast_level |
Either "first", "preceding" or a contrast matrix. If NA contrast_level is a copy of contrast. |
contrast_slope |
Either "first", "preceding" or a contrast matrix. If NA contrast_level is a copy of contrast. |
add_dummy_variables(
scdf = exampleABC,
model = "W",
contrast_level = "first",
contrast_slope = "first"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.