simpgen1hm2: Simulation Data Generating Function

Description Usage Arguments Details Value See Also Examples

Description

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

Usage

1
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

1
2
3
4
5
6
 n1 <- 15
 n2 <- 15
 rho <- 0.6
 beta <- c(0,0,0,0)
 dat <- simpgen1hm2(n1, n2, rho, beta)
 dat

DBfit documentation built on May 1, 2021, 1:09 a.m.