Description Usage Arguments Value References
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).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
para |
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. |
parnames |
A character vector with the names of the elements in para. |
X_in_negloglik |
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). |
PSI_in_negloglik |
The data.frame of covariates explaining G, the latent rounding tendency. Without the target variable. |
y_precise_stand |
A vector of the precise (and standardized) observations from the target variable. |
lower_bounds |
The lower bounds of an interval variable. |
upper_bounds |
The upper bounds of an interval variable. |
my_g |
This vector is the indicator of the (highest possible) rounding degree for an observation. This parameter comes directly from the data. |
sd_of_y_precise |
The scalar with the value equal to the standard deviation of the target variable. |
indicator_precise |
A boolean Vector indicating whether the value in the original target variable is precise (e.g. 5123 or 5123.643634) or not. |
indicator_imprecise |
A boolean Vector indicating whether the value in the original target variable is imprecise (e.g. "5120;5130) or not. |
indicator_outliers |
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). |
rounding_degrees |
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.