Skip to content

Commit

Permalink
Documentation and version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Kertoo committed Dec 23, 2024
1 parent 2803895 commit 67c7b87
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: singleRcapture
Type: Package
Title: Single-Source Capture-Recapture Models
Version: 0.2.1.3
Version: 0.2.1.4
Authors@R:
c(person(given = "Piotr",
family = "Chlebicki",
Expand Down
7 changes: 6 additions & 1 deletion R/documentationFiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ NULL
#' @param model,object an object of \code{singleRStaticCountData} class.
#' @param dfbeta if \code{dfbeta} was already obtained it is possible to pass
#' them into function so that they need not be computed for the second time.
#' @param do.coef logical indicating if \code{dfbeta} computation for influence
#' should be done. \code{FALSE} by default.
#' @param cores a number of processor cores to be used,
#' any number greater than 1 activates code designed with \code{doParallel},
#' \code{foreach} and \code{parallel} packages. Note that for now using parallel
Expand All @@ -291,10 +293,11 @@ NULL
#' for every unit present in the data.\code{dfpopsize} does the same for
#' population size estimation utilizing coefficients computed by \code{dfbeta}.
#'
#'
#' \code{cooks.distance} is implemented (for now) only for models with a single
#' linear predictor and works exactly like the method for \code{glm} class.
#'
#' \code{sigma} computes the standard errors of predicted means. Returns a matrix
#' with two columns first for truncated mean and the other for the non-truncated mean.
#'
#' \code{residuals.singleRStaticCountData} (can be abbreviated to \code{resid})
#' works like \code{residuals.glm} with the exception that:
Expand Down Expand Up @@ -353,6 +356,8 @@ NULL
#' matrix constructed using specifications in \code{controlModel} and
#' call to \code{estimatePopsize}.
#'
#' \code{influence} works like \code{glm} counterpart computing the most important
#' influence measures.
#'
#' @seealso [estimatePopsize()] [stats::hatvalues()] [controlMethod()] [stats::dfbeta()]
#' [stats::cooks.distance()]
Expand Down
2 changes: 1 addition & 1 deletion R/methodsNotWorking.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ add1.singleRStaticCountData <- function(object, scope, ...) {
#' @importFrom stats profile
#' @method profile singleRStaticCountData
#' @exportS3Method
profile.singleRStaticCountData <- function(object, scope, ...) {
profile.singleRStaticCountData <- function(fitted, ...) {
stop("The profile method for singleRStaticCountData class doesn't work yet.")
}
#' @importFrom stats drop1
Expand Down
4 changes: 4 additions & 0 deletions R/smallMethods.R
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,15 @@ df.residual.singleRStaticCountData <- function(object, ...) {

#' @importFrom stats sigma
#' @method sigma singleRStaticCountData
#' @rdname regDiagSingleR
#' @exportS3Method
sigma.singleRStaticCountData <- function(object, ...) {
predict(object, type = "mean", se = TRUE)[c(3, 4)]
}

#' @importFrom stats influence
#' @method influence singleRStaticCountData
#' @rdname regDiagSingleR
#' @exportS3Method
influence.singleRStaticCountData <- function(model, do.coef = FALSE, ...) {
res <- list()
Expand Down Expand Up @@ -199,6 +201,7 @@ influence.singleRStaticCountData <- function(model, do.coef = FALSE, ...) {

#' @importFrom stats rstudent
#' @method rstudent singleRStaticCountData
#' @rdname regDiagSingleR
#' @exportS3Method
rstudent.singleRStaticCountData <- function(model, ...) {
res <- residuals(model, type = "pearson")[, 1]
Expand All @@ -212,6 +215,7 @@ rstudent.singleRStaticCountData <- function(model, ...) {

#' @importFrom stats rstandard
#' @method rstandard singleRStaticCountData
#' @rdname regDiagSingleR
#' @exportS3Method
rstandard.singleRStaticCountData <- function(model,
type = c("deviance", "pearson"),
Expand Down
23 changes: 22 additions & 1 deletion man/regDiagSingleR.Rd

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

0 comments on commit 67c7b87

Please sign in to comment.