diff --git a/DESCRIPTION b/DESCRIPTION index 94effaf..708ad31 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,31 +1,26 @@ Package: OneSampleMR -Title: One Sample Mendelian Randomization and Instrumental Variable Analyses -Version: 0.1.0 -Authors@R: - c(person(given = "Tom", - family = "Palmer", - role = c("aut", "cre"), - email = "remlapmot@hotmail.com", - comment = c(ORCID = "0000-0003-4655-4511")), - person(given = "Wes", - family = "Spiller", - role = "aut", - email = "wes.spiller@bristol.ac.uk", - comment = c(ORCID = "0000-0002-8169-5531")), - person(given = "Eleanor", - family = "Sanderson", - role = "aut", - email = "eleanor.sanderson@bristol.ac.uk", - comment = c(ORCID = "0000-0001-5188-5775"))) -Description: Useful functions for one-sample (individual level data) Mendelian randomization and - instrumental variable analyses. The package includes implementations of; the Sanderson and - Windmeijer (2016) conditional F-statistic, the - multiplicative structural mean model Hernán and Robins (2006) - , and two-stage predictor substitution and two-stage - residual inclusion estimators explained by Terza et al. (2008) - . +Title: One Sample Mendelian Randomization and Instrumental Variable + Analyses +Version: 0.1.1 +Authors@R: c( + person("Tom", "Palmer", , "remlapmot@hotmail.com", role = c("aut", "cre"), + comment = c(ORCID = "0000-0003-4655-4511")), + person("Wes", "Spiller", , "wes.spiller@bristol.ac.uk", role = "aut", + comment = c(ORCID = "0000-0002-8169-5531")), + person("Eleanor", "Sanderson", , "eleanor.sanderson@bristol.ac.uk", role = "aut", + comment = c(ORCID = "0000-0001-5188-5775")) + ) +Description: Useful functions for one-sample (individual level data) + Mendelian randomization and instrumental variable analyses. The + package includes implementations of; the Sanderson and Windmeijer + (2016) conditional F-statistic, + the multiplicative structural mean model Hernán and Robins (2006) + , and two-stage predictor + substitution and two-stage residual inclusion estimators explained by + Terza et al. (2008) . License: GPL (>= 3) -URL: https://github.com/remlapmot/OneSampleMR +URL: https://github.com/remlapmot/OneSampleMR, + https://remlapmot.github.io/OneSampleMR/ BugReports: https://github.com/remlapmot/OneSampleMR/issues/ Depends: R (>= 3.6.0) diff --git a/NEWS.md b/NEWS.md index a416eca..97d67f0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# OneSampleMR 0.1.1 + +* Fix an issue causing an R CMD check note in R 4.2.0 + # OneSampleMR 0.1.0 * Initial submission to CRAN diff --git a/R/fsw.R b/R/fsw.R index 874cc53..23bb309 100644 --- a/R/fsw.R +++ b/R/fsw.R @@ -92,7 +92,7 @@ fsw.ivreg <- function(object) { "ivreg(y ~ log(x1) + x2 | z1 + z2 + z3)", "please create dat$logx1 = log(x1) in your data.frame", "and fit ivreg(y ~ logx1 + x2 | z1 + z2 + z3).") - if (class(condmod) == "try-error") stop(condmoderrmsg) + if (inherits(condmod, "try-error")) stop(condmoderrmsg) condres <- condmod$residuals if (nexogenous > 0) { resfor <- as.formula(paste("condres", "~", instrplus, "+", exogplus))