mle1d_abk: Fits MLE for 1-d Hurdle model under the abk parametrization.

Description Usage Arguments Details Value Examples

View source: R/zero_est_core.R

Description

Fits MLE for 1-d Hurdle model under the abk parametrization.

Usage

1
mle1d_abk(V, Y, left, value_only = TRUE)

Arguments

V

A matrix of 0/1s, equal to Y != 0.

Y

A data matrix of the same size as V.

left

An integer between 1 and ncol(Y). The index of the variable to be fit.

value_only

If TRUE, returns the minimized negative log likelihood only. Defaults to TRUE.

Details

Fits an MLE for the 1-d Hurdle model to Y[,left] under the abk parametrization.

Value

If value_only == TRUE, returns the minimized negative log likelihood only. Otherwise, returns

nll

A number, the minimized negative log likelihood.

par

A vector of 3 numbers, the fitted a, b, and k parameters.

n

An integer, the sample size.

effective_df

Number 3, the effective degree of freedom.

Examples

1
2
3
4
Y <- matrix(rhurdle1d_abk(n=1e4, a=1.2, b=2.3, k=1.9), ncol=1)
V <- Y != 0
mle1d_abk(V, Y, 1, TRUE)
mle1d_abk(V, Y, 1, FALSE)

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