gen_Xn {bayesassurance}R Documentation

Design Matrix Generator

Description

Constructs design matrix using given sample size(s). Used for assurance analysis in the Bayesian setting.

Usage

gen_Xn(n)

Arguments

n

vector of sample sizes. Length of n corresponds to the number of groups being assessed in the study design as well as the column dimension of the design matrix.

Value

Xn: a design matrix that can be used to assess the Bayesian assurance through Monte Carlo sampling using functions presented in this package.

See Also

gen_Xn_longitudinal

Examples

## In the following example, notice that passing in a vector
## of length 4 returns a design matrix of column dimension 4, where
## each column is comprised of ones vectors with lengths that correspond
## to the inputted sample sizes.

n <- c(1,3,5,8)
gen_Xn(n = n)

[Package bayesassurance version 0.1.0 Index]