Description Usage Arguments Value Examples
This function does the preliminary data management and fit the model under null hypothesis. The output will be used in the other GenoScan functions.
1 | GenoScan.prelim(Y, X=NULL, id=NULL, out_type="C", B=5000)
|
Y |
The outcome variable, an n*1 matrix where n is the total number of observations |
X |
An n*d covariates matrix where d is the total number of covariates. |
id |
The subject id. This is used to match phenotype with genotype. The default is NULL, where the matched phenotype and genotype matrices are assumed. |
out_type |
Type of outcome variable. Can be either "C" for continuous or "D" for dichotomous. The default is "C". |
B |
Number of resampling replicates. The default is 5000. A larger value leads to more accurate and stable p-value calculation, but requires more computing time. |
It returns a list used for function GenoScan.Region(), GenoScan.SingleWindow() and GenoScan.VCF.chr().
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(GenoScan)
# Load data example
# Y: outcomes, n by 1 matrix where n is the total number of observations
# X: covariates, n by d matrix
# G: genotype matrix, n by p matrix where n is the total number of subjects
# Z: functional annotation matrix, p by q matrix
data(GenoScan.example)
Y<-GenoScan.example$Y;X<-GenoScan.example$X;G<-GenoScan.example$G;Z<-GenoScan.example$Z
# Preliminary data management
result.prelim<-GenoScan.prelim(Y,X=X,out_type="C",B=5000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.