-
Notifications
You must be signed in to change notification settings - Fork 23
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
Error: need at least two non-NA values to interpolate #286
Comments
... see discussion here: florianhartig/DHARMa#286
Hello James, I'm not Florian, but i am pretty sure that this is issue #195, which has been solved in current versions of the package. I've checked your example with 4.1 and it works just fine. P.S. I've done quite a bit of work on this project and i think PIT was a fantastic addition to it. |
Sorry to have addressed the issue to Florian; I appreciate your help too, and everyone in involved with the project! I'll close here and add some questions on #195 |
Hi @James-Thorson-NOAA - we can keep this closed, but just a clarification - can you confirm that the problem is solved with a newer version of DHARMa? |
Yes, I have just downloaded R 4.1.0 and DHARMa 0.4.1 and confirmed that the problem is not present. Thanks again. |
* Improve rotate_factors... ... to allow working with projected values of factors * small fix to plot_factors update... ... h/t Kristen Omori * fix bug with many extrapolation-grid cells with Area=0... ... this issue arises e.g. with Region = "Other" and h/t Ellen Yasumiishi for flagging the issue! the bug manifested in an uniformative error, so no change of previous users having untrustworthy results arising from it. * fix bug in last commit * update docs * improve docs * Enhance rotate_factors ... ... to work even when estimating a factor model where some factors have variance approaching zero. * fix a plotting bug in `plot_factors` ... ... that arose when plotting factor-model Omegas * fix to `plot_factors` when doing dual ordination * Fix summary.fit_model( ..., what="residuals") ... ... in response to #72, h/t Nicholas Ducharme-Barthe for reporting the bug (which threw an uninformative error) * Adding plots for spatially-varying catchability * improve panel-labels in density plots * add loc_s and latlon_s ... ... for potential future use in new feature for habitat-specific variance-covariance among variables * fix typo in last commit * fix typo in last commit * Change default colors for plots ... ... and add option to calculate subarea totals using Longitude for Region="eastern_bering_sea" * adding units package * update docs * adding amend_output ... ... which labels Report for use in subsequent plotting * Fix bug in fit_model ... ... caused during earlier push * Improve `amend_output` * Update plot_biomass_index ... ... to use metadata_ctz, and deprecate compatibility with MIST and SpatialDeltaGLMM * fix new bug in plot_biomass_index ... ... introduced a couple commits earlier in dev branch; also improve stability for DHARMa using PIT residuals * Continue to improve stability for DHARMa residuals ... ... see discussion here: florianhartig/DHARMa#286 * update plots * Change make_covariates ... ... to avoid passing unnecessarily large X_itp object, which exceeded R memory limits in some extreme cases * small update ... ... to deal with amend_output change where Density=0 such that log(Density) = -Inf, which was causing plotting problems * Update deprecated.R functions for old diagnostic plots ... ... to deal with case of not specifying explicit units * various updates to doxygen reference docs * Update deprecated.R * Update deprecated.R * fix DHARMa residuals when b_i=NA, and improve plot_data(.) to work with projargs * fix bug in dev-changes for project_coordinates * fix bugs in dev-branch for plot_data * improve DHARMa plots ... ... by removing useless p-values * fix dev-branch bug in plot_biomass_index ... ... which now requires `extrapolation_list` to pull appropriate units for plot * adding West Coast Groundfish combo survey ... ... to VAST shapefiles * small style-guide improvements * Improve default labelling in plots ... ... by calling `amend_output` within `plot_maps` * Avoid crash in `plot_maps` ... ... when asking to plot variable that is excluded from model * Fix annoying warnings about PROJ.4 * Eliminate (most) annoying warnings from PROJ.4 * small fixes .. ... to eliminate remaining PROJ.4 warnings, and fix plotting crash regarding contours in missing variables * small fix ... ... to allow for passing a color function `col` to `plot.fit_model` * remove dependency `plotKML` with `raster` h/t @Jason-Conner-NOAA for pointing out that `plotKML` was removed from CRAN * fix bug in last commit * Simplify plot_biomass_index ... ... by incorporating `amend_output` into function * fit issues in last committ ... ... such that amend_output is now responsible for handing units * adding units for mean_Z_ctm ... ... extracted using `sf` which is now a dependency * Fix use of units for range-shift metrics * fix bug in recent commit ... ... which caused `plot_maps` to not plot SEs properly by default * update docs * fix bug in amend_outputs ... ... regarding optional Report slot `mean_D_ctl` * update docs
Florian,
Thanks again for providing this wonderful package, and for addressing my previous comment regarding PIT residuals (#168)!
I coded VAST to use DHARMa by default, and in some cases have found an error resulting in the message
after exploration, it appears to occur when calling all
DHARMa::createDHARMa
when argumentsimulatedResponse
includes at least one row with all elements equal to 0. This of course could happen by change alone, and is not a property of PIT residuals per se, but I'm guessing occurs when smoothing thesimulatedResponse
values prior to calculating a quantile value for that row. As example, you could load this RData object to replicate the problem:where e.g. the problem goes away when jittering any single value in each row:
As I say, the problem is not intrinsic to PIT residuals, because the unsmoothed values can be used to calculate a quantile. Perhaps its worth giving users the option of turning off interpolation, or perhaps making that the default, to avoid this behavior? I'd be happy to brainstorm ideas on this thread if that's helpful.
The text was updated successfully, but these errors were encountered: