file export

questions concerning anlysis/theory using program DENSITY and R package secr. Focus on spatially-explicit analysis.

file export

Postby tasha » Sun Apr 04, 2010 11:51 pm

Hello,
I have been using program DENSITY 4.4 (on microsoft XP) for a little while and am now trying to export my data files into the robust design for program MARK formatting. However, when I select the export capture histories from the drop-down menu and select All sessions(robust design) nothing happens. When I select the Current session(closed population) this works and I get the prompt on where to save the file, same with when I choose the All sessions(open population). My question is.. do I have to check a box or do anything else before the robust design will work? I have four trapping sessions each with 5 trapping occasions in my data and the robust design formatting would be very helpful.

Thank-you so much for your time and any advice.
cheers,
tasha
tasha
 
Posts: 19
Joined: Thu Apr 01, 2010 9:37 pm

Re: file export

Postby murray.efford » Mon Apr 05, 2010 6:07 am

Tasha
I think you stumbled on a bug in the interface that got fixed some time in the last few months (although I can't remember doing it!). I have just put a new version of Density on the website. It's barely different to the last one, but as far as I can tell this feature is working. I suggest you download 4.4.5 and try again. Please let me know if the problem persists.
Murray
murray.efford
 
Posts: 507
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Re: file export

Postby tasha » Mon Apr 05, 2010 12:17 pm

Thank-you, Murray. Version 4.4.5 does work for the robust design export!

If I could ask another quick question.... I've been using the Monte Carlo GOF test in the ML SECR options of DENSITY 4.4 with the Null model estimator and keep getting quite a few error messages saying "Access violation at address 00406709 in module 'density4.exe'. Read of address 00000002." The numbers in the error message are slightly different each time and I can't seem to find anywhere in the density help files or online which might help explain this message. For an example, in one of my sessions that this error occurred, I have 34 individual animals with 86 captures and 52 recaptures.... is there maybe not enough data here to run this type of analysis? Or is there anything I can fix when I receive this error message?

Thanks again for your time.
Cheers,
tasha
tasha
 
Posts: 19
Joined: Thu Apr 01, 2010 9:37 pm

Goodness of fit

Postby murray.efford » Mon Apr 05, 2010 6:14 pm

I'm glad 4.4.5 is working. Regarding access violations in the Monte Carlo GOF test in Density: such errors almost always indicate bad handling of memory in the program, but give no clue as to just where it is happening. You could reasonably ask 'Who programmed this rubbish?' And I ask myself 'Why did you forget to disable that option?' Unfortunately I'm unlikely to find time to fix it soon. The equivalent in 'secr' is in the function 'sim.secr' - that works (or if it doesn't, I'll get right onto it), but do see the answer to FAQ Tech question No. 6:

"6. How do I calculate the goodness-of-fit of an SECR model?
In principle, one may perform a parametric bootstrap on the deviance or the deviance divided by the residual degrees of freedom. See the help page for sim.secr for an example of how to do this in secr. There are major drawbacks to this ‘obvious’ method – it can take an extremely long time (depending on the bootstrap sample size), and it’s not established that this is a sensitive or meaningful test, given the inherent sparseness of spatial capture histories. For those of you with a MARK background: there is no established method in SECR for estimating overdispersion (c-hat) and hence calculating QAIC for multi-model inference. We’re hoping these issues will catch the attention of a creative statistician!"

Note my doubts about the usefulness of such tests, and my frustration at the slowness of progress in this area.
Murray
murray.efford
 
Posts: 507
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Re: file export

Postby tasha » Mon Apr 05, 2010 6:44 pm

Thanks for your reply. I will look into the sim.secr option.

Thanks again for your help, it is greatly appreciated.
Take care,
tasha
tasha
 
Posts: 19
Joined: Thu Apr 01, 2010 9:37 pm

Re: file export

Postby jeff.stetz » Fri Apr 07, 2017 2:24 pm

Hi group. A follow-up to the secr.test posts. I've been trying to use this to look at GoF, but am receiving the following error with the code below:

> bothfn <- function(fit4100.BBmales3_2004.F) {
+ CH <- fit4100.BBmales3_2004.F$BBmale2004CH_3new
+ f1 <- sum(apply(abs(CH) > 0, 1, sum) == 1) / nrow(CH)
+ devdf <- deviance(object) / df.residual(object)
+ c(f1 = f1, devdf = devdf)
+ }
>
> gnp_bb_m3_gof <- secr.test (fit4100.BBmales3_2004.F, nsim = 20, statfn = bothfn, fit = TRUE)
sim.secr fitting replicate 1 ...
...
sim.secr fitting replicate 20 ...
Error in abs(CH) : non-numeric argument to mathematical function
Calls: secr.test -> summarise -> statfn -> apply
Execution halted

Due to how long it takes to run the simulations, I've used a small number (nsim = 20) just to get started (ie, to see if it even runs before committing days/weeks to the run). The simulations appear to have run without issue. What obvious thing am I missing this time?

Thanks as always.
jeff.stetz
 
Posts: 3
Joined: Wed May 30, 2012 12:55 pm

Re: file export

Postby murray.efford » Fri Apr 07, 2017 3:58 pm

Hi Jeff
You are using fit = TRUE so statfn has to accept a fitted model (class 'secr') whereas you seem to treat it as a capthist object. You should write statfn to accept a generic object of that class (I mean 'secr') (the specific name fit4100.BBmales3_2004.F just confuses things).
Murray
P.S. I think after 7 years, and for a different topic, we could probably afford to start a new thread, or maybe you were hoping to hide this!
murray.efford
 
Posts: 507
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand


Return to analysis help

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron