Description Usage Arguments Value Examples

View source: R/simulation-functions.R

Create a design matrix containing a linear trend, a treatment effect, and a
trend-by-treatment interaction for a single-case design with `m`

cases and `n`

measurement occasions.

1 | ```
design_matrix(m, n, treat_times = n/2 + 1, center = 0)
``` |

`m` |
number of cases |

`n` |
number of time points |

`treat_times` |
(Optional) vector of length |

`center` |
centering point for time trend. |

A design matrix

1 | ```
design_matrix(3, 16, c(5,9,13))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.