Error with missing data

61 views
Skip to first unread message

Desiree Narango

unread,
Nov 24, 2014, 10:31:36 AM11/24/14
to spacec...@googlegroups.com
I'd like to estimate animal densities from camera trap data at several sites. Typically, at least one animal is caught on each deployment. However, at two sites, several camera locations had no animal captures at all. When I input an 'animal capture details file' that has just animal captures I got on the cameras I get the following error: 

"In addition: Warning messages:
1: In mean.default(mdm) : argument is not numeric or logical: returning NA
2: In rnorm(1, sigma, mmdm/4) : NAs produced"

However, If I make up data so that each location has at least one animal capture, the model runs fine. So it seems like the problem is that some cameras have no data. It seems to me that camera locations that get no animals is essential in the model. Am I formatting this incorrectly? Thanks in advance, 

Desiree 

Arjun Gopalaswamy

unread,
Nov 24, 2014, 10:45:26 AM11/24/14
to dnar...@gmail.com, spacec...@googlegroups.com
Hi Desiree:

Are you referring to each camera trap station as a site? SPACECAP does not require that you get at least one capture at each location.
I am afraid, I probably have not understood your question fully enough to answer your query. Could you share more details please?

Regards
Arjun

Desiree Narango

unread,
Nov 24, 2014, 12:50:10 PM11/24/14
to spacec...@googlegroups.com, dnar...@gmail.com
Hi Arjun, 

Sorry for the confusion. No, ignore the site comment. I have data with 6-8 camera locations in a ~1.0 km-radius. SPACECAP is giving me the the above error when I try to run the analysis. The sites (which I ran separately) where each camera location had at least one animal capture ran fine. The animal file is formatted so that it only has the animals that were captured, without any info on the cameras that did not get animals, which is what I understand to be the correct format. So I'm not sure what the error is referring to. 

Desiree
ss_animalcapture.csv

ravishankar.cws

unread,
Nov 24, 2014, 10:33:46 PM11/24/14
to spacec...@googlegroups.com, dnar...@gmail.com

Your capture file has a problem. There is no information regarding animal with ID 3. The animal Ids are expected to be continuous.


thanks and regards
ravi

Desiree Narango

unread,
Nov 25, 2014, 7:55:06 AM11/25/14
to spacec...@googlegroups.com, dnar...@gmail.com
Thanks Arjun and Ravi, 
The error that you pointed out has been fixed, but it still gives me an error.  
"Error in if (sigmac > 0) { : missing value where TRUE/FALSE needed
In addition: Warning messages:
1: In mean.default(mdm) : argument is not numeric or logical: returning NA
2: In rnorm(1, sigma, mmdm/4) : NAs produced"

This is a subset of a much larger dataset that hasn't been coded yet. 

Arjun Gopalaswamy

unread,
Nov 25, 2014, 9:35:01 AM11/25/14
to dnar...@gmail.com, spacec...@googlegroups.com
Hi Desiree:

It may be worth trying with the larger dataset first. If there is no problem with that, then we will know if it is a larger data organization problem or whether it is because of an extremely low sample size.

Arjun
Reply all
Reply to author
Forward
0 new messages