I was trying to calculate the mean of some of my Phi estimates from a CJS model using variance components, and while I read through the instructions time and time again, I cannot for the life of me figure out why my code isn't working. I have tried fixing the upper limit, as the error suggests, and it still isn't working. Any feedback would be amazing! Here is my code:
- Code: Select all
global$results$AICc
zz=get.real(global,"Phi",vcv=TRUE)
z=zz$estimates$estimate[c(1,3,5,7,9,11,12)]
vcv=zz$vcv.real[c(1,3,5,7,9,11,12), c(1,3,5,7,9,11,12)]
varc=var.components(z,design=matrix(rep(1,length(z)),ncol=1),vcv, alpha = 0.05, upper = 10 * max(vcv))
Everything looks great up until the last row, where I get the error:
Error in var.components(z, design = matrix(rep(1, length(z)), ncol = 1), :
root still could not be found with increased limits; try increasing upper limit by more than a factor of 2
I have double checked that the vcv matrix "vcv" has the same number of rows as the vector containing the real estimates "z," and that my "design" matrix has the same number of rows as well. I followed the example given with the dipper data, which I can get to work in R, but can't get my own data to run.
Help! Thank you so much!
- Rebekah