RMark version 3.0.0 on CRAN

posts related to the RMark library, which may not be of general interest to users of 'classic' MARK

RMark version 3.0.0 on CRAN

Postby jlaake » Mon Aug 15, 2022 11:06 am

Dear All-

It has been awhile since I released a new version of RMark on CRAN. I have been putting versions on my google drive to handle issues and add new models. I incremented the major version number because there are a few aspects that will no longer work and some defaults have been changed. If you have been using remove.unused=TRUE or reverse=TRUE or deleting design data to fix parameter values, these will no longer work in v3.0.0. All of these required deleting design data which was not the greatest idea I ever had. Instead of deleting design data, use fix in the design data to fix real parameters which are often 1 or 0 where you would have typically deleted design data like with a missing cohort of marks (eg, Phi=1 and p=0 for CJS - actually any fixed values should work because there would be no data for the cohort). Also I have set mlogit0=TRUE by default whereas it used to be FALSE by default.

Below is a complete listing of changes made since the last v2.2.7 on CRAN. Please let me know by posting to phidot if you encounter any problems.

RMark 3.0.0 (10 August 2022)

NEW FEATURES

* not exactly a new feature but the default value for mlogit0 argument to mark function is now TRUE and cannot be set to FALSE. This is a departure from previous versions and one of the reasons I incremented the major version number. This probably should have been set as TRUE all along because it will make the code faster because it pulls the fixed 0 mlogit values out of the mlogit sum. This change was brought about because of a problem identified by a user in the way MARK was calculating mlogit sums with fixed values (viewtopic.php?f=21&t=4255). MARK has been corrected but I think it wise to set mlogit0=TRUE anyhow because the execution time can be reduced substantially. Also, if you have many 0 mlogit values it can make large multistrata models use less memory because it reduces the number of real parameters through PIM simplification which is not possible if the mlogit fixed values are maintained in the mlogit sum.

* likewise, remove.unused=TRUE is no longer allowed and is forced to be FALSE. Also, I'm not allowing deletion of design data which in retrospect was a bad idea. While it can still work for some situations, deleting design data can cause problems with mlogit parameters which are summed over a set. The reason for deleting design data was to quickly set those parameter values to the default fixed values for any deleted design records. This is just as easily handled by using a fix value in the design data. In previous versions, I just warned the user about the problem but I think it best to simply remove this option. This is a departure from previous versions and one of the reasons I incremented the major version number. As a result, the argument reverse for multistrata models is no longer allowed because it required deleting design data.

BUG FIXES
* importing the binary file (markxxx.vcv) from MARK began to fail under R version 4 and above due to changes in R. Jim Hines very kindly provided the code in function readMarkVcv as a replacement for read.mark.binary. I modified slightly to include labels on derived parameters.

RMark 2.2.9 (13 Sept 2021)

NEW FEATURES

* added model MSJollySeber with example of simulated data courtesy of Gary White.

* added example of HidMarkov model courtesy of Chris Oosthuizen which he posted to phidot forum.

BUG FIXES
* in extract.mark.output a warning message started to appear with version R4.1.0 about specifying as.is in type.convert. This is now specified so the warning will no longer appear. This was not affecting any results.

* another problem occurred with R4.0 in compute.design.data for some models with parameters like pi in HidMarkov for the strata.labels. Previously R translated a number represented as a character as a number when used as an index. Presumably this no longer works. The value was wrapped in as.numeric to avoid the error. This also fixed the problem whereby use of subtract.stratum was not working for pi.

* code added for mata confidence intervals in model.average.marklist never worked for parameters other than the one listed first in the model because of incorrect indexing to vcv.real. It would thrown an error and stop. Thanks to Nathan Bendik for pointing out this error. Sorry it took me a year to get to it Nate.

* another issue Nate pointed out was that with mata=TRUE, confidence intervals could exceed 1 from covariate.predictions. This occurred because the code was using model.average.list which does not have any assumptions about links. The code in covariate.predictions was modified to compute mata intervals on the link space (as done in model.average.marklist) inside the function rather than with model.average.list.


RMark 2.2.8 (13 October 2020)

BUG FIXES
* extract.mark.output uses the readChar function which gives a warning message if an embedded NULL is encountered while reading starting with R4.0. Oddly, the documentation says that this should have occurred starting with >R2.8 but it is now just occurring with R4.0. I have suppressed the warnings since readChar values are not used.

* in v2.2.7 a check was added for an infinite variance-covariance element and abs was used which created error when it was infinite. Was in get.real, covariate.predictions and model.average.marklist. abs was removed.

* fix to example in utility.r for pop.est function (byrow=TRUE). Thanks to Sima Usvyatsov for finding and reporting the error.

* fix to Psi parameter in RDMultScalOcc which had too few PIM values.

* in version 2.2.2 a test was added for an identity design matrix in make.mark.model. The logical condition was not correctly specified and was causing large problems (mostly multistate models with lots of groups and occasions) to fail due to lack of memory. The error has been corrected here. Thanks to Ellen Robertson for bringing this to my attention.

* if all subtracted strata were the same in a multi-state model, this caused an error to occur in TransitionMatrix. This has been fixed.

CHANGES

* error trap added in make.mark.model which stops you from using share=TRUE with the fixed argument set because it will not work. An example is given to specify fixed in this case with shared parameters. This affected the crdms example.
jlaake
 
Posts: 1417
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: RMark version 3.0.0 on CRAN

Postby cooch » Mon Aug 15, 2022 12:26 pm

Congratulations to Jeff for pushing this out. And, a huge thanks I'm sure from everyone who uses RMark. Jeff's contribution in creating RMark can't be over-stated. Every RMark user owes Jeff at least a beer or two.

On the other hand, releasing a 'new and improved version' is clearly a ploy by Jeff to (i) create all sorts of things that work differently, or don't work at all, which (ii) will cause a huge pulse of questions on the RMark sub-forum, which will (iii) allow Jeff to pass me for the 'most posts' on this forum (currently 1580 or so for me to 1310 for Jeff), which (iv) clearly has been his motive all along. ;-)
cooch
 
Posts: 1628
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University

Re: RMark version 3.0.0 on CRAN

Postby jlaake » Mon Aug 15, 2022 1:48 pm

I sure hope it doesn't generate problems and I never want to surpass your number of posts. But thanks for your kind words. If I'm owed a beer, then Gary is owed a keg.
jlaake
 
Posts: 1417
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA


Return to RMark

Who is online

Users browsing this forum: No registered users and 11 guests

cron