View source: R/SampleSNPPhenotype.R
SampleSNPPhenotype | R Documentation |
SampleSNPPhenotype
is used to generate a sample of genotype values for a gene and of phenotype values.
The phenotype is generated conditionally to the gene using a logistic model.
SampleSNPPhenotype(X, beta0, beta, I, n0, n1, U = NULL, alpha = NULL,
mod = rep("A", length(I)))
X |
a N x p matrix of genotype values (coded as 0/1/2) for a given gene for a population |
beta0 |
the intercept of the logistic model |
beta |
the vector of effect parameters for the logistic model |
I |
the vector of coordinates corresponding to the coefficients in |
n0 |
the desired number of controls |
n1 |
the desired number of cases |
U |
an optional matrix of covariates profiles |
alpha |
an optional vector of covariates effects parameters |
mod |
an optional vector of characters specifying the genetic association model for each SNP position
given in |
A list containing 3 elements:
SNP |
the sample matrix of genotypic profiles |
Y |
the vector of phenotype values |
Covariates |
the sample matrix of covariates profiles (if any) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.