STEPS.snp: Seoncdary Trait (ST) Analysis in Extreme Phenotype Sequencing...

Description Usage Arguments Details Value Examples

View source: R/STEPS-main.R

Description

A function to conduct genetic association analyses of secondary traits in extreme phenotype sequencing

Usage

1
2
STEPS.snp(data.mat, sec.type, ini.para = NULL, y0 = -Inf, y1 = NULL,
  y2 = NULL, y3 = Inf)

Arguments

data.mat

An R matrix with each row for one subject. Column 1 is primary phneotype, column 2 is secondary phenotype, column 3 is genotype, the other columns are covariates. Missing data should be NA.

sec.type

an R character to specify secodnary trait type: "binary" or "continuous"

ini.para

initial parameters. Default is NULL, in which initial parameters would be estimated.

y0

lower cutoff value in EPS, more information can be seen in Details.

y1

lower cutoff value in EPS, more information can be seen in Details.

y2

upper cutoff value in EPS, more information can be seen in Details.

y3

upper cutoff value in EPS, more information can be seen in Details.

Details

Models to characterize Genotype, Primary Trait, Secondary Trait and Covariate can be seen in Details of help(data.simu). Cutoff values y0<y1<y2<y3 are to specify the cutoff values in EPS. Subjects with primary trait Y between (y0,y1) or between (y2,y3) were retained to gentoype/sequence, and other subjects were removed. If not specified, y0 is -Inf, y3 is Inf, y1 and y2 are estimated based on dataset. In the current version, we simply remove subjects with any missing data.

Value

An R with the following components:

pval

p-value of Wald test to associate secondary trait with genotype

inv.fsh

inverse matrix of fisher matrix

fnl.para

an R list of a) res.opt: output of function optim(); b) res.lst: only estimated parameter

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## First generate an parameter
par.ls = list(b0=0,b1=rnorm(2),b3=rnorm(1),g0=0,g1=rnorm(2))
## Continuous Secondary Trait
data.cont = data.simu(par.ls,"continuous")
out=STEPS.snp(data.cont,"continuous")
out$pval
## Binary Secondary Trait
data.bina = data.simu(par.ls,"binary")
out=STEPS.snp(data.bina,"binary")
out$pval

WenjianBI/STEPS documentation built on July 22, 2019, 11:12 p.m.