diff --git a/DESCRIPTION b/DESCRIPTION
index 8edd6a5..3e61a9b 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
Package: beeca
Title: Binary Endpoint Estimation with Covariate Adjustment
-Version: 0.1.2
+Version: 0.1.3
Authors@R:
c(person(given = "Alex",
family = "Przybylski",
@@ -24,11 +24,11 @@ Authors@R:
email = "dominic.magirr@novartis.com",
role = c("aut")
))
-Description: A lightweight package to perform estimation of marginal treatment
- effects for binary outcomes when using logistic regression working models with
- covariate adjustment (see discussions in Magirr et al (2024) ). Implements the variance estimators of
- Ge et al (2011) and
- Ye et al (2023) .
+Description: Performs estimation of marginal treatment effects for binary
+ outcomes when using logistic regression working models with covariate
+ adjustment (see discussions in Magirr et al (2024) ).
+ Implements the variance estimators of Ge et al (2011)
+ and Ye et al (2023) .
Maintainer: Alex Przybylski
License: LGPL (>= 3)
Encoding: UTF-8
diff --git a/NAMESPACE b/NAMESPACE
index 41614af..0d6a44d 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -7,6 +7,7 @@ export(average_predictions)
export(estimate_varcov)
export(get_marginal_effect)
export(predict_counterfactuals)
+export(sanitize_model)
importFrom(dplyr,as_tibble)
importFrom(lifecycle,deprecated)
importFrom(stats,cov)
diff --git a/NEWS.md b/NEWS.md
index bee6334..695bee7 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,4 +1,4 @@
-# beeca 0.1.2
+# beeca 0.1.3
- Preparation for CRAN submission
diff --git a/R/sanitize.R b/R/sanitize.R
index 9ff654d..018e853 100644
--- a/R/sanitize.R
+++ b/R/sanitize.R
@@ -15,6 +15,7 @@
#' @param ... arguments passed to or from other methods.
#' @return if model is non-compliant will throw warnings or errors.
#' @keywords internal
+#' @export
sanitize_model <- function(model, ...) {
UseMethod("sanitize_model")
}
@@ -27,10 +28,11 @@ sanitize_model <- function(model, ...) {
#' @importFrom stats model.frame model.matrix terms
#' @keywords internal
#' @export
-#' @examples \dontrun{
+#' @examples
+#' trial01$trtp <- factor(trial01$trtp)
#' fit1 <- glm(aval ~ trtp + bl_cov, family = "binomial", data = trial01)
-#' sanitize_model(fit1, "trtp")
-#' }
+#' fit1 <- sanitize_model(fit1, "trtp")
+#'
sanitize_model.glm <- function(model, trt, ...) {
# sanitize variable
sanitize_variable(model, trt)
diff --git a/cran-comments.md b/cran-comments.md
index 936fa8f..e670830 100644
--- a/cran-comments.md
+++ b/cran-comments.md
@@ -2,15 +2,15 @@
This is a resubmission. In this version I have:
-* Corrected URLs, DOIs, ORCID identifiers
+* Updated the description to avoid starting with "A lightweight package..."
-* Registered S3 methods
+* Removed unnecessary \dontrun{} wrapper for an example
## R CMD check results
0 errors | 0 warnings | 1 note
-I am aware of one possible note: The suggested package 'margins' was very recently reinstated to CRAN and binaries may not be available for certain platforms / R versions. At time of submission it is not available for Windows r-devel.
+I am aware of one possible note: The suggested package 'margins' was very recently reinstated to CRAN and binaries may not be available for certain platforms / R versions.
```
* checking package dependencies ... NOTE
diff --git a/man/beeca-package.Rd b/man/beeca-package.Rd
index b17e96f..a137665 100644
--- a/man/beeca-package.Rd
+++ b/man/beeca-package.Rd
@@ -6,7 +6,7 @@
\alias{beeca-package}
\title{beeca: Binary Endpoint Estimation with Covariate Adjustment}
\description{
-A lightweight package to perform estimation of marginal treatment effects for binary outcomes when using logistic regression working models with covariate adjustment (see discussions in Magirr et al (2024) \url{https://osf.io/9mp58/}). Implements the variance estimators of Ge et al (2011) \doi{10.1177/009286151104500409} and Ye et al (2023) \doi{10.1080/24754269.2023.2205802}.
+Performs estimation of marginal treatment effects for binary outcomes when using logistic regression working models with covariate adjustment (see discussions in Magirr et al (2024) \url{https://osf.io/9mp58/}). Implements the variance estimators of Ge et al (2011) \doi{10.1177/009286151104500409} and Ye et al (2023) \doi{10.1080/24754269.2023.2205802}.
}
\seealso{
Useful links:
diff --git a/man/sanitize_model.glm.Rd b/man/sanitize_model.glm.Rd
index 9494433..d342b18 100644
--- a/man/sanitize_model.glm.Rd
+++ b/man/sanitize_model.glm.Rd
@@ -20,9 +20,9 @@ if model is non-compliant will throw warnings or errors.
(internal) Sanitize a glm model
}
\examples{
-\dontrun{
+trial01$trtp <- factor(trial01$trtp)
fit1 <- glm(aval ~ trtp + bl_cov, family = "binomial", data = trial01)
-sanitize_model(fit1, "trtp")
-}
+fit1 <- sanitize_model(fit1, "trtp")
+
}
\keyword{internal}