-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential bug when using Pred_TF and covariates #304
Comments
Oops I forgot to attach the code. Here it is:
|
Thanks for reaching out! My suspicion as you say is that these two runs are doing a different job "behind the scenes" in interpolating the covariates provided by I hope to organize a meeting of us four so we can discuss what you think the intended default behavior should be. This doesn't appear to be a bug in the sense of having a typo in the code, but I guess the point is that VAST isn't doing what you're expecting, so there's some issue of default behavior and/or documentation. |
@zoyafuso-NOAA discovered some strange behavior when trying to do a simulation, he and @Lewis-Barnett-NOAA and I have been digging into it a bit.
We're convinced there's a bug. Below is a reproducible example. Their goal is to take a set of data and add on a set of points at which to make predictions with the simulation feature. But these aren't real data hence the use of Pred_TF=1 for these points.
Let model 'orig' be fit just to the real data, and model 'pred' fit to the same data with the predictive points appended to the data and covariate_data. We expect the model fits to be identical.
However they are not in the case that:
In this case the JNLL and MLEs are identical, but the index is different. I was able to track the difference down as far as
eta2_gtp
which is calculated like thisSince
gamma
is identical (it's a parameter), andXi2_gcp
are the same, it must be a difference in theX2_gctp
variables. I don't think those are saved in the Report. I suspect this is related to how covariates are extrapolated and such but don't really understand that part well.I see two related issues here. (1) Why does adding out-of-sample data change the index? (2) Why is it even possible to use a
covariate_data
input that has fewer rows than the main inputs (n_i)? And why does that resolve this index difference? What values does it use for the predictive points? @James-Thorson-NOAA Do you have any ideas why this might occur? You can run the code below to reproduce.To get models orig and pred to match, either drop the covariate or use
covdat_orig
for the covariate_data for the pred model. Or drop the jittering of longitude. All three actions result in identical models.The text was updated successfully, but these errors were encountered: