b-steve / ascr

Acoustic spatial capture-recapture
11 stars 7 forks source link

bootstrap Monte Carlo estimates #4

Open dill opened 7 years ago

dill commented 7 years ago

I'm coming up against a weird error when calculating the Monte Carlo error with the bootstrap with my weird data set... I have a hypothesis but want to check with you...

The error seems to occur here in boot.ascr.

Error in res[mce.boot, i] : no 'dimnames' attribute for array

where i is the parameter that we want to look at. The error is usually generated when a character vector is used to subset an data.frame.

Two thoughts:

  1. Is it possible that the par.names vector that stores the coeficient names doesn't match up with what's in res? Perhaps in that case it's worth putting a check in that for loop and throwing some NAs in if there is not a match?
  2. Is it just the case that sometimes res doesn't get the column names that it needs?

Maybe that doesn't make sense? Thoughts?

a-filer commented 2 years ago

Hi, did you ever find/engineer a solution to this problem? I am experiencing something similar when running some of my data, and am not sure of the best way to go about fixing it.