hmmat {DBfit} | R Documentation |

## K-Phase Design Matrix

### Description

Returns the design matrix for a general k-phase intervention model

### Usage

```
hmmat(vecss, k)
```

### Arguments

`vecss` |
a vector of length k with each element being the number of observations in each phase |

`k` |
number of phases |

### Details

It returns a matrix of 2*k columns. The design can be unbalanced, i.e. each phase has different observations.

### 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.

### See Also

### Examples

```
# a three-phase design matrix
hmmat(c(10,10,10),3)
```

[Package

*DBfit*version 2.0 Index]