GeneScan.Null.Model | R Documentation |
This function does the preliminary data management and fit the generalized linear model under null hypothesis for unrelated samples. The output will be used in the other GeneScan functions.
GeneScan.Null.Model(
Y,
X = NULL,
id = NULL,
out_type = "C",
resampling = FALSE,
B = 1000
)
Y |
The outcome variable, an n*1 matrix where n is the number of individuals. |
X |
An n*d covariates matrix where d is the 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". |
resampling |
Resampling indicator. The default is FALSE, do not conduct resampling-based moment matching when the sample size is large, especially for UK biobank-scale data. |
B |
Number of resampling replicates. The default is 1000, only run resampling replicates when the resampling indicator is TRUE. A larger value leads to more accurate and stable p-value calculation, but requires more computing time. |
It returns a list used for function GeneScan1D(), GeneScan3D() and GeneScan3D.KnockoffGeneration().
library(GeneScan3DKnock)
# Load data example
data("GeneScan3D.example")
# Y: outcomes, n by 1 matrix for n=2000 individuals
# X: covariates, n by d matrix for d=1 covariate
Y=GeneScan3D.example$Y; X=GeneScan3D.example$X;
# Preliminary data management
result.null.model=GeneScan.Null.Model(Y, X, out_type="C", resampling=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.