Description Usage Arguments Value Author(s) See Also Examples

The `hplm`

function computes a hierarchical piecewise regression model.

1 2 |

`data` |
A single-case data frame. See |

`model` |
Model used for calculating the slope parameter (see Huitema & McKean, 2000). Default is |

`method` |
Method used to fit your model. Pass |

`control` |
A list of settings for the estimation algorithm, replacing the default values passed to the function |

`random.slopes` |
If |

`ICC` |
If |

`formula` |
Defaults to the standard piecewise regression model. The parameter 'inter' adresses the intercation term defined based on the method provide in the model argument (e.g., "B&L-B"). The formula can be changed for example to include further L1 or L2 variables into the regression model. |

`data.l2` |
A dataframe providing additional variables at Level 2. The scdf File has to have names for all cases and the Level 2 dataframe has to have a column named 'cases' with the names of the cases the Level 2 variables belong to. |

`phases` |
A vector of two characters or numbers indicating the two phases that should be compared. E.g., |

`model` |
Character string from function call (see |

`method` |
Character string from function call (see |

`N` |
Number of single-cases. |

`analyze.random.slopes` |
Logical argument from function call (see |

`analyze.ICC` |
Logical argument from function call (see |

`random.trend.level` |
Linear mixed-effects model with random trend and level effect. |

`random.trend.slope` |
Linear mixed-effects model with random trend and slope effect. |

`random.level.slope` |
Linear mixed-effects model with random level and slope effect. |

`random.trend.level.slope` |
Linear mixed-effects model with random trend, level, and slope effect. |

`random.nointercept.trend.level.slope` |
Linear mixed-effects model with random trend, level, and slope effect without intercept. |

`random.trend` |
Significance test for random trend effect. |

`random.level` |
Significance test for random level effect. |

`random.slope` |
Significance test for random slope effect. |

`ICC` |
Intraclass correlation. |

`L.ICC` |
L ratio from intraclass correlation. |

`p.ICC` |
P-Value for intraclass correlation. |

Juergen Wilbert

1 2 3 4 5 6 7 | ```
## Compute hplm model on a MBD over three cases (restricted log-likelihood)
dat <- rSC(3, MT = 30, B.start = 11, d.level = 1.0, d.slope = 0.05, d.trend = 0.05)
hplm(dat, method = "REML")
## Use hplm with default settings
dat <- rSC(15, MT = 30, B.start = 11, d.level = 1.0, d.slope = runif(15,0,0.2), d.trend = 0.05)
hplm(dat)
``` |

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.