DGP: Data generating process used by Battey, H. S. & Cox, D. R....

View source: R/DGP.R

DGPR Documentation

Data generating process used by Battey, H. S. & Cox, D. R. (2018).

Description

This function generates realizations of random variables as described in the simple example of Battey, H. S. & Cox, D. R. (2018).

Usage

DGP(s,a,sigStrength,rho,n,noise=NULL,var,d,intercept,type.response="N",DGP.seed=NULL,
    scale=NULL,shape=NULL,rate=NULL)

Arguments

s

Number of signal variables.

a

Number of noise variables correlated with signal variables.

sigStrength

Signal strength.

rho

Correlation among signal variables and noise variables correlated with signal variables.

n

Sample size.

noise

Variance of the observations around the true regression line.

var

Variance of the potential explanatory variables.

d

Number of potential explanatory variables.

intercept

Expected value of the response variable when all potential explanatory variables are at zero. It is only considered when type.response="N".

type.response

Generates gaussian ("N") or survival ("S") data from a proportional hazards model with Weibull baseline hazard.

DGP.seed

Seed for the random number generator.

scale

scale parameter of the proportional hazards model with Weibull baseline hazard.

shape

shape parameter of the proportional hazards model with Weibull baseline hazard.

rate

rate parameter of the exponential distribution of censoring times. If not provided, uncensored data are generated.

Value

X

The simulated design matrix.

Y

The simulated response variable.

TRUE.idx

Indices of the variables in the true model.

status

If type.response="S", provides the status from survival data.

Acknowledgement

The work was supported by the UK Engineering and Physical Sciences Research Council under grant number EP/P002757/1.

Author(s)

Hoeltgebaum, H. H.

References

Cox, D. R. and Battey, H. S. (2017). Large numbers of explanatory variables, a semi-descriptive analysis. Proceedings of the National Academy of Sciences, 114(32), 8592-8595.

Battey, H. S. and Cox, D. R. (2018). Large numbers of explanatory variables: a probabilistic assessment. Proceedings of the Royal Society of London, A., 474(2215), 20170631.

Hoeltgebaum, H., & Battey, H. S. (2019). HCmodelSets: An R Package for Specifying Sets of Well-fitting Models in High Dimensions. The R Journal, 11(2), 370-379.

Examples

## Generates DGP

## Generates a random DGP
dgp = DGP(s=5, a=3, sigStrength=1, rho=0.9, n=100, intercept=5, noise=1,
          var=1, d=1000, DGP.seed = 2018)
          


HCmodelSets documentation built on March 31, 2023, 7:02 p.m.

Related to DGP in HCmodelSets...