Hello,
I am trying to calculate residuals for CJS model in R using markXXX.res file.
For one line I have observed value = 1 expected = 0.0000
Mark shows deviance residual = 0 for this point, but I can't get the same estimate using formula from Mark help:
Sign(Observed - Expected) Sqrt{2 [ Expected - Observed + Observed Log(Observed/Expected) ] / c-hat }
as it is not possible to divide by 0!
I assumed that the problem is caused by rounding while saving a file in Mark, so I tried assign some small (10^-20) positive random value instead of 0, but estimated residual will never become close to 0.
How does Mark estimate this value?
Does it affect Deviance estimation?
Is it a solution to assign deviance residual = 0 for cases where expected value = 0.0000 for my R function?
Thanks a lot!