lossfunctionss: Calculation of histogram-based summary statistics of a...

Description Usage Arguments Value See Also

View source: R/ArchitectureModel.R

Description

Compute summary statistics from a dataset of MAF,beta pairs, by binning data into histograms and comparing whether the theoretical proportion of SNPs above a threshold matches the observed proportion.

Uses annotatearchitecture to annotate each SNP by with its prediction, and getsigma to estimate sigma given s and the dataset.

Usage

1
2
3
4
5
6
7
lossfunctionss(
  dat,
  s,
  bins = defaultbins(),
  thresholds = defaultthresholds(),
  sigma = NULL
)

Arguments

dat

A dataframe containing summary statistics from a GWAS/BayesS/LDAK analysis. In its first two columns we need: MAF (f) and beta.

s

The selection coefficient assumed in the architecture model

bins

(Default: bins=defaultbins The histogram bin boundaries assumed for creating summary statistcs, which need to be large enough to contain enough samples and small enough to retain resolution.

thresholds

(Default: defaultthresholds) Standard deviation units for the summary statistic generation. Only SNPs above the first are used for model learning. The proportion above the second is predicted from the number above the first.

sigma

(Default: NULL meaning estimate from data) The scale parameter of the Genomic Architecture. Do not provide this with any search procedure as the results can be poor.

Value

A data frame containing: bins, count0 (The number of SNPs in the bin), count (the number of SNPs above the first threshold), count2 (the number of SNPs above the second threshold)

See Also

lossfunction to turn this summary into a loss, and fullsearch to search over s.


danjlawson/robustarchitecture documentation built on Dec. 19, 2021, 8:09 p.m.