Learn R Programming

hierarchicalDS (version 3.0)

switch_pdf: function to calculate the joint pdf for a sample of values from one of a number of pdfs

Description

function to calculate the joint pdf for a sample of values from one of a number of pdfs

Usage

switch_pdf(x, pdf, cur.par, RE)

Arguments

x

values to be evaluated

pdf

probability density function (pois1, poisson, pois1_ln, poisson_ln, normal, multinom)

cur.par

a vector giving parameters for the specified distribution; only the first is used for single parameter distributions

RE

random effects, if present

Value

total log likelihood of points