likelihood {bayesplay}R Documentation

Specify a likelihood

Description

Define likelihoods using different different distribution families

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

The parameters that need to be specified will be dependent on the family

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_{\mathrm{pooled}} is set as below:

s_{\mathrm{pooled}} = \sqrt{\frac{(n_1 - 1)s^2_1 + (n_2 - 1)s^2_2 } {n_1 + n_2 - 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.3 Index]