Skip to content

Commit

Permalink
Merge pull request #70 from nt-williams/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
nt-williams authored Jul 14, 2020
2 parents c397f48 + 7575f6b commit 6225eac
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 17 deletions.
4 changes: 2 additions & 2 deletions CRAN-RELEASE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This package was submitted to CRAN on 2020-07-10.
Once it is accepted, delete this file and tag the release (commit 0a05bebcfe).
This package was submitted to CRAN on 2020-07-13.
Once it is accepted, delete this file and tag the release (commit c397f48bbf).
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: lmtp
Title: Non-Parametric Causal Effects of Feasible Interventions Based on Modified Treatment Policies
Version: 0.0.4
Version: 0.0.5
Authors@R:
c(person(given = "Nicholas",
family = "Williams",
Expand All @@ -10,7 +10,7 @@ Authors@R:
person(given = "Iván",
family = "Díaz",
email = "[email protected]",
role = c("aut"),
role = c("aut", "cph"),
comment = c(ORCID = "0000-0001-9056-2047")))
Description: Non-parametric estimators for casual effects based on longitudinal modified treatment
policies as described in Diaz, Williams, and Hoffman (<arXiv:2006.01366>), traditional point treatment,
Expand Down
4 changes: 2 additions & 2 deletions R/shift.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ shift_trt <- function(data, trt, .f) {
#' @export
#'
#' @examples
#' \dontrun{
#' \donttest{
#' data("iptwExWide", package = "twang")
#' a <- paste0("tx", 1:3)
#' baseline <- c("gender", "age")
Expand All @@ -59,7 +59,7 @@ static_binary_on <- function(data, trt) {
#' @export
#'
#' @examples
#' \dontrun{
#' \donttest{
#' data("iptwExWide", package = "twang")
#' a <- paste0("tx", 1:3)
#' baseline <- c("gender", "age")
Expand Down
8 changes: 6 additions & 2 deletions R/theta.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ theta_sub <- function(eta) {
low = NA_real_,
high = NA_real_,
shift = eta$shift,
outcome_reg = rescale_y_continuous(eta$m, eta$bounds),
outcome_reg = switch(eta$outcome_type,
continuous = rescale_y_continuous(eta$m, eta$bounds),
binomial = eta$m),
weights_m = eta$weights_m,
outcome_type = eta$outcome_type)

Expand Down Expand Up @@ -92,7 +94,9 @@ theta_dr <- function(eta) {
high = ci_high,
eif = inflnce,
shift = eta$shift,
outcome_reg = rescale_y_continuous(eta$m$shifted, eta$bounds),
outcome_reg = switch(eta$outcome_type,
continuous = rescale_y_continuous(eta$m$shifted, eta$bounds),
binomial = eta$m$shifted),
density_ratios = eta$r,
weights_m = eta$weights_m,
weights_r = eta$weights_r,
Expand Down
4 changes: 2 additions & 2 deletions R/tidy.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ generics::tidy
#' @param ... Unused, included for generic consistency only.
#'
#' @examples
#' \dontrun{
#' \donttest{
#' a <- c("A1", "A2")
#' nodes <- list(c("L1"), c("L2"))
#' cens <- c("C1", "C2")
#' y <- "Y"
#' fit <- lmtp_tmle(sim_cens, a, y, nodes, cens = cens, shift = NULL, folds = 2)
#' fit <- lmtp_tmle(sim_cens, a, y, time_vary = nodes, cens = cens, shift = NULL, folds = 2)
#' tidy(fit)
#' }
#'
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Please cite the following when using `lmtp` in publications. Citation should inc
title = {lmtp: {Non}-parametric {Causal} {Effects} of {Feasible} {Interventions} {Based} on {Modified} {Treatment} {Policies}},
author = {Nicholas T Williams and Iván Díaz},
year = {2020},
note = {R package version 0.0.4},
note = {R package version 0.0.5},
doi = {10.5281/zenodo.3874931},
url = {https://github.com/nt-williams/lmtp}
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ statistical methodology.
title = {lmtp: {Non}-parametric {Causal} {Effects} of {Feasible} {Interventions} {Based} on {Modified} {Treatment} {Policies}},
author = {Nicholas T Williams and Iván Díaz},
year = {2020},
note = {R package version 0.0.4},
note = {R package version 0.0.5},
doi = {10.5281/zenodo.3874931},
url = {https://github.com/nt-williams/lmtp}
}
Expand Down
5 changes: 5 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

## Additional comments

### Submission 4

Ivan Diaz has been identified as a copyright holder in DESCRIPTION
All instances of `\dontrun{}` have been removed

### Submission 3

Only undirected quotation marks are now used in DESCRIPTION
Expand Down
2 changes: 1 addition & 1 deletion man/lmtp-package.Rd

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

2 changes: 1 addition & 1 deletion man/static_binary_off.Rd

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

2 changes: 1 addition & 1 deletion man/static_binary_on.Rd

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

4 changes: 2 additions & 2 deletions man/tidy.lmtp.Rd

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

0 comments on commit 6225eac

Please sign in to comment.