negloglik2: calculate the likelihood contribution of the data

Description Usage Arguments Value References

View source: R/hmi_smallfunctions_2017-11-14.R View source: R/hmi_smallfunctions_2017-09-14.R View source: R/hmi_smallfunctions_2017-09-01.R View source: R/hmi_smallfunctions_2017-02-21.R View source: R/hmi_smallfunctions_2017-02-05.R View source: R/hmi_smallfunctions_2017-01-13.R View source: R/hmi_smallfunctions_2017-01-05.R View source: R/hmi_smallfunctions_2016-12-22_01.R View source: R/hmi_smallfunctions_2016-12-14_04.R View source: R/hmi_smallfunctions_2016-12-14_03.R View source: R/hmi_smallfunctions_2016-12-09_01.R View source: R/hmi_smallfunctions_2016-12-08_01.R

Description

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 (regardles whether they are observed precisly or presumably rounded).

Usage

1
negloglik2(para, X, y_in_negloglik, my_p, mean.log.inc, sd.log.inc)

Arguments

para

This is the vector Psi of parameters (see p. 62 in Drechsler, Kiesl & Speidel, 2015). With respect to them, the value returned by negloglik2 shall be maximized.
The starting values are c(kstart, betastart2, gammastart, sigmastart2) (the 6 treshholds (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).

X

the data.frame of covariates.

y_in_negloglik

the target variable (a vector).

my_p

This vector is the indicator of the (highes possible) rounding degree for an observation. This parameter comes directly from the data.

mean.log.inc

the scalar with the value of the mean of the logarithm of the target variable.

sd.log.inc

the scalar with the value equal to the standard deviation of the logarithm of the target variable.

Value

An integer equal to the (sum of the) negative log-likelihood contributions (of the observations)

References

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


matthiasspeidel/hmi documentation built on Aug. 18, 2020, 4:37 p.m.