NA in likelihood calculations

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

NA in likelihood calculations

Postby jheiniger » Tue Nov 28, 2017 1:01 am

Hello,

I have a multi-year, multi-season northern quoll trapping data set. Each year includes three trapping sessions and around 22 occasions for each session (however this does vary slightly).

To begin with, I am running simple single session SCR models for one year. The model runs fine for one session but for the other two I am getting NAs. The output is:

> fmaskpre<-make.mask(traps(fpre), buffer= 4 * initialsigmaqfpre, spacing=10, type= "trapbuffer", poly= quollarea)
> fit.HNpref<-secr.fit(fpre, detectfn = "HN", mask=fmaskpre)
Checking data
Preparing detection design matrices
Preparing density design matrix
Finding initial parameter values...
Initial values D = 0.29225, g0 = 0.13642, sigma = 110.3693
Maximizing likelihood...
Eval Loglik D g0 sigma
1 NA -1.2301 -1.8454 4.7038
2 NA -1.2301 -1.8454 4.7038
3 NA -1.2301 -1.8454 4.7038
4 NA -1.2301 -1.8454 4.7038
5 NA -1.2301 -1.8454 4.7038
6 NA -1.2300 -1.8454 4.7038
7 NA -1.2301 -1.8453 4.7038
8 NA -1.2301 -1.8454 4.7043
9 NA -1.2299 -1.8454 4.7038
10 NA -1.2300 -1.8453 4.7038
11 NA -1.2300 -1.8454 4.7043
12 NA -1.2301 -1.8452 4.7038
13 NA -1.2301 -1.8453 4.7043
14 NA -1.2301 -1.8454 4.7048
Completed in 395.47 seconds at 14:15:13 28 Nov 2017

Detector type single
Detector number 200
Average spacing 59.77485 m
x-range 652481.6 654025.7 m
y-range 8468958 8470848 m
N animals : 40
N detections : 187
N occasions : 23
Mask area : 370.37 ha

As suggested in another post I tried included starting values for density, g0 and sigma but I got the same result. I have a mask and have tried variations to buffer width, starting values and detection functions but no success. All my data is formatted the same way and I have had success for all three sessions using the following year. I have double checked my data many many times so I am hoping it is not a silly human error. I am completely stumped and any help or guidance would be very much appreciated.

Thank-you!
Jaime
jheiniger
 
Posts: 2
Joined: Sun Nov 26, 2017 9:05 pm

Re: NA in likelihood calculations

Postby murray.efford » Tue Nov 28, 2017 3:27 am

Hello Jaime
I can't spot anything wrong with the code so I guess it is something odd about the data. I'll look at it if you want to send me a copy offline. I assume you have plotted each session's data over the mask, and that are using the current version of 'secr'.
Murray
murray.efford
 
Posts: 523
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Re: NA in likelihood calculations

Postby jheiniger » Tue Nov 28, 2017 7:10 pm

Hi Murray,

Thank-you so much for your quick reply! You are correct, I have plotted the session over the mask and cannot find any issues, and I am using the latest version of 'secr'. Thank-you for offering to look over the data, I will send a copy now.

Cheers,
Jaime
jheiniger
 
Posts: 2
Joined: Sun Nov 26, 2017 9:05 pm

Re: NA in likelihood calculations

Postby murray.efford » Tue Nov 28, 2017 10:52 pm

For the record - we found some bugs in Jaime's data (captures at 'unused' detectors) and a bug in the verify function that meant these errors were not noticed sooner.
Murray
murray.efford
 
Posts: 523
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand


Return to analysis help

Who is online

Users browsing this forum: No registered users and 1 guest