Skip to content

Commit

Permalink
correct DESCRIPTION + new example for bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
samorso committed Dec 14, 2020
1 parent 47ff448 commit 8c4eafd
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CRAN-RELEASE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This package was submitted to CRAN on 2020-12-11.
Once it is accepted, delete this file and tag the release (commit 19119b3).
Once it is accepted, delete this file and tag the release (commit 47ff448).
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ Type: Package
Title: Bias Correction via Iterative Bootstrap
Version: 0.1.0
Description: An implementation of the iterative bootstrap procedure of
Kuk (1995) to correct the estimation bias of a fitted model object. This
Kuk (1995) <doi:10.1111/j.2517-6161.1995.tb02035.x> to correct the estimation bias of a fitted model object. This
procedure has better bias correction properties than the
bootstrap bias correction technique.
Authors@R: c(
person("Samuel", "Orso", email="Samuel.Orso@unige.ch", role=c("aut","cre","cph")),
person("Stéphane", "Guerrier", role="cph")
person("Samuel", "Orso", email="Samuel.Orso@unige.ch", role=c("aut","cre")),
person("Stéphane", "Guerrier", role="ctb")
)
Maintainer: Samuel Orso <Samuel.Orso@unige.ch>
Depends: R (>= 4.0.0)
Expand Down
3 changes: 2 additions & 1 deletion R/bootstrap.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
#' (see 'Details').
#' @param ... additional optional arguments to pass to \code{ibControl}.
#' @return
#' A \code{matrix} B times p (size of parameter) of bootstrapped estimates.
#' A \code{matrix} p (size of parameter) times B of bootstrapped estimates.
#' @details
#' This method is a simple wrapper around the \code{ib} method
#' where number of iterations is set to 1.
#' @seealso \code{\link{ib}}, \code{\link{ibControl}}
#' @example /inst/examples/eg_bootstrap.R
#' @author Samuel Orso
#' @export
bootstrap <- function(object, B = 1e3, extra_param = FALSE, ...){
Expand Down
10 changes: 9 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
In this is a resubmission, I have:
* fixed an entry in DESCRIPTION causing a failure in automatic check
* add <doi:10.1111/j.2517-6161.1995.tb02035.x> reference in DESCRIPTION.
* remove "cph" as not adequate for persons in DESCRIPTION.
* add the adequate "ctb" instead in DESCRIPTION.
* enhance documentation of "bootstrap.R".
* add an example on how to use the bootstrap function (new file "eg_bootstrap.R").

I have not:
* replace \dontrun{} by \donttest{} for the examples. My reason for using \dontrun{} is that the concerned examples exceed 5 seconds of execution time (but I believe these examples are useful for users), however \donttest{} still run the examples and trigger an error when checking the package.
* add many new examples as I think a vignette would be most useful at this stage and is under consideration for a further version of the package.
9 changes: 9 additions & 0 deletions inst/examples/eg_bootstrap.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

## bootstrap poisson regression
counts <- c(18,17,15,20,10,20,25,13,12)
outcome <- gl(3,1,9)
treatment <- gl(3,3)
pois_fit <- glm(counts ~ outcome + treatment, family = poisson())

## make 100 paramtric bootstrap replicates
boot_dist <- bootstrap(pois_fit, B = 100)
13 changes: 12 additions & 1 deletion man/bootstrap.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8c4eafd

Please sign in to comment.