Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preparation for resubmission #55

Open
4 of 5 tasks
BERENZ opened this issue Jan 16, 2025 · 5 comments
Open
4 of 5 tasks

Preparation for resubmission #55

BERENZ opened this issue Jan 16, 2025 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@BERENZ
Copy link
Contributor

BERENZ commented Jan 16, 2025

  • The output of help(package = "singleRcapture")
  • plot(basicModel)
  • anova(basicModel)
  • The code still contains commented lines which usefulness is unclear.
  • add vignette based on the paper
  • Ad1: indicates that man page titles are still not consistently in title style. Please correct.
  • Ad2: Error in plot.singleRStaticCountData(basicModel) : Argument plotType must be provided as a character or integer or NULL. Please, provide a default behavior (default value) for plotType. More specifically, if NULL is allowed, it seems natural that it is set as the default value of plotType.
  • Ad3: Error in anova.singleRStaticCountData(basicModel) : The anova method for singleRStaticCountData class doesn't work yet. It would seem desirable that this method is implemented or that the authors explain why this is too much an effort to provide it.
@BERENZ BERENZ added the enhancement New feature or request label Jan 16, 2025
@BERENZ
Copy link
Contributor Author

BERENZ commented Jan 16, 2025

Regarding the first issue check the codes for the following titles: Predict method for \code{singleRStaticCountData} class

@BERENZ
Copy link
Contributor Author

BERENZ commented Jan 16, 2025

Regarding the 3 point:

  • Anova does not work either in countreg package
> anova(fm)
Error in UseMethod("anova") : 
  no applicable method for 'anova' applied to an object of class "zerotrunc"
  • reference to the Zeileis, A., Kleiber, C., & Jackman, S. (2008). Regression models for count data in R. Journal of statistical software, 27(8), 1-25. as they specify that: No anova() method is provided, but the general coeftest(), waldtest() from lmtest, and linearHypothesis() from car can be used for Wald tests and lrtest() from lmtest for LR tests of nested models. (p. 7)
  • user may use lrtest() function to compare models in a similar fashion as countreg

@BERENZ
Copy link
Contributor Author

BERENZ commented Jan 21, 2025

Documentation fixed in the commit ecae5e6.

@BERENZ
Copy link
Contributor Author

BERENZ commented Jan 24, 2025

Vignette and the plot function changes added in the commit 29985fe

@BERENZ
Copy link
Contributor Author

BERENZ commented Jan 25, 2025

With this commit f6b2136 I have added:

  • More informative information on the anova function as below

anova.singleRStaticCountData <- function(object, ...) {
stop("The custom anova method for singleRStaticCountData class is not yet implemented. If the goal is to compare models we recommend using `lmtest::lrtest` instead. ")
}

  • information that plot accepts only numeric or character inputs and in case NULL the first one is selected

singleRcapture/R/plots.R

Lines 106 to 121 in f6b2136

if (missing(plotType) || is.null(plotType)) {
plotType <- eval(formals()$plotType)[1]
} else if (is.numeric(plotType) && length(plotType) == 1) {
# Handle numeric index
valid_plots <- eval(formals()$plotType)
if (plotType > 0 && plotType <= length(valid_plots)) {
plotType <- valid_plots[as.integer(plotType)]
} else {
stop("Numeric plotType must be between 1 and ", length(valid_plots))
}
} else if (is.character(plotType)) {
# Use match.arg for character input validation against the options
plotType <- match.arg(plotType)
} else {
stop("plotType must be a character string, or a numeric index")
}

  • vignette formated correctly so all equations and plots are rendered correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants