fit_afs: Given target data, fit the AFS function

View source: R/fit_afs.R

fit_afsR Documentation

Given target data, fit the AFS function

Description

This function takes AFS target data and estimates parameters for the AFS function A dataframe specifying the rare MAC bins and the observed proportion of variants is used to fit the data The proportion of rare variants (p_rv) is by default the sum of the rare allele count bins. The proportion be manually specified if desired

Usage

fit_afs(Observed_bin_props, p_rv = NULL)

Arguments

Observed_bin_props

data frame with 3 columns, Lower, Upper (of MAC bins) and proportion of variants in that MAC bin

p_rv

proportion of rare variants - default is the sum of the rare MAC bin proportions

Value

list of parameters - alpha, beta, and b as well as fitted proportions

Examples

data("afs_afr")
fit_afs(Observed_bin_props = afs_afr)


meganmichelle/RAREsim documentation built on June 11, 2022, 7:34 p.m.