hmdesign2 {DBfit}R Documentation

the Two-Phase Design Matrix

Description

Returns the design matrix for a two-phase intervention model.

Usage

hmdesign2(n1, n2)

Arguments

n1

number of obs in phase 1

n2

number of obs in phase 2

Details

It returns a matrix of 4 columns. As discussed in Huitema, Mckean, & Mcknight (1999), in two-phase design: beta0 = intercept, beta1 = slope for Phase 1, beta2 = level change from Phase 1 to Phase 2, and beta3 slope change from Phase 1 to Phase 2.

References

Huitema, B. E., Mckean, J. W., & Mcknight, S. (1999). Autocorrelation effects on least- squares intervention analysis of short time series. Educational and Psychological Measurement, 59 (5), 767-786.

Examples

n1 <- 15
n2 <- 15
hmdesign2(n1, n2)

[Package DBfit version 2.0 Index]