DGP: DGP: data generation

Description Usage Arguments Value Examples

Description

Generating the multiple-instance data set.

Usage

1
DGP(n, m, beta)

Arguments

n

an integer. The number of bags.

m

an integer or vector of length n. If m is an integer, each bag has the identical number of instances, m. If m is a vector, the ith bag has m[i] instances.

beta

a vector. The true regression coefficients.

Value

a list including (1) bag-level labels, Z, (2) the design matrix, X, and (3) bag ID of each instance, ID.

Examples

1
2
data1 <- DGP(50, 3, runif(10, -5, 5))
data2 <- DGP(50, sample(3:5, 50, TRUE), runif(10, -5, 5))


Search within the milr package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.