Skip to content

Commit

Permalink
v3.5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoBosh committed Jan 14, 2024
1 parent 5b9807c commit fbe1aca
Show file tree
Hide file tree
Showing 28 changed files with 295 additions and 142 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ README_devel.md
^sav[0-9]*[.]Rhistory
^\.github$
^codecov\.yml$
.rsync_exclude
13 changes: 9 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: Countr
Type: Package
Title: Flexible Univariate Count Models Based on Renewal Processes
Version: 3.5.6.9000
Version: 3.5.8
Authors@R: c( person(given = "Tarak", family = "Kharrat",
role = c("aut"),
email = "tarak@realanalytics.co.uk"),
Expand All @@ -13,6 +13,10 @@ Description: Flexible univariate count models based on renewal processes. The
syntax as in glm() and package 'flexsurv'. The methodology is described by
Kharrat et all (2019) <doi:10.18637/jss.v090.i13> (included as vignette
'Countr_guide' in the package).
If the suggested package 'pscl' is not available from CRAN, it can be
installed with 'remotes::install_github("cran/pscl")'. It is no longer used
by the functions in this package but is needed for some of the extended
examples.
License: GPL (>= 2)
URL: https://geobosh.github.io/Countr/ (doc), https://github.com/GeoBosh/Countr (devel)
BugReports: https://github.com/GeoBosh/Countr/issues
Expand All @@ -35,17 +39,17 @@ Imports:
RColorBrewer,
dplyr,
standardize,
pscl,
lmtest,
xtable
LinkingTo: Rcpp, RcppArmadillo
Suggests:
testthat,
knitr
knitr,
pscl
RdMacros: Rdpack
VignetteBuilder: knitr
LazyData: true
RoxygenNote: 7.2.1
RoxygenNote: 7.2.3
NeedsCompilation: yes
Collate:
'Countr-package.R'
Expand All @@ -58,6 +62,7 @@ Collate:
'dWeibull.R'
'dWeibullgamma.R'
'data.R'
'probpredict.R'
'renewal_IV.R'
'renewal_tools.R'
'renewal_cstr.R'
Expand Down
8 changes: 6 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ S3method(nobs,renewal)
S3method(predict,renewal)
S3method(print,renewal)
S3method(print,summary.renewal)
S3method(prob_predict,glm)
S3method(renewalCoef,default)
S3method(renewalCoef,glm)
S3method(renewalCoef,renewalCoefList)
Expand Down Expand Up @@ -49,6 +50,7 @@ export(evWeibullCount)
export(evWeibullgammaCount)
export(frequency_plot)
export(getParNames)
export(prob_predict)
export(renewal)
export(renewal.control)
export(renewal.convPars)
Expand All @@ -64,7 +66,6 @@ export(surv)
import(Formula)
import(Matrix)
import(Rcpp)
import(dplyr)
import(flexsurv)
import(optimx)
importFrom(MASS,ginv)
Expand All @@ -76,13 +77,15 @@ importFrom(VGAM,logit)
importFrom(VGAM,probit)
importFrom(boot,boot)
importFrom(car,Boot)
importFrom(dplyr,contains)
importFrom(dplyr,groups)
importFrom(dplyr,left_join)
importFrom(graphics,par)
importFrom(graphics,plot)
importFrom(lattice,barchart)
importFrom(lmtest,lrtest)
importFrom(numDeriv,hessian)
importFrom(numDeriv,jacobian)
importFrom(pscl,predprob)
importFrom(standardize,standardize)
importFrom(stats,AIC)
importFrom(stats,as.formula)
Expand All @@ -92,6 +95,7 @@ importFrom(stats,confint.default)
importFrom(stats,density)
importFrom(stats,dnbinom)
importFrom(stats,dpois)
importFrom(stats,family)
importFrom(stats,formula)
importFrom(stats,getCall)
importFrom(stats,glm.fit)
Expand Down
80 changes: 49 additions & 31 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
# Countr 3.5.6 (CRAN)
# Countr 3.5.8

- This is an emergency release to keep the package on CRAN in case the scheduled
archival of package 'pscl' happens.

# Countr 3.5.7

- a missing '@' symbol had caused roxygen to generate items for 'inheritParams'
in the arguments section of a couple of Rd files.

- fixed new warnings from the C++ compiler like ' RcppExports.cpp:528:18:
warning: format string is not a string literal (potentially insecure)
[-Wformat-security]'.

- now import selectively from 'dplyr'. Also, see the 'todo' note in
'Countr-package.R'.


# Countr 3.5.6

- several documentation files had duplicated descriptions of some arguments.

Expand All @@ -10,21 +28,21 @@
- switched from travisci to github actions.


# Countr 3.5.5 (CRAN)
# Countr 3.5.5

- changed maintainer.

- fixed a doi reference in DESCRIPTION to be in proper format.


# Countr 3.5.4 (CRAN)
# Countr 3.5.4

- fixed wrong links in inst/doc/index.html.


# Countr 3.5.3
# Countr 3.5.3 (not on CRAN)

- consolidation after the refactoring of the reposotory.
- consolidation after the refactoring of the repository.

- created pkgdown website.

Expand All @@ -36,7 +54,7 @@
JSS paper.


# Countr 3.5.2 (CRAN)
# Countr 3.5.2

- small adjustments before submission.

Expand All @@ -45,105 +63,105 @@
- updated the main vignette with the accepted version of the JSS paper.


# Countr 3.5.0
# Countr 3.5.0 (not on CRAN)

- now covariates for ancilliary parameters for the renewal regression model can
be specified as part of argument 'formula'. This uses the extended formulas
provided by package `Formula`. The syntax with argument `anc` remains
available.

# Countr 3.4.3
# Countr 3.4.3 (not on CRAN)
- dealt with warnigs from the compiler about unused variables (and a few
others).
- When there is no precomputed bootstrap sample in the object,
`se.coef.renewal()` now prints a slightly more informative message without
raising a warning.

# Countr 3.4.2
# Countr 3.4.2 (not on CRAN)
- fixed the url's in the references for the vignettes in REFERENCES.bib.

# Countr 3.4.1 (2017-11-20)
# Countr 3.4.1 (CRAN 2017-11-20)
- bugs fixed in convolution methods.
- option added to rescale covariates (standardise, standardise_scale).
- new vignettes added + many examples with different datasets fitted.
- Bibtex entries for citation of the vignettes added to REFERENCES.bib.
- numerous small improvements throughout the package.

# Countr 3.3.1
# Countr 3.3.1 (not on CRAN)
- new `type = "prob"` for residuals - changes in `residuals.renewal`,
`.objectiveFunction` and `renewal()`. Comments and asome examples are
temporarily put in the documentation of `renewal()`.
- new argument 'log' for `.objectiveFunction()`. It is now passed on to
probability computing functions to specify whether logged values are required
when `summa = FALSE`.

# Countr 3.3.0
# Countr 3.3.0 (not on CRAN)
- first changes on bitbucket.

# Countr 3.2.8 (2016-12-20)
# Countr 3.2.8 (CRAN 2016-12-20)
- the call in the printout of renewal objects (and `summary()`) could be very
wide (annoying in Sweave output), now `print.renewal()` and
`print.summary.renewal()` obey 'width' when possible (see helper function
`.deparseCall()`).
- bugs corrected in `print.summary.renewal()` when failure to compute variance
or residuals.

# Countr 3.2.7 (2016-10-06)
# Countr 3.2.7 (CRAN 2016-10-06)
- fixed some bugs in printing methods.
- added a jss_paper vignette.

# Countr 3.2.6 (2016-09-14)
# Countr 3.2.6 (CRAN 2016-09-14)

# Countr 3.2.4
# Countr 3.2.4 (not on CRAN)
- merged changes done separately by T. and G. to Version 3.2.2.
- fixed some bugs introduced in 3.2.3.

# Countr 3.2.3
# Countr 3.2.3 (not on CRAN)
- all count functions vectorized in c++.
- likelihood functions improved.

# Countr 3.2.2
# Countr 3.2.2 (not on CRAN)
- minor bug fixed in `.checkInitialValues` in the anc parameters.
- all bivariate functionalities removed.
- fertility dataset now exported with data().

# Countr 3.2.1
# Countr 3.2.1 (not on CRAN)
- minor bugs fixed in `.objectiveFunction` and predict with std.error.
- last location "/..." vectorial parameters returned.
- sign in the Frank Copula package changed to be more consistent with
the intuitive results: theta <0 -> negative dependence.

# Countr 3.2.0 (2016-03-23)
# Countr 3.2.0 (CRAN 2016-03-23)
- consolidated the documentation.
- to be first CRAN version.
- first CRAN version.

# Countr 3.1.x
# Countr 3.1.x (not on CRAN)
- clean-up for CRAN submission.

# Countr 3.0.0
# Countr 3.0.0 (not on CRAN)
- renewal constructor + formula + methods.
- dePril convolution added.
- changed the way built in distributions are called.

# Countr 2.0.3
# Countr 2.0.3 (not on CRAN)
- inclusion of covariates using formula.
- Burr (weibull-gamma) distribution added.
- delayed first arrival included.

# Countr 2.0.1
# Countr 2.0.1 (not on CRAN)
- dePril convolution option added.

# Countr 2.0.0
# Countr 2.0.0 (not on CRAN)
- header files added taking advantage of Rcpp attributes.
- `conv_utils.cpp` added (contains the convolution general methods).
- weibull, gamma, gengamma counting processes added.
- option to add user based inter-arrival times distribution using routines
`getProbs_directConv`, `getProbs_minConv`; see tests for examples.

# Countr 1.1.9
# Countr 1.1.9 (not on CRAN)
- incorporated the convolution computations from Tarak's paper.

# Countr 1.1.8
# Countr 1.1.8 (not on CRAN)
- introduced file `.Rbuildignore` in the root directory of the package.
- shortened the name of subdirectory 'Euler-van ...' to remove the complaint
from 'R CMD build' about long paths. Also, to remove the warning by 'R CMD
Expand All @@ -153,7 +171,7 @@
- completed the roxigen argument descriptions (in the sense that 'R CMD check'
doesn't complain).

# Countr 1.1.7
# Countr 1.1.7 (not on CRAN)
- `gam_weiH` and `gam_weiA` renamed `ccX` and `ccY`.
- vectorial version `dWeibullInterArrivalCountInd` and
`dWeibullInterArrivalCountFrankCopula` improved.
Expand All @@ -163,14 +181,14 @@
- tests added for bivariate vectorial functions.
- `cRes` object removed from "R/" to free some space.

# Countr 1.1.5
# Countr 1.1.5 (not on CRAN)
- pkg renamed from BivCount to Countr.
- `alphagen2` changed to `alphagen`.
- oldCpp file removed.
- gamma-heterogeneity functions added to the original and fast version.
- covariates-heterogeneity functions added to the original and fast version.

# Countr 1.1.0
# Countr 1.1.0 (not on CRAN)
- renamed `alphagen` to `alphagenOrig`.
- the signatures of the cpp functions now have namespace prefixes for namespaces
other than Rcpp. In this way RcppExports.cpp does not need `using namespace
Expand Down
38 changes: 26 additions & 12 deletions R/Countr-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,36 @@
#'
#' @useDynLib Countr
#'
#' @import Matrix Rcpp Formula flexsurv dplyr
#' @import Matrix Rcpp Formula flexsurv
#'
#' @importFrom stats nobs AIC coef confint confint.default
#' @importFrom stats formula as.formula getCall glm.fit logLik model.frame
#' @importFrom stats model.matrix model.response model.weights
#' @importFrom stats na.pass pnorm poisson printCoefmat quantile
#' @importFrom stats dnbinom dpois lm pchisq
#' @importFrom stats residuals update.formula vcov
#' @importFrom stats density predict qqline qqnorm terms.formula
#'
#' @importFrom graphics par plot
#' @importFrom utils capture.output
#'
#' @importFrom standardize standardize
#' @importFrom dplyr left_join contains groups
#' @importFrom RColorBrewer brewer.pal
#' @importFrom Rdpack reprompt
#'
#' @importFrom lattice barchart
#' @importFrom car Boot
#' @importFrom Rdpack reprompt
#' @importFrom utils capture.output
#' @importFrom standardize standardize
#' @importFrom lmtest lrtest
#' @importFrom xtable xtable
#'
#' @importFrom stats family
#'
#' @details
#'
#' The methodology is described in the forthcoming paper
#' \insertCiteOnly{CountrJssArticle}{Countr}
#' in the Journal of Statistical Software (included in the package as vignette
#' \code{vignette('Countr_guide_paper', package = "Countr")}).
#' The methodology is described by
#' \insertCiteOnly{CountrJssArticle;textual}{Countr}. The paper is included in
#' the package as vignette \code{vignette('Countr_guide_paper', package = "Countr")}).
#'
#' The main function is \code{\link{renewalCount}}, see its documentation for
#' examples.
Expand All @@ -46,16 +52,14 @@
#'
#' @references
#'
#' \insertRef{CountrJssArticle}{Countr}
#'
#' \insertRef{baker2017event}{Countr}
#'
#' \insertRef{boshnakov2017bivariate}{Countr}
#'
#' \insertRef{cameron2013regression}{Countr}
#'
#' \insertRef{TarakEtAl2018jss}{Countr}
#'
#' \insertRef{CountrJssArticle}{Countr}
#'
#' \insertRef{mcshane2008count}{Countr}
#'
#' \insertRef{winkelmann1995duration}{Countr}
Expand All @@ -67,3 +71,13 @@ utils::globalVariables(
c("Counts", "Actual" # see compareToGLM()
)
)
## (jan 2023) *TODO*: maybe "groups" should be added to utils::globalVariables
## (and not imported from 'dplyr', see the call
## lattice::barchart(preds ~ count_range, data = df, groups = groups, ...
## in frequency_plot().
## Rcheck doesn't complain about undefined variable 'groups' since there is a
## function groups() in 'dplyr'. However, at first sight at least, it seems that
## in 'group = groups' the right-hand side is the name of the column in the data
## frame as symbol. When checking, note that the above call invokes the formula
## method of lattice::barchart and see also the panel function
## lattice::panel.barchart()
Loading

0 comments on commit fbe1aca

Please sign in to comment.