Deviance residual estimation

questions concerning analysis/theory using program MARK

Deviance residual estimation

Postby Eldar » Fri Nov 19, 2010 4:33 pm

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!
Eldar
 
Posts: 56
Joined: Fri Nov 19, 2010 4:03 pm
Location: Amsterdam

Re: Deviance residual estimation

Postby cooch » Sat Nov 20, 2010 6:24 pm

Eldar wrote: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


As I recall, you can't generated an expected value of 0 if the observed is >0, so either you're misreading the file, or something else is amiss.
cooch
 
Posts: 1654
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University

Re: Deviance residual estimation

Postby Eldar » Sun Nov 21, 2010 3:42 pm

Hallo Evan,
I've checked this point in Mark option at the Deviance residuals plot - the values are the same:
obs. value: 1
exp. value: 0.0000
res. value: 0.0000

The problem is still there with the simplest Phi(.) p(.) CJS model
The encounter history that causes the problem is very unlikely to happen: I calculated expected value by hand and it is less than 0.0001.
I think that the problem is caused by rounding error: Mark takes only 4 decimal digits and in this case all of them are 0s..

What will be the best solution to solve the problem?
Does it affect Deviance estimation?

Thanks!
Eldar
 
Posts: 56
Joined: Fri Nov 19, 2010 4:03 pm
Location: Amsterdam


Return to analysis help

Who is online

Users browsing this forum: No registered users and 3 guests