Skip to content

Commit

Permalink
ready for cran submission
Browse files Browse the repository at this point in the history
  • Loading branch information
sokbae committed Oct 20, 2023
1 parent 5faa4e1 commit 10e7a20
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 33 deletions.
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ciccr
Type: Package
Title: Causal Inference in Case-Control and Case-Population Studies
Version: 0.2.0.900
Version: 0.3.0
Authors@R: c(
person("Sung Jae", "Jun", email = "suj14@psu.edu", role = "aut"),
person("Sokbae", "Lee", email = "sl3841@columbia.edu", role = c("aut", "cre")))
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@
* This version includes the following updates:
* estimation and inference methods for causal relative and attributable risk,
* handling of both case-control and case-population studies.

# ciccr 0.3.0 (2023-10-20)
* The third version is submitted to CRAN.
* This version includes the following updates:
* addition of the data extract from Fang and Gong (2020)
* the case of random sampling is included
* document _PACKAGE to get all the defaults for package documentation
2 changes: 1 addition & 1 deletion R/data_FG.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' }
#' @source Fang, H. and Gong, Q. (2020) Data and Code for: Detecting Potential Overbilling in Medicare Reimbursement via Hours Worked: Reply.
#' Nashville, TN: American Economic Association [publisher]. Ann Arbor, MI: Inter-university Consortium for Political and Social Research [distributor], 2020-11-23.
#' \url{https://doi.org/10.3886/E119192V1}
#' \doi{10.3886/E119192V1}
#' @references Fang, H. and Gong, Q. (2017). Detecting Potential Overbilling in Medicare Reimbursement via Hours Worked.
#' American Economic Review, 107(2), 562-91.
#' @references Matsumoto, B. (2020). Detecting Potential Overbilling in Medicare Reimbursement via Hours Worked: Comment.
Expand Down
2 changes: 1 addition & 1 deletion R/data_FG_CC.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' }
#' @source Fang, H. and Gong, Q. (2020) Data and Code for: Detecting Potential Overbilling in Medicare Reimbursement via Hours Worked: Reply.
#' Nashville, TN: American Economic Association [publisher]. Ann Arbor, MI: Inter-university Consortium for Political and Social Research [distributor], 2020-11-23.
#' \url{https://doi.org/10.3886/E119192V1}
#' \doi{10.3886/E119192V1}
#' @references Fang, H. and Gong, Q. (2017). Detecting Potential Overbilling in Medicare Reimbursement via Hours Worked.
#' American Economic Review, 107(2), 562-91.
#' @references Matsumoto, B. (2020). Detecting Potential Overbilling in Medicare Reimbursement via Hours Worked: Comment.
Expand Down
2 changes: 1 addition & 1 deletion R/data_FG_CP.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' }
#' @source Fang, H. and Gong, Q. (2020) Data and Code for: Detecting Potential Overbilling in Medicare Reimbursement via Hours Worked: Reply.
#' Nashville, TN: American Economic Association [publisher]. Ann Arbor, MI: Inter-university Consortium for Political and Social Research [distributor], 2020-11-23.
#' \url{https://doi.org/10.3886/E119192V1}
#' \doi{10.3886/E119192V1}
#' @references Fang, H. and Gong, Q. (2017). Detecting Potential Overbilling in Medicare Reimbursement via Hours Worked.
#' American Economic Review, 107(2), 562-91.
#' @references Matsumoto, B. (2020). Detecting Potential Overbilling in Medicare Reimbursement via Hours Worked: Comment.
Expand Down
10 changes: 3 additions & 7 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
## Test environments
* local x86_64-apple-darwin15.6.0, using R 3.6.2
* travis-ci: x86_64-pc-linux-gnu, using R 4.0.2
* win-builder: x86_64-w64-mingw32, using using R Under development (unstable) (2020-10-27 r79379)

## R CMD check results
There were no ERRORs or WARNINGs.

## This version
This version includes the following updates:

* estimation and inference methods for causal relative and attributable risk,
* addition of the data extract from Fang and Gong (2020)

* handling of both case-control and case-population studies.
* the case of random sampling is included

* document _PACKAGE to get all the defaults for package documentation
2 changes: 1 addition & 1 deletion man/FG.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/FG_CC.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/FG_CP.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/cicc_AR.Rd

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

