Open lachlanfrancis opened 5 years ago
I have revisited my code for the pairwise function today, and found that the quotation marks I enter in VORTEX simulation name are no longer in the scenario names after collation. That settles the above error, but brings a new error.
pairw.PVA.sp <- pairwise(data=PVA.sp, project="Species.PVA", scenario="PVA base-case", params="Nall", yrs=c(10,25,50), ST=FALSE, type = NA, group.mean = FALSE, SVs = NA, save2disk=FALSE)
Error in ratings.rank[, i] : incorrect number of dimensions
I have also checked over the help file and reviewed the arguments and believe they are all OK now. Is there anything you could suggest which may resolve this?
Hi Carlo, I have managed to get the scenarios to run by duplicating my management scenario, so in total there are three scenarios (so pairwise has two and the base scenario). I figure the problem was not enough scenarios for pairwise. I'm not sure how many times there will only be two simulations being investigated, but I assume a new function would be required to just compare between two simulations (one and a base scenario)? Cheers.
Hi Lachlanfrancis, thanks for the detailed report and for providing the test files. The reason why the pairwise function doesn't work in your case is because the function carries out a statistical test (Kendall test) for ranking consistency across raters. As you have correctly worked out, because you only have on scenario (in addition to the base scenario) there is nothing to rank and the statistical test fails. I agree that a more informative error message would helpful here, or even better, an internal check as to whether there is only one scenario, in which case the function skips that statistical test, could be desirable (for those users that are interested in obtaining CVs). I'll mark this as an enhancement for the successive versions.
Note that if you are only interested in SSMD, the function SSMD_matrix
would work in your case:
SSDM.PVA.sp <- SSMD_matrix(data=sp.pva, project="Species.PVA", scenario="PVA base-case",
params="Nall", yrs=c(10,25,50), ST=FALSE, save2disk=FALSE)
Cheers, carlo
Hi. I am using your package for some PVA analyses from Vortex (version 10.2.17.0). I have completed tests on the Vortex sensitivity testing output analyses as per vignette which works perfectly. Now I'm testing between two management scenarios, using two different Vortex simulations. Data collates without issue, plots without issue, but when running pairwise function it comes up with an error:
Do you have any ideas if I'm doing anything wrong (I'm new to Vortex and R)? I've attached the
Output .dat
files from Vortex, and copied in my R code and session information below. (.dat files renamed to .txt to allow attachment)Species PVA_PVA 'management'.dat.txt Species PVA_PVA 'base-case'.dat.txt
Here's my session information too.