simulateVCM | R Documentation |
Simulates a dataset that can be used to test the screenVCM function, and to test the performance of the proposed method under different scenarios. The simulated dataset has a single U-covariate and p X-predictors, only a few of which have nonzero effect.
Jingyuan Liu for providing some of the code upon which this function is based.
simulateVCM( n = 200, rho = 0.4, p = 1000, trueIdx = c(2, 100, 400, 600, 1000), betaFun = NULL )
n |
Number of subjects in the simulated dataset |
rho |
The correlation matrix of columns of X. |
p |
The total number of features to be screened from |
trueIdx |
The indexes for the active features in the simulated X matrix. This should be a vector, and the values should be a subset of 1:p. |
betaFun |
A list of functions of U, one function for each entry in trueIdx, giving the varying effects of each active predictor in the simulated X matrix. |
A list with following components: X Matrix of predictors to be screened. It will have n rows and p columns. Y Vector of responses. It will have length of n. U A vector representing a covariate with which the coefficient functions vary.
set.seed(12345678) results <- simulateVCM(p=1000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.