Skip to content

Commit

Permalink
update website
Browse files Browse the repository at this point in the history
  • Loading branch information
bcallaway11 committed Jan 31, 2025
1 parent 5a9dd01 commit 43a3a6a
Show file tree
Hide file tree
Showing 33 changed files with 252 additions and 151 deletions.
6 changes: 4 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ Imports:
DRDID,
tidyr,
dplyr,
pbapply
pbapply,
splines2
Suggests:
testthat (>= 3.0.0)
testthat (>= 3.0.0),
did
Config/testthat/edition: 3
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export(setup_pte_basic)
export(two_by_two_subset)
import(BMisc)
import(ggplot2)
import(splines2)
import(stats)
import(tidyr)
import(utils)
Expand Down
6 changes: 3 additions & 3 deletions R/attgt_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' (equal to "pre" for pre-treatment periods and equal to "post" for post
#' treatment periods), \code{Y} (outcome).
#'
#' In our case, we call \code{pte::two_by_two_subset} which sets up the
#' In our case, we call \code{two_by_two_subset} which sets up the
#' data to have this format before the call to \code{did_attgt}.
#'
#' @param gt_data data that is "local" to a particular group-time average
Expand Down Expand Up @@ -78,7 +78,7 @@ did_attgt <- function(gt_data, xformula = ~1, ...) {
#' (equal to "pre" for pre-treatment periods and equal to "post" for post
#' treatment periods), \code{Y} (outcome).
#'
#' In our case, we call \code{pte::two_by_two_subset} which sets up the
#' In our case, we call \code{two_by_two_subset} which sets up the
#' data to have this format before the call to `pte_attgt`
#'
#' @param gt_data data that is "local" to a particular group-time average
Expand Down Expand Up @@ -218,5 +218,5 @@ pte_attgt <- function(
stop(paste0("est_method: ", est_method, " is not supported"))
}
# return attgt
pte::attgt_if(attgt = attgt$ATT, inf_func = attgt$att.inf.func)
attgt_if(attgt = attgt$ATT, inf_func = attgt$att.inf.func)
}
6 changes: 6 additions & 0 deletions R/classes.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ group_time_att <- function(group,
#' @param object an \code{group_time_att} object
#' @param ... extra arguments
#'
#' @keywords internal
#' @export
summary.group_time_att <- function(object, ...) {
group_time_att_obj <- object
Expand Down Expand Up @@ -123,6 +124,7 @@ summary.group_time_att <- function(object, ...) {
#' @param x a \code{group_time_att} object
#' @param ... extra arguments
#'
#' @keywords internal
#' @export
print.group_time_att <- function(x, ...) {
summary.group_time_att(x, ...)
Expand Down Expand Up @@ -163,6 +165,7 @@ pte_results <- function(att_gt,
#' @param object an \code{pte_results} object
#' @param ... other arguments
#'
#' @keywords internal
#' @export
summary.pte_results <- function(object, ...) {
overall_att <- object$overall_att$overall.att
Expand Down Expand Up @@ -233,6 +236,7 @@ summary.pte_results <- function(object, ...) {
#' @param x a \code{pte_results} object
#' @param ... extra arguments
#'
#' @keywords internal
#' @export
print.pte_results <- function(x, ...) {
# summary.pte_results(x,...)
Expand All @@ -249,6 +253,7 @@ print.pte_results <- function(x, ...) {
#' @param x a \code{summary.pte_results} object
#' @param ... extra arguments
#'
#' @keywords internal
#' @export
print.summary.pte_results <- function(x, ...) {
object <- x
Expand Down Expand Up @@ -403,6 +408,7 @@ pte_emp_boot <- function(attgt_results,
#'
#' @return \code{summary.pte_results} object
#'
#' @keywords internal
#' @export
summary.pte_emp_boot <- function(object, ...) {
overall_att <- object$overall_results$att
Expand Down
1 change: 1 addition & 0 deletions R/imports.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
#' @import ggplot2
#' @import tidyr
#' @import BMisc
#' @import splines2
#' @importFrom dplyr bind_rows group_by group_map inner_join mutate transmute
"_PACKAGE"
6 changes: 4 additions & 2 deletions R/process_dose_gt.R
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ process_dose_gt <- function(gt_results, ptep, ...) {
#' @param dose vector containing the values of the dose used in estimation
#' @param att.d estimates of ATT(d) for each value of `dose`
#' @param att.d_se standard error of ATT(d) for each value of `dose`
#' @param att.d_crt.val critical value to produce pointwise or uniform confidence
#' @param att.d_crit.val critical value to produce pointwise or uniform confidence
#' interval for ATT(d)
#' @param att.d_inffunc matrix containing the influence function from estimating
#' ATT(d)
#' @param acrt.d estimates of ACRT(d) for each value of `dose`
#' @param acrt.d_se standard error of ACRT(d) for each value of `dose`
#' @param acrt.d_crt.val critical value to produce pointwise or uniform confidence
#' @param acrt.d_crit.val critical value to produce pointwise or uniform confidence
#' interval for ACRT(d)
#' @param acrt.d_inffunc matrix containing the influence function from estimating
#' ACRT(d)
Expand Down Expand Up @@ -171,6 +171,7 @@ dose_obj <- function(
#' @param object an `dose_obj` object
#' @param ... extra arguments
#'
#' @keywords internal
#' @export
summary.dose_obj <- function(object, ...) {
dose_obj <- object
Expand Down Expand Up @@ -201,6 +202,7 @@ summary.dose_obj <- function(object, ...) {
#' @param x a list containing the summary of a `dose_obj` object
#' @param ... extra arguments
#'
#' @keywords internal
#' @export
print.summary.dose_obj <- function(x, ...) {
# browser()
Expand Down
3 changes: 3 additions & 0 deletions R/process_dtt_gt.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
process_dtt_gt <- function(gt_results, ptep, ...) {
stop("this is just a stub for processing distributional results, not implemented yet")
}
2 changes: 1 addition & 1 deletion R/pte.R
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ pte <- function(yname,
#' should return. This is unused is unused except in cases where
#' the results involve distributions.
#'
#' @param process_dose An optional function to customize results when the gt-specific
#' @param process_dose_gt_fun An optional function to customize results when the gt-specific
#' function returns treatment effects that depend on dose (i.e., amount of the
#' treatment). The default is `process_dose_gt`, which is a function provided
#' by the package. See that function for an example of what this function should
Expand Down
4 changes: 2 additions & 2 deletions R/pte_aggte.R
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,7 @@ crit_val_checks <- function(crit_val, alp = 0.05) {
#'
#' @description An object for holding aggregated treatment effect parameters.
#'
#' @inheritParams aggte
#' @inheritParams compute.aggte
#' @inheritParams pte_aggte
#' @param overall.att The estimated overall ATT
#' @param overall.se Standard error for overall ATT
#' @param egt Holds the length of exposure (for dynamic effects), the
Expand Down Expand Up @@ -547,6 +546,7 @@ aggte_obj <- function(overall.att = NULL,
#' @param object an \code{aggte_obj} object
#' @param ... other arguments
#'
#' @keywords internal
#' @export
summary.aggte_obj <- function(object, ...) {
# call
Expand Down
55 changes: 55 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,58 @@ navbar:
github:
icon: fa-github
href: https://github.com/bcallaway11/ptetools

reference:
- title: Generic functions for panel data causal inference
contents:
- aggte_obj
- attgt_if
- attgt_noif
- attgt_pte_aggregations
- compute.pte
- compute.pte2
- dose_obj
- group_time_att
- gt_data_frame
- overall_weights
- panel_empirical_bootstrap
- process_att_gt
- pte
- pte2
- pte_aggte
- pte_attgt
- pte_emp_boot
- pte_params
- pte_results
- setup_pte
- setup_pte_basic

- title: Group-time average treatment effects with a binary treatment
contents:
- did_attgt
- pte_default

- title: Functions for dealing with a continuous treatment
contents:
- pte_dose_results

- title: Functions for dealing with distributional treatment effects
contents:
- qott_pte_aggregations
- qtt_pte_aggregations

- title: Functions for group-time specific subsets of data
contents:
- keep_all_pretreatment_subset
- keep_all_untreated_subset
- two_by_two_subset

- title: Plotting functions
contents:
- ggpte
- ggpte_cont

- title: Helper functions
contents:
- crit_val_checks
- mboot2
2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pandoc: 3.1.3
pkgdown: 2.1.0
pkgdown_sha: ~
articles: {}
last_built: 2025-01-31T16:05Z
last_built: 2025-01-31T19:39Z
urls:
reference: https://github.com/bcallaway11/ptetools/reference
article: https://github.com/bcallaway11/ptetools/articles
4 changes: 4 additions & 0 deletions docs/reference/aggte_obj.html

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

10 changes: 5 additions & 5 deletions docs/reference/did_attgt.html

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

20 changes: 10 additions & 10 deletions docs/reference/dose_obj.html

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

Loading

0 comments on commit 43a3a6a

Please sign in to comment.