WGScan.prelim {WGScan}R Documentation

The preliminary data management for WGScan

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

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

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)


[Package WGScan version 0.1 Index]