Description Usage Arguments Details Value Examples
Calculates the mean log probability of a vector of 1-d Hurdle random variables under the abk parametrization, each variable with different a
and b
and shared k
.
1 | log_dhurdle_vec_abk(V, Y, A, B, k)
|
V |
A logical vector, indicating if each entry in |
Y |
A numerical vector of i.i.d. 1-d Hurdle random variables. |
A |
A numerical vector of the same size as |
B |
A numerical vector of the same size as |
k |
A positive number, the common |
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 the log probabilities over a vector of samples with different a
and b
parameters and the same k
.
This is used for the multivariate case where in the conditional 1-d Hurdle model the a
and b
are functions in other (parent) nodes/variables.
A number, the mean log probability.
1 2 3 4 5 | set.seed(1)
A <- rnorm(100)
B <- rnorm(100)
y <- generate_one_each_a_b_k(A=A, B=B, k=2)
log_dhurdle_vec_abk(y != 0, y, A=A, B=B, k=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.