sample_likelihoods: Generate marginal likelihoods in a given interval of t-values

View source: R/Visualizations.R

sample_likelihoodsR Documentation

Generate marginal likelihoods in a given interval of t-values

Description

Generate marginal likelihoods in a given interval of t-values

Usage

sample_likelihoods(alternative = function(x) dcauchy(x, scale =
  sqrt(2)/2), n1, n2, from = -6, to = 6)

Arguments

alternative

A function object. The default is a Cauchy prior with scaling parameter 'sqrt(2) / 2' as is the default in package 'BayesFactor' (Morey & Rouder, 2015). This argument can also be a scalar number, in which case it is assumed that the alternative is a point hypothesis on Cohen's d (with Cohen's d = 'prior').

n1

The sample size in group 1

n2

The sample size in group 2

from

The lowest t-value

to

The largest t-value

Value

A data.frame of two columns: Column x contains the t-values, column y contains the marginal likelihoods

Examples

sample_likelihoods(n1 = 30, n2 = 30, from = -3, to = 3)
sample_likelihoods(function(x) dnorm(x, 0, 0.3), n1 = 30, n2 = 30)


m-Py/bayesEd documentation built on Feb. 25, 2023, 5:35 p.m.