Description Usage Arguments Value Note Examples
This is a very simple function to simulate SNP data. For more sophisticated
methods for simulating SNP data consider for example the scrime
package.
1 2 | simulateSNPdata(n.obs = 500, n.snp = 200, seed = NA,
maf = rep(c(0.05, 0.1, 0.25, 0.4), each = 50), prob1 = 0.5)
|
n.obs |
A |
n.snp |
A |
seed |
The seed to be used in data simulation. |
maf |
A |
prob1 |
The probability with which every observation of the response vector |
A data.frame
with dimensions n.obs x (n.snps + 1)
. The
response y
is contained in the first column and is simulated binary (0,1),
with equal probabilities.
The user can provide his own data set and use the other functions in this package
as long as the first column contains the response and the other columns
1-3 categorical variables coded (0,1,2). One could use the more advanced
package scrime
to simulate the SNP data for example.
1 2 3 4 | YX <- simulateSNPdata(seed = 123)
dim(YX)
class(YX)
colnames(YX)[1:10]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.