Description Usage Arguments Value Examples
Simulates a dataset that can be used to test the screenLD function, and to test the performance of the proposed method under different scenarios. The simulated dataset has two zcovariates and p Xcovariates, only a few of which have nonzero effect. There are n subjects in the simulated dataset, each having J observations, which are not necessarily evenly timed, because we randomly draw a subset to create an unbalanced dataset (unless the user sets proportionMissing=0). The withinsubject correlation is assumed to be AR1.
1 2 3 
n 
Number of subjects in the simulated dataset 
J 
Number of observations per subject 
rho 
The correlation parameter for the AR1 correlation structure. 
p 
The total number of features to be screened from 
proportionMissing 
The proportion of the observations to randomly remove, in order to create unequal numbers of measurements between subjects. 
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. 
beta0Fun 
The timevarying intercept for the datagenerating model, as a function of
time. If left as null, it will default to 
betaFun 
The timevarying coefficients for z in the datagenerating model, as a
function of time. If left as null, it will be specified as two functions. The first is

gammaFun 
A list of functions of time, one function for each entry in trueIdx,
giving the timevarying effects of each active feature in the simulated x matrix.
If left as null, it will be specified as four functions. The first is a step function

varFun 
A function of time telling the marginal variance of the error function at a
given time. If left as null, it will be specified as 
A list with following components:
X: 
Matrix of features to be screened. It will have n*J rows and p columns. 
Y: 
Vector of responses. It will have length of n*J. 
z: 
A matrix representing covariates to be included in each of the screening models. The first column will be all ones, representing the intercept. The second will consist of random ones and zeros, representing simulated genders. 
id: 
Vector of integers identifying the subject to which each observation belongs. 
time: 
Vector of real numbers identifying observation times. It should have the same length as the number of rows of X. 
1 2  set.seed(12345678)
results < simulateLD(p=1000)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.