log_dhurdle1d_abk: Calculates the mean log probability of a vector of i.i.d. 1-d...

Description Usage Arguments Details Value Examples

View source: R/zero_dist.R

Description

Calculates the mean log probability of a vector of i.i.d. 1-d Hurdle random variables under the abk parametrization.

Usage

1
log_dhurdle1d_abk(V, Y, a, b, k)

Arguments

V

A logical vector, indicating if each entry in Y is non-zero, i.e. V = (Y != 0).

Y

A numerical vector of i.i.d. 1-d Hurdle random variables.

a

A number, the a parameter.

b

A number, the b parameter.

k

A number, the k parameter.

Details

The log probability of a sample y from the 1-d Hurdle model with abk parametrization with respect to the sum of the Lebesgue measure and a point mass at 0 is a*v+b*y-y^2*k/2-log(1+sqrt(2pi/k)*exp(a+b^2/(2k))) where v = (y != 0). The function calculates the mean of log probabilities over a vector of i.i.d samples.

Value

A number, the mean log probability.

Examples

1
2
y <- rhurdle1d_abk(n=100, a=1, b=2, k=3)
log_dhurdle1d_abk(y != 0, y, a=1, b=2, k=3)

sqyu/ZiDAG documentation built on Jan. 19, 2021, 4:11 p.m.