WGScan.prelim: The preliminary data management for WGScan

Description Usage Arguments Value Examples

View source: R/WGScan.R

Description

This function does the preliminary data management and fit the model under null hypothesis. The output will be used in the other WGScan functions.

Usage

1
WGScan.prelim(Y, X=NULL, id=NULL, out_type="C", B=5000)

Arguments

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.

Value

It returns a list used for function WGScan.Region(), WGScan.SingleWindow() and WGScan.VCF.chr().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(WGScan)

# 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(WGScan.example)
Y<-WGScan.example$Y;X<-WGScan.example$X;G<-WGScan.example$G;Z<-WGScan.example$Z

# Preliminary data management
result.prelim<-WGScan.prelim(Y,X=X,out_type="C",B=5000)

WGScan documentation built on May 27, 2019, 9:05 a.m.