effect_size_distributions: Effect size distributions.

effect_size_distributionsR Documentation

Effect size distributions.

Description

Generate any number of random values drawn from the locus effect size distributions.

Usage

rbayesB(n, pi, d.f, scale)

rbayesB_fixed(n, sites, d.f, scale)

rbayesA(n, d.f, scale)

rzero_inflated_normal(n, pi, sd, scale)

rzero_inflated_normal_fixed(n, sites, sd, scale)

rflat(n, pi, scale)

rflat_fixed(n, sites, scale)

Arguments

n

numeric. Number of draws to make from the distribution

pi

numeric. Probability that any one site has zero effect

d.f

numeric. Degrees of freedom for the effect size t distribution.

scale

numeric. Scale/shape parameter for the scaled t distribution.

sites

numeric. Number of sites that have an effect.

sd

numeric. Standard deviation for the effect size t distribution.

Functions

  • rbayesB: assign some loci an effect from a scaled t distribution given a probablity of non-zero effects

  • rbayesB_fixed: assign a fixed number of loci effects from a scaled t distribution

  • rbayesA: assign all loci effects from a scaled t distribution

  • rzero_inflated_normal: assign some loci an effect from a scaled normal distribution given a probability of non-zero effects

  • rzero_inflated_normal_fixed: assign a fixed number of loci effects from a scaled normal distribution

  • rflat: asign loci a fixed effect given a probability of non-zero effects

  • rflat_fixed: assign a fixed number of loci a fixed effect

BayesB

Under a bayesB model, each locus has probability pi of having no effect. Effects are otherwise drawn from a scaled t distribution with degrees of freedom d.f and scale scale. Alternatively, a fixed number of sites (sites) can be given an effect from the same distribution. This is equivalent to the expected number of sites when pi = 1 - (sites/n), where n is the number of loci.

BayesA

Under a bayesA model, all loci have effects drawn from a scaled t distribution with degrees of freedom d.f and scale scale. This is equivalent to a bayesB model where pi is equal to 0.

scaled normal

Effects are drawn from a normal distribution where var(g) == 0. Each locus has probability pi of having no effect. Effects are otherwise drawn from a normal distribution with mean 0, standard deviation sd, and scale scale. Alternatively, a fixed number of sites (sites) can be given an effect from the same distribution. This is equivalent to the expected number of sites when pi = 1 - (sites/n), where n is the number of loci.

flat

Each locus has probability pi of having no effect. Effects are otherwise equal to the parameter scale scale. Alternatively, a fixed number of sites (sites) can be given an effect from the same distribution. This is equivalent to the expected number of sites when pi = 1 - (sites/n), where n is the number of loci.


hemstrow/GeneArchEst documentation built on June 10, 2025, 5:06 a.m.