Generation of random sample datasets for profile regression.
generateSampleDataFile(clusterSummary, pQuantile=0.05)
The output of this function is a list with the following elements
The outcome model according to which the data has been generated.
The covariate model according to which the data has been generated.
The data.frame that contains the data.
The names of the covariates.
The names of the fixed effects.
The spatial gaussian effect. It is sample into the intrinsic autoregressive model with precision TauCAR under the constraint that the sum of term is null. Only used if includeCAR is TRUE.
The precision of the spatial CAR effect. Only used if includeCAR is TRUE.
A vector of size nSubject given the cluster name of each subject. When spatial CAR is added to the model, for preventing potential identifiability problems, the clusters are randomly distributed within the all subjects. Only used if includeCAR is TRUE.
A vector of strings of the covariate names as by the column names in the data argument.
pQuantile is the quantile parameter of the Asymmetric Laplace Distribution used to generate data to test the model for the quantiles.
David Hastie, Department of Epidemiology and Biostatistics, Imperial College London, UK
Silvia Liverani, Department of Epidemiology and Biostatistics, Imperial College London and MRC Biostatistics Unit, Cambridge, UK
Aurore J. Lavigne, Department of Epidemiology and Biostatistics, Imperial College London, UK
Maintainer: Silvia Liverani <liveranis@gmail.com>
Silvia Liverani, David I. Hastie, Lamiae Azizi, Michail Papathomas, Sylvia Richardson (2015). PReMiuM: An R Package for Profile Regression Mixture Models Using Dirichlet Processes. Journal of Statistical Software, 64(7), 1-30. tools:::Rd_expr_doi("10.18637/jss.v064.i07").
# generation of data for clustering
generateDataList <- clusSummaryBernoulliDiscrete()
inputs <- generateSampleDataFile(generateDataList)
Run the code above in your browser using DataLab