Hi Murray,
I have a quick query regarding missing individual covariate values and secr analysis.
On page 3 of the "Data input for secr" document, a line at the end of the second paragraph reads "Missing (individual covariate) values on a particular occasion may be indicated with 'NA', but each covariate must be scored at least once for each animal".
The documentation for the "housemouse" example - page 69 of the main manual states " The sex of two animals is not available (NA); it is necessary to drop these records for analyses using 'sex"'.
Finally, the documentation for the hcov function (page 61) notes " Missing values 'NA' are used for individuals of unknown class...It is assumed that the probability of recording a missing value for the class co variate is independent of the true class membership (eg. sex equally likely to be recorded for males and females".
I am attempting to analyze some capture-recapture data using the hcoc characterization for sex. I lack data for this covariates for some individuals. It is my understanding that the mixture model (hcov) will permit analysis without omitting these individuals from the capture history. Am I correct about this?
When I attempt to red in the input file:
capture_data = read.capthist (captfile = 'data.txt', trapfile = 'trapflag.txt', detector = 'proximity', covnames ='sex), R returns the following error "Error in read.capthist(captfile = "data.txt", : missing values not allowed"
I used the term 'NA' (without quotes) for individuals that have not been assigned to either gender in the capture file.
Is there a fundamental gap in my understanding of how missing individual covariates are treated in the hcov parametrization, or am I missing something obvious while reading in the these input data? Thank you for your time in advance.
Pranav