'Log' design matrix function

questions concerning analysis/theory using program MARK

'Log' design matrix function

Postby geoffwah » Wed Mar 25, 2009 3:27 am

Hi All

Just a quick query. What does MARK do when one is using the 'Log' design matrix function to transform an individual covariate, and the covariate has zero values?

I've just run and occupancy analysis with the above scenario, and didn't have any problems....

Much appreciate any advice.

Regards

Geoff
geoffwah
 
Posts: 28
Joined: Tue Aug 28, 2007 8:47 pm
Location: Melbourne, Australia

\'Log\' design matrix function

Postby gwhite » Wed Mar 25, 2009 9:25 am

Geoff:
The exact code is:

LOG(MAX(MINLOG,X(1)))

where MINLOG was equal to 1.E-200, but I just changed it to 1.E-300 in the latest update put on the web. The change was made because for REALLY large analyses, you can get probabilities from certain encounter histories that were smaller than 1.E-200. Changing the value of MINLOG helps this problem, although there can still be problems.

A value of MINLOG smaller than 1.E-300 causes numerical errors.

Gary
gwhite
 
Posts: 340
Joined: Fri May 16, 2003 9:05 am

'Log' design matrix function

Postby geoffwah » Thu Mar 26, 2009 12:45 am

Hi Gary

Much thanks for this information. I'm afraid however, that I don't quite follow! Would you mind expanding on the code?

Apologies

Geoff
geoffwah
 
Posts: 28
Joined: Tue Aug 28, 2007 8:47 pm
Location: Melbourne, Australia

Re: 'Log' design matrix function

Postby cooch » Thu Mar 26, 2009 7:09 am

geoffwah wrote:Hi Gary

Much thanks for this information. I'm afraid however, that I don't quite follow! Would you mind expanding on the code?

Apologies

Geoff


Look at the code (even if you don't 'do FORTRAN'), it relatively straightforward:

LOG(MAX(MINLOG,X(1)))

It looks at the value (X), compares it with MINLOG (which is set internally as a constant), and then takes the log of whichever is the larger of the two. If the value of X is 0, then MINLOG will be larger. MINLOG is set to a very small number (1.E-300; about as close to zero as you might want, without being 0), but is not zero, so that LOG(MINLOG) is defined.

In other words, if X=0, then you 'trick' things by substituting a value that is really close to 0.
cooch
 
Posts: 1654
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University

'Log' design matrix function

Postby geoffwah » Thu Mar 26, 2009 5:59 pm

Ahh I see! Much thanks for the explanation Evan.

Cheers

Geoff
geoffwah
 
Posts: 28
Joined: Tue Aug 28, 2007 8:47 pm
Location: Melbourne, Australia

Re: 'Log' design matrix function

Postby cooch » Thu Mar 26, 2009 7:57 pm

geoffwah wrote:Ahh I see! Much thanks for the explanation Evan.

Cheers

Geoff


You're welcome.
cooch
 
Posts: 1654
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University


Return to analysis help

Who is online

Users browsing this forum: No registered users and 4 guests