RMark v2.1.8 and new MARK

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

RMark v2.1.8 and new MARK

Postby jlaake » Fri Jun 27, 2014 11:02 am

V2.1.8 of RMark was posted on CRAN. Below are listed the changes in that version. Note that it does NOT contain the changes for the new version of MARK that was just released. I wanted to release a version with these changes for those that did not update to the new MARK. I have put the start of V2.1.9 on my github site (https://drive.google.com/folderview?id=0B77g1ScdUwVeOVJNUVVGS0YtWE0#).
If you do update to MARK 8.0, download 2.1.9 and use from the R menu, Packages/Install from Local Zip and browse to the downloaded zip file. V2.1.9 contains the changes to switch from N to f0 for models in which N is in the likelihood for closed and robust models. The only change was to use f0 in place of N in the parameters.txt file which is stored in the directory for RMark in your R library.


RMark 2.1.8 (26 June 2014)
--------------------------
NEW FEATURES
* A new return value was added to covariate.predictions which provides for each model a dataframe with the estimates and std errors for that model. Also, warnings are issued for parameters that have a negative or 0 variance. Those with a negative variance are set to 0. This same behavior was added to model.average.list.
* Time intervals are checked for robust design to make sure there are at least 2 secondary occasions per primary session.

CHANGES
* Modified get.real to remove par.index and model.index from design data before appending to estimates to avoid multiple field names with same name/value
* Modified covariate.predictions to use model.average.list instead of its own code for model averaging which until now was not using the revised estimator for model averaged std error; this added arguments to covariate.predictions for model.average.list. Also, it issues informative errors about which parameters have negative std errors. Previously these were being set to 0 which caused problem with model average correlation matrix and caused these parameters to have lcl=ucl. This behavior has been fixed. This was only a problem with drop=FALSE.
* mata.wald code was modified to allow se=0; previously it was testing se<=0 instead of se<0 for a negative se.
* If a variable assigned to groups argument is not a factor variable, a warning message is given and then it is coerced to factor. Previously the code would stop.
* If mark.exe fails the output file will be opened in MarkViewer (typically notepad) so the user can view the output file to discern the problem.
* Replaced cat function with message so user can suppress messages if they wish. Thanks to Roman Lustrik for the suggestion.
* If mlogit0=TRUE, any non-zero fixed mlogit parameter will now also be changed to logit. Previously this was only done with fixed 0 values.

BUG FIXES
* If digits were greater than 7 for continuous covariate in the data that was used in the formula, make.mark.model could fail when accumulating records. Unless accumulate=FALSE, records that have same capture history and covariates are collapsed into a single record and the frequency of the records with the same value is used for each group if any. This is done by pasting all the values which uses options()$digits in converting from numeric to character. The code was also using unique function on the data frame and this produced a different number of records due to extra precision and the code would fail. This has been fixed but it is important to understand that the value of options()$digits controls the amount of accumulation with numeric covariates. Thanks to Rebecca Reeves for reporting this problem. Covariates rarely have that many digits but this occurred for Rebecca in copying data from Excel. One can always set accumulate=FALSE if there is a concern about this.
* In v2.1.6 a bug was introduced to model.average.list when the revised variance formula was added. When only std errors were provided instead of var-cov matrix, the se was not being pulled from x. The code should have failed unless you had a variable named se in your workspace. Thanks to Mark Herzog for tracking this down and reporting it.
* In model.average.list, if an estimated variance is negative it has always been set to 0, but now in constructing model averaged v-c matrix, the correlations with other parameters are set to 0 so infinite values are avoided when dividing by zero to construct correlation matrix. This had already been done in model.average.marklist but was missed in coding model.average.list.
* If non-zero fixed values were specified for mlogit parameters, the code in compute.real did not correctly compute the real parameter values. This has been corrected. Beware that MARK does not always ensure non-negative probabilities for the subtracted probabilities when fixing non-zero mlogit values with either setting of mlogit0. Thanks to Torbjorn Ergon for reporting this problem.
* Corrected first 3 codes in MarkModels.pdf to reflect correct value for model argument. Thanks to Mike Conroy for pointing out problem. The first 3 use a name other than what MARK uses. What was previously listed was the code in MARK which corresponds to RMark other than those first 3.
* Function make.mark.model was modified to avoid appending time intervals together in the .inp file when there were many intervals or data was too long and spanned lines. This caused an error in MARK. Thanks to Thierry Chambert for finding and reporting this.
jlaake
 
Posts: 1480
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 1 guest