Description Usage Arguments Details Value Examples
View source: R/zero_est_core.R
Fits the Hurdle model assuming linear abk parametrization using C code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  | 
V | 
 A matrix of 0/1s, equal to Y != 0.  | 
Y | 
 A data matrix of the same size as   | 
left | 
 An integer between 1 and   | 
right | 
 A vector of integers between 1 and   | 
maxit | 
 An integer, the maximum number of integers, argument to   | 
runs | 
 A positive integer, number of reruns; if larger than   | 
value_only | 
 If   | 
verbosity | 
 A positive integer, verbosity level. If set to 0 no output is print during estimation.  | 
step_size | 
 A double, the step size of the first trial step. Defaults to 0.1.  | 
lm_tol | 
 A double, accuracy of the line minimization.  | 
epsabs | 
 A double, accuracy of the minimization.  | 
maxsize | 
 A double, the final size of the simplex.  | 
method | 
 A positive integer indicating the method to use. 5 is recommended and default. 
  | 
Fits the Hurdle model assuming linear abk parametrization, where Y[,left] conditional on Y[,right] is a 1-d Hurdle model with respect to the sum of the Lebesgue measure and a point mass at 0 with density
a*v+b*y-y^2*k/2-log(1+sqrt(2pi/k)*exp(a+b^2/(2k))),
with a and b both linear functions in V[,right] and Y[,right].
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 length   | 
n | 
 An integer, the sample size.  | 
effective_df | 
 
  | 
1 2 3 4 5  | m <- 3; n <- 1000
adj_mat <- make_dag(m, "complete")
dat <- gen_zero_dat(1, "abk", adj_mat, n, k_mode=1, min_num=10, gen_uniform_degree=1)
zi_fit_C(dat$V, dat$Y, 3, 1:2, maxit=1000, runs=2, value_only=TRUE, verbosity=0)
zi_fit_C(dat$V, dat$Y, 3, 1:2, maxit=1000, runs=2, value_only=FALSE, verbosity=0)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.