dnorm_mix_tempered: Density of tempered mixture Gaussian

View source: R/mixG_sampler.R

dnorm_mix_temperedR Documentation

Density of tempered mixture Gaussian

Description

Returns the value of a normalised tempered mixture Gaussian at given point x

Usage

dnorm_mix_tempered(x, n_comp, weights, means, sds, beta, normalised = TRUE)

Arguments

x

real value

n_comp

integer number of components of mixture Gaussian

weights

vector: weights of mixture Gaussian

means

vector: means of mixture Gassuan

sds

vector: st.devs of mixture Gaussian

beta

real value

normalised

boolean value to determine if normalisation constant is calculated

Value

value: value of a normalised tempered mixture Gaussian at given point x

Examples

weights <- c(0.4, 0.6)
means <- c(-3, 6)
sds <- c(1, 2)
beta <- 1/4
curve(dnorm_mix_tempered(x,
                         n_comp = 2,
                         weights = weights,
                         means = means,
                         sds = sds,
                         beta = beta,
                         normalised = FALSE),
      -15, 20, ylim = c(0, 0.8), ylab = 'pdf')
curve(dnorm_mix_tempered(x,
                         n_comp = 2,
                         weights = weights,
                         means = means,
                         sds = sds,
                         beta = beta,
                         normalised = TRUE),
      add = T, lty = 2)


rchan26/hierarchicalFusion documentation built on Sept. 11, 2022, 10:30 p.m.