diff --git a/.DS_Store b/.DS_Store index 2a12c25..8075fce 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/DESCRIPTION b/DESCRIPTION index 36ba7e0..5f497f5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: ciccr Type: Package Title: Causal Inference in Case-Control Studies -Version: 0.1.0.9000 +Version: 0.2.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"))) diff --git a/R/ciccr.R b/R/ciccr.R index a07c9b3..b606fec 100644 --- a/R/ciccr.R +++ b/R/ciccr.R @@ -2,16 +2,16 @@ #' @name ciccr #' @title ciccr: a package for causal inference in case-control and case-population studies #' -#' @description The ciccr package provides methods for causal infernce in case-control and case-population studies +#' @description The ciccr package provides methods for causal inference in case-control and case-population studies #' under the monotone treatment response (MTR) and monotone treatment selection (MTS) assumptions. #' #' @section Functions: #' The package includes the following: #' \itemize{ #' \item{\code{\link{cicc_plot}}: }{plots upper bounds on relative and attributable risk.} -#' \item{\code{\link{cicc_RR}}: }{carries out causual inference on relative risk.} +#' \item{\code{\link{cicc_RR}}: }{carries out causal inference on relative risk.} #' \item{\code{\link{avg_RR_logit}}: }{averages the log odds ratio using retrospective logistic regression.} -#' \item{\code{\link{cicc_AR}}: }{carries out causual inference on attributable risk.} +#' \item{\code{\link{cicc_AR}}: }{carries out causal inference on attributable risk.} #' \item{\code{\link{avg_AR_logit}}: }{averages the upper bound on causal attributable risk using prospective and retrospective logistic regression models.} #' \item{\code{\link{ACS_CC}}: }{provides an illustrative case-control sample.} #' \item{\code{\link{ACS_CP}}: }{provides an illustrative case-population sample.} diff --git a/R/data_CC.R b/R/data_CC.R index 081fdb7..aedb46e 100644 --- a/R/data_CC.R +++ b/R/data_CC.R @@ -1,7 +1,7 @@ #' ACS_CC #' #' A case-control sample extracted from American Community Survey (ACS) 2018, restricted to white males residing in California with at least a bachelor's degree. -#' The orginial ACS dataset is not from case-control sampling, but this case-control sample is obtained by the following procedure. +#' The original ACS dataset is not from case-control sampling, but this case-control sample is obtained by the following procedure. #' The case sample is composed of 921 individuals whose income is top-coded. #' The control sample of equal size is randomly drawn without replacement from the pool of individuals whose income is not top-coded. #' Age is restricted to be between 25 and 70. diff --git a/R/data_CP.R b/R/data_CP.R index c7730fe..22d715b 100644 --- a/R/data_CP.R +++ b/R/data_CP.R @@ -1,7 +1,7 @@ #' ACS_CP #' #' A case-population sample extracted from American Community Survey (ACS) 2018, restricted to white males residing in California with at least a bachelor's degree. -#' The orginial ACS dataset is not from case-population sampling, but this case-population sample is obtained by the following procedure. +#' The original ACS dataset is not from case-population sampling, but this case-population sample is obtained by the following procedure. #' The case sample is composed of 921 individuals whose income is top-coded. #' The control sample of equal size is randomly drawn with replacement from all observations and its top-coded status is coded missing. #' Age is restricted to be between 25 and 70. diff --git a/man/ACS_CC.Rd b/man/ACS_CC.Rd index 9866152..3f2c9de 100644 --- a/man/ACS_CC.Rd +++ b/man/ACS_CC.Rd @@ -21,7 +21,7 @@ ACS_CC } \description{ A case-control sample extracted from American Community Survey (ACS) 2018, restricted to white males residing in California with at least a bachelor's degree. -The orginial ACS dataset is not from case-control sampling, but this case-control sample is obtained by the following procedure. +The original ACS dataset is not from case-control sampling, but this case-control sample is obtained by the following procedure. The case sample is composed of 921 individuals whose income is top-coded. The control sample of equal size is randomly drawn without replacement from the pool of individuals whose income is not top-coded. Age is restricted to be between 25 and 70. diff --git a/man/ACS_CP.Rd b/man/ACS_CP.Rd index bc923fb..e5b9e6f 100644 --- a/man/ACS_CP.Rd +++ b/man/ACS_CP.Rd @@ -21,7 +21,7 @@ ACS_CP } \description{ A case-population sample extracted from American Community Survey (ACS) 2018, restricted to white males residing in California with at least a bachelor's degree. -The orginial ACS dataset is not from case-population sampling, but this case-population sample is obtained by the following procedure. +The original ACS dataset is not from case-population sampling, but this case-population sample is obtained by the following procedure. The case sample is composed of 921 individuals whose income is top-coded. The control sample of equal size is randomly drawn with replacement from all observations and its top-coded status is coded missing. Age is restricted to be between 25 and 70. diff --git a/man/ciccr.Rd b/man/ciccr.Rd index dd924c1..7293b07 100644 --- a/man/ciccr.Rd +++ b/man/ciccr.Rd @@ -5,7 +5,7 @@ \alias{ciccr} \title{ciccr: a package for causal inference in case-control and case-population studies} \description{ -The ciccr package provides methods for causal infernce in case-control and case-population studies +The ciccr package provides methods for causal inference in case-control and case-population studies under the monotone treatment response (MTR) and monotone treatment selection (MTS) assumptions. } \section{Functions}{ @@ -13,9 +13,9 @@ under the monotone treatment response (MTR) and monotone treatment selection (MT The package includes the following: \itemize{ \item{\code{\link{cicc_plot}}: }{plots upper bounds on relative and attributable risk.} -\item{\code{\link{cicc_RR}}: }{carries out causual inference on relative risk.} +\item{\code{\link{cicc_RR}}: }{carries out causal inference on relative risk.} \item{\code{\link{avg_RR_logit}}: }{averages the log odds ratio using retrospective logistic regression.} -\item{\code{\link{cicc_AR}}: }{carries out causual inference on attributable risk.} +\item{\code{\link{cicc_AR}}: }{carries out causal inference on attributable risk.} \item{\code{\link{avg_AR_logit}}: }{averages the upper bound on causal attributable risk using prospective and retrospective logistic regression models.} \item{\code{\link{ACS_CC}}: }{provides an illustrative case-control sample.} \item{\code{\link{ACS_CP}}: }{provides an illustrative case-population sample.} diff --git a/vignettes/ciccr-vignette.Rmd b/vignettes/ciccr-vignette.Rmd index 66bf126..5988ef6 100644 --- a/vignettes/ciccr-vignette.Rmd +++ b/vignettes/ciccr-vignette.Rmd @@ -131,7 +131,7 @@ Here, the relevant coefficient is 2.06 (`t`) and its two-sided 90% confidence in ### Causal Inference on Attributable Risk Using Case-Control Samples We now consider attributable risk, that is the absolute difference in probabilities. -We carry out causal inference on attributale risk by +We carry out causal inference on attributable risk by ```{r} results_AR = cicc_AR(y, t, x, sampling = 'cc', no_boot = 100) @@ -191,7 +191,7 @@ Note that the estimates and upper bounds are constant across the unknown true ca ### Causal Inference on Attributable Risk Using Case-Population Samples -We now consider causal inference on attributale risk by +We now consider causal inference on attributable risk by ```{r} results_AR = cicc_AR(y, t, x, sampling = 'cp', no_boot = 100)