| 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
-
normala normal distribution -
student_ta scaled and shifted t-distribution -
noncentral_ta noncentral t (for t statistic) -
noncentral_da noncentral t (for one sample d) -
noncentral_d2a noncentral t (for independent samples d) -
binomiala binomial distribution
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
-
meanmean of the normal likelihood -
sdstandard deviation of the normal likelihood
student_t distribution
When family is set to student_t then the following
parameters may be set
-
meanmean of the scaled and shifted t likelihood -
sdstandard deviation of the scaled and shifted t likelihood -
dfdegrees of freedom
noncentral_t distribution
When family is set to noncentral_t then the following
parameters may be set
-
tthe t value of the data -
dfdegrees of freedom
noncentral_d distribution
When family is set to noncentral_d then the following
parameters may be set
-
dthe d (mean / sd) value of the data -
nthe sample size
noncentral_d2 distribution
When family is set to noncentral_d2 then the following
parameters may be set
-
dthe d (mean / s_pooled) value of the data -
n1the sample size of group 1 -
n2the sample size of group 2
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
-
successesthe number of successes -
trialsthe number of trials
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)