GeneScan.Null.Model: The preliminary data management for GeneScan3DKnock.

View source: R/GeneScan3D.R

GeneScan.Null.ModelR Documentation

The preliminary data management for GeneScan3DKnock.

Description

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.

Usage

GeneScan.Null.Model(
  Y,
  X = NULL,
  id = NULL,
  out_type = "C",
  resampling = FALSE,
  B = 1000
)

Arguments

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.

Value

It returns a list used for function GeneScan1D(), GeneScan3D() and GeneScan3D.KnockoffGeneration().

Examples

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)


Iuliana-Ionita-Laza/GeneScan3DKnock documentation built on July 31, 2023, 4:32 a.m.