Description Usage Arguments Details Value Author(s) See Also Examples
Run linear or logistic regression on variants
1 2 3 4 | ## S4 method for signature 'SeqVarData'
regression(gdsobj, outcome, covar=NULL,
model.type=c("linear", "logistic", "firth"),
parallel=FALSE)
|
gdsobj |
A |
outcome |
A character string with the name of the column in |
covar |
A character vector with the name of the column(s) in |
model.type |
the type of model to be run. "linear" uses |
parallel |
Logical, numeric, or other value to control parallel
processing; see |
regression
tests the additive effect of the reference allele.
a data.frame with the following columns (if applicable):
variant.id |
variant identifier |
n |
number of samples with non-missing data |
n0 |
number of controls (outcome=0) with non-missing data |
n1 |
number of cases (outcome=1) with non-missing data |
freq |
reference allele frequency |
freq0 |
reference allele frequency in controls |
freq1 |
reference allele frequency in cases |
Est |
beta estimate for genotype |
SE |
standard error of beta estimate for the genotype |
Wald.Stat |
chi-squared test statistic for association |
Wald.pval |
p-value for association |
PPL.Stat |
firth only: profile penalized likelihood test statistic for association |
PPL.pval |
firth only: p-value for association |
Stephanie Gogarten
SeqVarData
,
seqSetFilter
,
lm
,
glm
,
logistf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | gds <- seqOpen(seqExampleFileName("gds"))
## create some phenotype data
library(Biobase)
sample.id <- seqGetData(gds, "sample.id")
n <- length(sample.id)
df <- data.frame(sample.id,
sex=sample(c("M", "F"), n, replace=TRUE),
age=sample(18:70, n, replace=TRUE),
phen=rnorm(n),
stringsAsFactors=FALSE)
meta <- data.frame(labelDescription=c("sample identifier",
"sex", "age", "phenotype"), row.names=names(df))
sample.data <- AnnotatedDataFrame(df, meta)
seqData <- SeqVarData(gds, sample.data)
## select samples and variants
seqSetFilter(gds, sample.id=sample.id[1:50], variant.id=1:10)
res <- regression(seqData, outcome="phen", covar=c("sex", "age"))
res
seqClose(gds)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.