likelihood {bayesplay}R Documentation

Specify a likelihood

Description

Define likelihoods using different different distribution families #nolint

Usage

likelihood(family, ...)

Arguments

family

the likelihood distribution (see details)

...

see details

Details

Available distribution families

The following distribution families can be used for the likelihood

normal distribution

When family is set to normal then the following parameters must be set

student_t distribution

When family is set to student_t then the following parameters may be set

noncentral_t distribution

When family is set to noncentral_t then the following parameters may be set

noncentral_d distribution

When family is set to noncentral_d then the following parameters may be set

noncentral_d2 distribution

When family is set to noncentral_d2 then the following parameters may be set

s_pooled is set as below:

√(((n1 - 1) * s1^2 + (n2 - 1)*s2^2)/(n1 + n2 - 2))

binomial distribution

When the family is set to binomial then the following parameters may be set

Value

an object of class likelihood

Examples

# specify a normal likelihood
likelihood(family = "normal", mean = 5.5, sd = 32.35)

# specify a scaled and shifted t likelihood
likelihood(family = "student_t", mean = 5.5, sd = 32.35, df = 10)

# specify non-central t likelihood (t scaled)
likelihood(family = "noncentral_t", t = 10, df = 10)

# specify non-central t likelihood (d scaled)
likelihood(family = "noncentral_d", d = 10, n = 10)

# specify non-central t likelihood (independent samples d scaled)
likelihood(family = "noncentral_d2", d = 10, n1 = 10, n2 = 12)

# specify a binomial likelihood
likelihood(family = "binomial", successes = 2, trials = 10)

[Package bayesplay version 0.9.2 Index]