14 changes: 6 additions & 8 deletions vignettes/ciccr-vignette.Rmd
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "Causal Inference in Case-Control Studies: Vignette"
title: "Causal Inference in Case-Control and Case-Population Studies: Vignette"
output: rmarkdown::html_vignette
description: >
This vignette describes how to use package "ciccr" that is based on the paper entitled "Causaul Inference in Case-Control Studies" by Jun and Lee.
This vignette describes how to use package "ciccr" that is based on the paper entitled "Causal Inference under Outcome-Based Sampling with Monotonicity Assumptions" by Jun and Lee.
vignette: >
%\VignetteIndexEntry{Causal Inference in Case-Control Studies: Vignette}
%\VignetteIndexEntry{Causal Inference in Case-Control and Case-Population Studies: Vignette}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
Expand All @@ -18,8 +18,7 @@ knitr::opts_chunk$set(

## Overview

This vignette describes how to use package "ciccr" that is based on the paper entitled "Causal Inference in Case-Control Studies" ([Jun and Lee, 2020](https://arxiv.org/abs/2004.08318)).

This vignette describes how to use package "ciccr" that is based on the paper entitled "Causal Inference under Outcome-Based Sampling with Monotonicity Assumptions" ([Jun and Lee, 2023](https://arxiv.org/abs/2004.08318)).

## Causal Inference on Relative and Attributable Risk

Expand All @@ -32,7 +31,6 @@ library(ciccr)
library(MASS)
```


To illustrate the usefulness of the package, we use the dataset ACS_CC that is included in the package. This dataset is an extract from American Community Survey (ACS) 2018, restricted to white males residing in California with at least a bachelor's degree. The ACS is an ongoing annual survey by the US Census Bureau that provides key information about the US population. We use the following variables:

```{r}
Expand Down Expand Up @@ -109,7 +107,7 @@ It is handy to examine the results by plotting a graph.
cicc_plot(results)
```

To interpret the results, we assume both marginal treatment response (MTR) and marginal treatment selection (MTS). In this setting, MTR means that everyone will earn no less by obtaining a degree higher than bachelor's degree; MTS indicates that those who selected into higher education have higher potential to earn top incomes. Based on the MTR and MTS assumptions, we can conclude that the treatment effect lies in between 1 and the upper end point of the one-sided confidence interval with high probability. Thus, the estimates in the graph above suggest that the effect of obtaining a degree higher than bachelor's degree is anywhere between 1 and the upper end points of the uniform confidence bands. This roughly implies that the chance of earning top incomes may increase up to by a factor as large as the upper end points of the uniform confidence band, but allowing for possibility of no positive effect at all. The results are shown over the range of the unknown true case probability. See [Jun and Lee, 2020](https://arxiv.org/abs/2004.08318) for more detailed explanations regarding how to interpret the estimation results.
To interpret the results, we assume both marginal treatment response (MTR) and marginal treatment selection (MTS). In this setting, MTR means that everyone will earn no less by obtaining a degree higher than bachelor's degree; MTS indicates that those who selected into higher education have higher potential to earn top incomes. Based on the MTR and MTS assumptions, we can conclude that the treatment effect lies in between 1 and the upper end point of the one-sided confidence interval with high probability. Thus, the estimates in the graph above suggest that the effect of obtaining a degree higher than bachelor's degree is anywhere between 1 and the upper end points of the uniform confidence bands. This roughly implies that the chance of earning top incomes may increase up to by a factor as large as the upper end points of the uniform confidence band, but allowing for possibility of no positive effect at all. The results are shown over the range of the unknown true case probability. See [Jun and Lee, 2023](https://arxiv.org/abs/2004.08318) for more detailed explanations regarding how to interpret the estimation results.

### Comparison with Logistic Regression

Expand Down Expand Up @@ -207,7 +205,7 @@ For case-population sampling, the upper bound on attributable risk is a linear f

# References

Sung Jae Jun and Sokbae Lee. Causal Inference in Case-Control Studies.
Sung Jae Jun and Sokbae Lee. (2023). Causal Inference under Outcome-Based Sampling with Monotonicity Assumptions.
https://arxiv.org/abs/2004.08318.

Manski, C.F. (1997). Monotone Treatment Response. Econometrica, 65(6), 1311-1334.
Expand Down
Binary file modified vignettes/ciccr-vignette.pdf
Binary file not shown.

0 comments on commit 10e7a20

Please sign in to comment.