diff --git a/DESCRIPTION b/DESCRIPTION index e980f83..af5ce08 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: singleRcapture Type: Package Title: Single-Source Capture-Recapture Models -Version: 0.2.1.1 +Version: 0.2.1.2 Authors@R: c(person(given = "Piotr", family = "Chlebicki", diff --git a/R/Internals.R b/R/Internals.R index 65560aa..3edfd95 100644 --- a/R/Internals.R +++ b/R/Internals.R @@ -492,12 +492,6 @@ singleRcaptureinternalIRLSmultipar <- function(dependent, # make Xvlm matrix #' @importFrom stats terms singleRinternalGetXvlmMatrix <- function(X, formulas, parNames, contrasts = NULL) { - if (length(formulas[[1]]) == 3) { - #formulas[[1]][[2]] <- NULL - } - if (attr(attr(X, "terms"), "response") != 0) { - #X <- X[, colnames(X)[-attr(attr(X, "terms"), "response")], drop = FALSE] - } nPar <- length(parNames) Xses <- list() @@ -506,13 +500,12 @@ singleRinternalGetXvlmMatrix <- function(X, formulas, parNames, contrasts = NULL if (length(attr(terms(formulas[[k]], data = X), "term.labels")) != 0) { Xses[[k]] <- model.matrix( terms(formulas[[k]], data = X), - data = X[, colnames(X)] + data = X ) } else { Xses[[k]] <- model.matrix( ~ 1, - X[, intersect(attr(terms(formulas[[k]], data = X), "term.labels"), - colnames(X)), drop = FALSE] + X ) if (attr(terms(formulas[[k]], data = X), "intercept") == 0) warning(paste0( diff --git a/R/sandwichMethods.R b/R/sandwichMethods.R index 6722d60..8a80da0 100644 --- a/R/sandwichMethods.R +++ b/R/sandwichMethods.R @@ -50,7 +50,7 @@ bread.singleRStaticCountData <- function(x,...) { #' @author Piotr Chlebicki, Maciej Beręsewicz #' #' @description S3 method for \code{vcovHC} to handle \code{singleRStaticCountData} class objects. -#' Works exactly like \code{vcov.default} the only difference being that this method handles vector generalised linear models. +#' Works exactly like \code{vcovHC.default} the only difference being that this method handles vector generalised linear models. #' Updating the covariance matrix in variance/standard error estimation for population size estimator can be done via [singleRcapture::redoPopEstimation()] #' #' @param x a fitted \code{singleRStaticCountData} class object.