genData.P {GRCRegression}R Documentation

Artificial Data Generation

Description

Generate artificial data for testing and verification.

Usage

genData.P(beta, data.size, scheme,
  scope.lambda = c(0.01, 100), link.lambda = link.log, seed = list(no = 1),
    y.lowRatio = -1)

Arguments

beta

Coefficients of modified Poisson regression.

data.size

The sample size of data to generate.

scheme

The grouped and right-censored grouping scheme. A sorted vector containing starting integers of all groups.

scope.lambda

A vector of length 2 specifying the range of \lambda.

link.lambda

The link function for \lambda.

seed

Random seed (optional).

y.lowRatio

The minimum proportion of groups in the sample distribution. This optional proportion is included to deal with imbalanced data.

Value

x

The design matrix.

y

The GRC outcome.

unused

An integer roughly describing the number of discarded sample observations in the generating process. If this number is too large, the generation of artificial data is not efficient and takes too much time.

Examples

set.seed(123)
tp <- genData.P(beta = c(0.5, -1, 1), data.size = 12, scheme = c(0:3, 5, 8))

[Package GRCRegression version 1.0 Index]