This function based on Drechsler, Kiesl & Speidel (2015) is needed in the imputation routine for rounded income. It calculates the likelihood contribution of the data (regardless whether they are observed precisely or presumably rounded).
negloglik(para, parnames = names(para), X_in_negloglik, PSI_in_negloglik,
y_precise_stand, lower_bounds = NA, upper_bounds = NA, my_g,
sd_of_y_precise, indicator_precise, indicator_imprecise,
indicator_outliers, rounding_degrees = c(1, 10, 100, 1000))
This is the vector \(Psi\) of parameters (see p. 62 in Drechsler, Kiesl & Speidel, 2015). With respect to them, the value returned by negloglik shall be maximized. The starting values are c(kstart, betastart, gamma1start, sigmastart) (the thresholds (or "cutting points") for the latent variable behind the rounding degree, the regression parameters explaining the logged income, the regression parameters explaining the rounding degree and the variance parameter).
A character vector with the names of the elements in para.
The data.frame of covariates explaining Y, the observed target variable. It has to has n rows (with n being the number of precise, imprecise and missing observations).
The data.frame of covariates explaining G, the latent rounding tendency. Without the target variable.
A vector of the precise (and standardized) observations from the target variable.
The lower bounds of an interval variable.
The upper bounds of an interval variable.
This vector is the indicator of the (highest possible) rounding degree for an observation. This parameter comes directly from the data.
The scalar with the value equal to the standard deviation of the target variable.
A boolean Vector indicating whether the value in the original target variable is precise (e.g. 5123 or 5123.643634) or not.
A boolean Vector indicating whether the value in the original target variable is imprecise (e.g. "5120;5130) or not.
A boolean Vector indicating whether the value in the precise observations of the original target are outliers (smaller than 0.5% or larger than 99.5% of the other precise observations).
A numeric vector with the presumed rounding degrees for Y.
An integer equal to the (sum of the) negative log-likelihood contributions (of the observations)
Joerg Drechsler, Hans Kiesl, Matthias Speidel (2015): "MI Double Feature: Multiple Imputation to Address Nonresponse and Rounding Errors in Income Questions", Austrian Journal of Statistics, Vol. 44, No. 2, http://dx.doi.org/10.17713/ajs.v44i2.77