simpgen1hm2 {DBfit}R Documentation

Simulation Data Generating Function

Description

Generates the simulation data for a two-phase intervention model.

Usage

simpgen1hm2(n1, n2, rho, beta = c(0, 0, 0, 0))

Arguments

n1

number of obs in phase 1

n2

number of obs in phase 2

rho

pre-defined autoregressive parameter(s)

beta

pre-defined regression coefficients

Details

This function is used for simulations when developing the package. With pre-defined sample sizes in both phases and parameters, it returns a simulated data.

Value

mat

a matrix containing the simulation data. The last column is the response variable. All other columns make up the design matrix.

See Also

hmdesign2

Examples

 n1 <- 15
 n2 <- 15
 rho <- 0.6
 beta <- c(0,0,0,0)
 dat <- simpgen1hm2(n1, n2, rho, beta)
 dat

[Package DBfit version 2.0 Index]