Page 1 of 1

MATA: Error in vcv.real[result$par.index[i], result$par.inde

PostPosted: Tue Sep 01, 2020 3:25 pm
by Eurycea
I was wondering if you could help decipher an error message. I am attempting to model average using MATA with the following code:

Code: Select all
model.average(final_models,parameter="GammaPrime",vcv=T,mata=T)


And it throws the error:

Code: Select all
Error in vcv.real[result$par.index[i], result$par.index[i]] :
  subscript out of bounds


The error only occurs when both vcv and mata are TRUE. If vcv=F it works fine, and if mata=F and vcv=T it works fine.

I get the same error for GammaDoublePrime. However, this works fine for S.

Thanks!

Re: MATA: Error in vcv.real[result$par.index[i], result$par.

PostPosted: Tue Sep 01, 2020 3:29 pm
by jlaake
Obviously a bug. Please use save function in R to save final_models into a .rda file and send to me and I'll have to debug it. Have you been using the argument external=TRUE? If so, I need all the .rda model files as well. My email address is jefflaake@gmail.com.

--jeff

Re: MATA: Error in vcv.real[result$par.index[i], result$par.

PostPosted: Tue Sep 22, 2020 2:31 pm
by Eurycea
Upon further exploration, I have also tried the covariate.predictions function. With mata=TRUE, I will sometimes get upper confidence limits above 1.00. Was wondering why my error bars weren't plotting correctly... :D Not sure if this is a feature of MATA (doesn't seem like it after reading the paper) or a bug. Thanks!