CalcSumstats {AllelicSeries} | R Documentation |
Calculate Summary Statistics
Description
Generate summary statistics from individual-level data. Provide either a
list of data as generated by DGP
, or all of anno
, geno
,
and pheno
.
Usage
CalcSumstats(
anno = NULL,
covar = NULL,
data = NULL,
geno = NULL,
pheno = NULL,
add_intercept = TRUE,
is_binary = FALSE
)
Arguments
anno |
(snps x 1) annotation vector. |
covar |
(subjects x covars) covariate matrix. |
data |
List of data containing the annotation vector |
geno |
(subjects x snps) genotype matrix. |
pheno |
(subjects x 1) phenotype vector. |
add_intercept |
Add an intercept if not present in the supplied covariate matrix covar? Default: TRUE. |
is_binary |
Is the phenotype binary? Default: FALSE. |
Value
List containing the following items:
-
ld
: A SNP x SNP correlation (LD) matrix. -
sumstats
: A SNP x 5 matrix of summary statistics, including the . annotation, MAF, estimated effect size, standard error, and p-value. -
type
: Either "binary" or "quantitative".'
Examples
data <- DGP()
sumstats <- CalcSumstats(data = data)