diff --git a/docs/404.html b/docs/404.html index 44c47c4..8b41041 100644 --- a/docs/404.html +++ b/docs/404.html @@ -88,6 +88,9 @@
  • Workflow: How to use the serosurvey R package?
  • +
  • + Introduction: serosurvey R package +
  • diff --git a/docs/CODE_OF_CONDUCT.html b/docs/CODE_OF_CONDUCT.html index 29d507f..3000c62 100644 --- a/docs/CODE_OF_CONDUCT.html +++ b/docs/CODE_OF_CONDUCT.html @@ -88,6 +88,9 @@
  • Workflow: How to use the serosurvey R package?
  • +
  • + Introduction: serosurvey R package +
  • diff --git a/docs/CONTRIBUTING.html b/docs/CONTRIBUTING.html index cc56355..c548866 100644 --- a/docs/CONTRIBUTING.html +++ b/docs/CONTRIBUTING.html @@ -88,6 +88,9 @@
  • Workflow: How to use the serosurvey R package?
  • +
  • + Introduction: serosurvey R package +
  • diff --git a/docs/ISSUE_TEMPLATE.html b/docs/ISSUE_TEMPLATE.html index 8fec510..7bc1da0 100644 --- a/docs/ISSUE_TEMPLATE.html +++ b/docs/ISSUE_TEMPLATE.html @@ -88,6 +88,9 @@
  • Workflow: How to use the serosurvey R package?
  • +
  • + Introduction: serosurvey R package +
  • diff --git a/docs/LICENSE.html b/docs/LICENSE.html index ec784e9..6502413 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -88,6 +88,9 @@
  • Workflow: How to use the serosurvey R package?
  • +
  • + Introduction: serosurvey R package +
  • diff --git a/docs/SUPPORT.html b/docs/SUPPORT.html index b5f4e56..6b3e5cc 100644 --- a/docs/SUPPORT.html +++ b/docs/SUPPORT.html @@ -88,6 +88,9 @@
  • Workflow: How to use the serosurvey R package?
  • +
  • + Introduction: serosurvey R package +
  • diff --git a/docs/articles/howto-reprex.html b/docs/articles/howto-reprex.html index 052e8c4..536cdb6 100644 --- a/docs/articles/howto-reprex.html +++ b/docs/articles/howto-reprex.html @@ -56,6 +56,9 @@
  • Workflow: How to use the serosurvey R package?
  • +
  • + Introduction: serosurvey R package +
  • @@ -462,7 +465,7 @@

    } toc() -#> 248.79 sec elapsed +#> 573.72 sec elapsed outcome_01_adj <- out %>% mutate(rowname=as.numeric(rowname)) %>% @@ -559,7 +562,7 @@

    83 75.9 (65.3 - 84.6) 78.9 ( 67.5 - 87) -83.132 (65.85 - 95.6) +83.150 (65.89 - 95.5) 0.06 @@ -571,7 +574,7 @@

    20 25.0 ( 8.7 - 49.1) 14.8 ( 3.8 - 44) -0.414 ( 0.28 - 29.9) +0.425 ( 0.28 - 29.9) 0.59 @@ -583,7 +586,7 @@

    23 65.2 (42.7 - 83.6) 44.8 ( 16.0 - 78) -31.518 ( 0.40 - 81.1) +31.506 ( 0.40 - 81.1) 0.38 @@ -693,19 +696,22 @@

    outcome_01_adj_tbl %>%
       filter(str_detect(numerator,"outcome")) %>% 
    -  ggplot_prevalence_ii(
    +  ggplot_prevalence(
         denominator_level = denominator_level,
         numerator = numerator,
         proportion = prop,
         proportion_upp = prop_upp,
         proportion_low = prop_low) +
    -  theme(axis.text.x = element_text(angle = 0, vjust = 0, hjust=0)) +
    -  # coord_flip() +
    -  facet_wrap(denominator~.,scales = "free") +
    -  # facet_grid(denominator~.,scales = "free_y") +
    -  colorspace::scale_color_discrete_qualitative() +
    -  labs(title = "Prevalence of numerators across denominators",
    -       y = "Prevalence",x = "")
    + # theme(axis.text.x = element_text(angle = 0, vjust = 0, hjust=0)) + + scale_y_continuous( + labels = scales::percent_format(accuracy = 1), + breaks = scales::pretty_breaks(n = 5)) + + # coord_flip() + + facet_wrap(denominator~.,scales = "free") + + # facet_grid(denominator~.,scales = "free_y") + + colorspace::scale_color_discrete_qualitative() + + labs(title = "Prevalence of numerators across denominators", + y = "Prevalence",x = "")

    diff --git a/docs/articles/howto-reprex_files/figure-html/unnamed-chunk-12-1.png b/docs/articles/howto-reprex_files/figure-html/unnamed-chunk-12-1.png index 5e59e18..7a8e8ad 100644 Binary files a/docs/articles/howto-reprex_files/figure-html/unnamed-chunk-12-1.png and b/docs/articles/howto-reprex_files/figure-html/unnamed-chunk-12-1.png differ diff --git a/docs/articles/index.html b/docs/articles/index.html index 1987128..fdbb977 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -88,6 +88,9 @@
  • Workflow: How to use the serosurvey R package?
  • +
  • + Introduction: serosurvey R package +
  • @@ -121,6 +124,7 @@

    All vignettes

    diff --git a/docs/articles/intro.html b/docs/articles/intro.html new file mode 100644 index 0000000..9ea4134 --- /dev/null +++ b/docs/articles/intro.html @@ -0,0 +1,357 @@ + + + + + + + +Introduction: serosurvey R package • serosurvey + + + + + + + + + + +
    +
    + + + + +
    +
    + + + + +
    +

    +Introduction

    +

    Here we present three examples, definitions and related references:

    +
    library(serosurvey)
    + +
    +

    +2. survey: Estimate multiple prevalences

    +
      +
    • +

      In the Article tab we provide a workflow to estimate multiple prevalences:

      +
        +
      • using different set of covariates and outcomes as numerators or denominators,
      • +
      • in one single pipe operation
      • +
      +
    • +
    +
    # crear matriz
    +  #
    +  # set 01 of denominator-numerator
    +  #
    +expand_grid(
    +  design=list(design),
    +  denominator=c("covariate_01","covariate_02"), # covariates
    +  numerator=c("outcome_one","outcome_two") # outcomes
    +  ) %>% 
    +  #
    +  # set 02 of denominator-numerator (e.g. within main outcome)
    +  #
    +  union_all(
    +    expand_grid(
    +      design=list(design),
    +      denominator=c("outcome_one","outcome_two"), # outcomes
    +      numerator=c("covariate_02") # covariates
    +    )
    +  ) %>% 
    +  #
    +  # create symbols (to be readed as arguments)
    +  #
    +  mutate(
    +    denominator=map(denominator,dplyr::sym),
    +    numerator=map(numerator,dplyr::sym)
    +  ) %>% 
    +  #
    +  # estimate prevalence
    +  #
    +  mutate(output=pmap(.l = select(.,design,denominator,numerator),
    +                     .f = serosvy_proportion)) %>% 
    +  #
    +  # show the outcome
    +  #
    +  select(-design,-denominator,-numerator) %>% 
    +  unnest(cols = c(output)) %>% 
    +  print(n=Inf)
    +#> # A tibble: 25 x 23
    +#>    denominator denominator_lev~ numerator numerator_level   prop prop_low
    +#>    <chr>       <fct>            <chr>     <fct>            <dbl>    <dbl>
    +#>  1 covariate_~ E                outcome_~ No              0.211   0.130  
    +#>  2 covariate_~ E                outcome_~ Yes             0.789   0.675  
    +#>  3 covariate_~ H                outcome_~ No              0.852   0.564  
    +#>  4 covariate_~ H                outcome_~ Yes             0.148   0.0377 
    +#>  5 covariate_~ M                outcome_~ No              0.552   0.224  
    +#>  6 covariate_~ M                outcome_~ Yes             0.448   0.160  
    +#>  7 covariate_~ E                outcome_~ (-0.1,50]       0.182   0.0499 
    +#>  8 covariate_~ E                outcome_~ (50,100]        0.818   0.515  
    +#>  9 covariate_~ H                outcome_~ (-0.1,50]       0.0769  0.00876
    +#> 10 covariate_~ H                outcome_~ (50,100]        0.923   0.560  
    +#> 11 covariate_~ M                outcome_~ (50,100]        1.00    1.00   
    +#> 12 covariate_~ No               outcome_~ No              1.00    1.00   
    +#> 13 covariate_~ Yes              outcome_~ No              0.0334  0.00884
    +#> 14 covariate_~ Yes              outcome_~ Yes             0.967   0.882  
    +#> 15 covariate_~ No               outcome_~ (-0.1,50]       0.218   0.0670 
    +#> 16 covariate_~ No               outcome_~ (50,100]        0.782   0.479  
    +#> 17 covariate_~ Yes              outcome_~ (-0.1,50]       0.0914  0.0214 
    +#> 18 covariate_~ Yes              outcome_~ (50,100]        0.909   0.684  
    +#> 19 outcome_one No               covariat~ No              0.939   0.778  
    +#> 20 outcome_one No               covariat~ Yes             0.0615  0.0148 
    +#> 21 outcome_one Yes              covariat~ Yes             1.00    1.00   
    +#> 22 outcome_two (-0.1,50]        covariat~ No              0.549   0.294  
    +#> 23 outcome_two (-0.1,50]        covariat~ Yes             0.451   0.219  
    +#> 24 outcome_two (50,100]         covariat~ No              0.305   0.188  
    +#> 25 outcome_two (50,100]         covariat~ Yes             0.695   0.546  
    +#> # ... with 17 more variables: prop_upp <dbl>, prop_cv <dbl>,
    +#> #   prop_se <dbl>, total <dbl>, total_low <dbl>, total_upp <dbl>,
    +#> #   total_cv <dbl>, total_se <dbl>, total_deff <dbl>, total_den <dbl>,
    +#> #   total_den_low <dbl>, total_den_upp <dbl>, raw_num <int>,
    +#> #   raw_den <int>, raw_prop <dbl>, raw_prop_low <dbl>, raw_prop_upp <dbl>
    +
    +

    +learnr tutorial

    +
      +
    • Learn to build this with in a tutorial in Spanish:
    • +
    +
    # install learner and run tutorial
    +if(!require("learnr")) install.packages("learnr")
    +learnr::run_tutorial(name = "taller",package = "serosurvey")
    +
    +
    +
    +

    +3. serology: Estimate prevalence Under misclassification

    +
      +
    • We gather one frequentist approach (Rogan and Gladen 1978), available in different Github repos, that deal with misclassification due to an imperfect diagnostic test (Azman et al. 2020; Takahashi, Greenhouse, and Rodríguez-Barraquer 2020). Check the Reference tab.

    • +
    • We provide tidy outputs for bayesian approaches developed in Daniel B. Larremore et al. (2020) here and Daniel B Larremore et al. (2020) here:

    • +
    • You can use them with purrr and furrr to efficiently iterate and parallelize this step for multiple prevalences. Check the workflow in Article tab.

    • +
    + +
    +

    +Unknown test performance - Bayesian method +

    +
      +
    • The test performance is called “unknown” or “uncertain” when test sensitivity and specificity are not known with certainty (Kritsotakis 2020; Diggle 2011; Gelman and Carpenter 2020) and lab validation data is available with a limited set of samples, tipically during a novel pathogen outbreak.
    • +
    + +

    +
    example("serosvy_unknown_sample_posterior")
    +
    +
    +
    +
    +

    +Contributing

    +

    Feel free to fill an issue or contribute with your functions or workflows in a pull request.

    +

    Here are a list of publications with interesting approaches using R:

    +
      +
    • Silveira et al. (2020) and Hallal et al. (2020) analysed a serological survey accounting for sampling design and test validity using parametric bootstraping, following Lewis and Torgerson (2012).

    • +
    • Flor et al. (2020) implemented a lot of frequentist and bayesian methods for test with known sensitivity and specificity. Code is available here.

    • +
    • Gelman and Carpenter (2020) also applied Bayesian inference with hierarchical regression and post-stratification to account for test uncertainty with unknown specificity and sensitivity. Here a case-study.

    • +
    +
    +
    +

    +References

    +
    +
    +

    Azman, Andrew S, Stephen Lauer, M. Taufiqur Rahman Bhuiyan, Francisco J Luquero, Daniel T Leung, Sonia Hegde, Jason B Harris, et al. 2020. “Vibrio Cholerae O1 Transmission in Bangladesh: Insights from a Nationally- Representative Serosurvey,” March. https://doi.org/10.1101/2020.03.13.20035352.

    +
    +
    +

    Diggle, Peter J. 2011. “Estimating Prevalence Using an Imperfect Test.” Epidemiology Research International 2011: 1–5. https://doi.org/10.1155/2011/608719.

    +
    +
    +

    Flor, Matthias, Michael Weiß, Thomas Selhorst, Christine Müller-Graf, and Matthias Greiner. 2020. “Comparison of Bayesian and Frequentist Methods for Prevalence Estimation Under Misclassification.” BMC Public Health 20 (1). https://doi.org/10.1186/s12889-020-09177-4.

    +
    +
    +

    Gelman, Andrew, and Bob Carpenter. 2020. “Bayesian Analysis of Tests with Unknown Specificity and Sensitivity.” Journal of the Royal Statistical Society: Series C (Applied Statistics), August. https://doi.org/10.1111/rssc.12435.

    +
    +
    +

    Hallal, Pedro C, Fernando P Hartwig, Bernardo L Horta, Mariângela F Silveira, Claudio J Struchiner, Luı́s P Vidaletti, Nelson A Neumann, et al. 2020. “SARS-CoV-2 Antibody Prevalence in Brazil: Results from Two Successive Nationwide Serological Household Surveys.” The Lancet Global Health, September. https://doi.org/10.1016/s2214-109x(20)30387-9.

    +
    +
    +

    Kritsotakis, Evangelos I. 2020. “On the Importance of Population-Based Serological Surveys of SARS-CoV-2 Without Overlooking Their Inherent Uncertainties.” Public Health in Practice 1 (November): 100013. https://doi.org/10.1016/j.puhip.2020.100013.

    +
    +
    +

    Larremore, Daniel B, Bailey K Fosdick, Kate M Bubar, Sam Zhang, Stephen M Kissler, C. Jessica E. Metcalf, Caroline Buckee, and Yonatan Grad. 2020. “Estimating SARS-CoV-2 Seroprevalence and Epidemiological Parameters with Uncertainty from Serological Surveys.” medRxiv, April. https://doi.org/10.1101/2020.04.15.20067066.

    +
    +
    +

    Larremore, Daniel B., Bailey K. Fosdick, Sam Zhang, and Yonatan H. Grad. 2020. “Jointly Modeling Prevalence, Sensitivity and Specificity for Optimal Sample Allocation.” bioRxiv, May. https://doi.org/10.1101/2020.05.23.112649.

    +
    +
    +

    Lewis, Fraser I, and Paul R Torgerson. 2012. “A Tutorial in Estimating the Prevalence of Disease in Humans and Animals in the Absence of a Gold Standard Diagnostic.” Emerging Themes in Epidemiology 9 (1). https://doi.org/10.1186/1742-7622-9-9.

    +
    +
    +

    Rogan, Walter J., and Beth Gladen. 1978. “Estimating Prevalence from the Results of A Screening Test.” American Journal of Epidemiology 107 (1): 71–76. https://doi.org/10.1093/oxfordjournals.aje.a112510.

    +
    +
    +

    Silveira, Mariângela F., Aluı́sio J. D. Barros, Bernardo L. Horta, Lúcia C. Pellanda, Gabriel D. Victora, Odir A. Dellagostin, Claudio J. Struchiner, et al. 2020. “Population-Based Surveys of Antibodies Against SARS-CoV-2 in Southern Brazil.” Nature Medicine 26 (8): 1196–9. https://doi.org/10.1038/s41591-020-0992-3.

    +
    +
    +

    Takahashi, Saki, Bryan Greenhouse, and Isabel Rodríguez-Barraquer. 2020. “Are SARS-CoV-2 seroprevalence estimates biased?” The Journal of Infectious Diseases, August. https://doi.org/10.1093/infdis/jiaa523.

    +
    +
    +
    +
    + + + +
    + + + +
    + +
    +

    Site built with pkgdown 1.4.1.

    +
    + +
    +
    + + + + + + diff --git a/docs/articles/intro_files/figure-html/unnamed-chunk-10-1.png b/docs/articles/intro_files/figure-html/unnamed-chunk-10-1.png new file mode 100644 index 0000000..dbcb343 Binary files /dev/null and b/docs/articles/intro_files/figure-html/unnamed-chunk-10-1.png differ diff --git a/docs/articles/intro_files/figure-html/unnamed-chunk-14-1.png b/docs/articles/intro_files/figure-html/unnamed-chunk-14-1.png new file mode 100644 index 0000000..2412ab0 Binary files /dev/null and b/docs/articles/intro_files/figure-html/unnamed-chunk-14-1.png differ diff --git a/docs/authors.html b/docs/authors.html index 363b58f..ff75958 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -88,6 +88,9 @@
  • Workflow: How to use the serosurvey R package?
  • +
  • + Introduction: serosurvey R package +
  • diff --git a/docs/index.html b/docs/index.html index f5a3217..9cf1f67 100644 --- a/docs/index.html +++ b/docs/index.html @@ -59,6 +59,9 @@
  • Workflow: How to use the serosurvey R package?
  • +
  • + Introduction: serosurvey R package +
  • @@ -81,6 +84,9 @@
    + +


    Disclaimer

    +

    This package is a work in progress. It has been released to get feedback from users that we can incorporate in future releases.

    @@ -91,221 +97,33 @@

    Installation

    +

    You can install the developmental version of serosurvey from GitHub with:

    if(!require("remotes")) install.packages("remotes")
     remotes::install_github("avallecam/serosurvey")
    -
    +

    -Example

    -

    Three basic examples which shows you how to solve common problems:

    -
    library(serosurvey)
    -
    -

    -1. survey: Estimate single prevalences

    -
      +Brief description

    +

    The current workflow is divided in two steps:

    +
    1. -

      From a srvyr survey design object, serosvy_proportion estimates:

      - -
    2. - -
      serosvy_proportion(design = design,
      -                   denominator = covariate_01,
      -                   numerator = outcome_one)
      -#> # A tibble: 6 x 23
      -#>   denominator denominator_lev~ numerator numerator_level  prop prop_low
      -#>   <chr>       <fct>            <chr>     <fct>           <dbl>    <dbl>
      -#> 1 covariate_~ E                outcome_~ No              0.211   0.130 
      -#> 2 covariate_~ E                outcome_~ Yes             0.789   0.675 
      -#> 3 covariate_~ H                outcome_~ No              0.852   0.564 
      -#> 4 covariate_~ H                outcome_~ Yes             0.148   0.0377
      -#> 5 covariate_~ M                outcome_~ No              0.552   0.224 
      -#> 6 covariate_~ M                outcome_~ Yes             0.448   0.160 
      -#> # ... with 17 more variables: prop_upp <dbl>, prop_cv <dbl>,
      -#> #   prop_se <dbl>, total <dbl>, total_low <dbl>, total_upp <dbl>,
      -#> #   total_cv <dbl>, total_se <dbl>, total_deff <dbl>, total_den <dbl>,
      -#> #   total_den_low <dbl>, total_den_upp <dbl>, raw_num <int>,
      -#> #   raw_den <int>, raw_prop <dbl>, raw_prop_low <dbl>, raw_prop_upp <dbl>
      -
      example("serosvy_proportion")
      - -
      -

      -2. survey: Estimate multiple prevalences

      - -
      # crear matriz
      -  #
      -  # set 01 of denominator-numerator
      -  #
      -expand_grid(
      -  design=list(design),
      -  denominator=c("covariate_01","covariate_02"), # covariates
      -  numerator=c("outcome_one","outcome_two") # outcomes
      -  ) %>% 
      -  #
      -  # set 02 of denominator-numerator (e.g. within main outcome)
      -  #
      -  union_all(
      -    expand_grid(
      -      design=list(design),
      -      denominator=c("outcome_one","outcome_two"), # outcomes
      -      numerator=c("covariate_02") # covariates
      -    )
      -  ) %>% 
      -  #
      -  # create symbols (to be readed as arguments)
      -  #
      -  mutate(
      -    denominator=map(denominator,dplyr::sym),
      -    numerator=map(numerator,dplyr::sym)
      -  ) %>% 
      -  #
      -  # estimate prevalence
      -  #
      -  mutate(output=pmap(.l = select(.,design,denominator,numerator),
      -                     .f = serosvy_proportion)) %>% 
      -  #
      -  # show the outcome
      -  #
      -  select(-design,-denominator,-numerator) %>% 
      -  unnest(cols = c(output)) %>% 
      -  print(n=Inf)
      -#> # A tibble: 25 x 23
      -#>    denominator denominator_lev~ numerator numerator_level   prop prop_low
      -#>    <chr>       <fct>            <chr>     <fct>            <dbl>    <dbl>
      -#>  1 covariate_~ E                outcome_~ No              0.211   0.130  
      -#>  2 covariate_~ E                outcome_~ Yes             0.789   0.675  
      -#>  3 covariate_~ H                outcome_~ No              0.852   0.564  
      -#>  4 covariate_~ H                outcome_~ Yes             0.148   0.0377 
      -#>  5 covariate_~ M                outcome_~ No              0.552   0.224  
      -#>  6 covariate_~ M                outcome_~ Yes             0.448   0.160  
      -#>  7 covariate_~ E                outcome_~ (-0.1,50]       0.182   0.0499 
      -#>  8 covariate_~ E                outcome_~ (50,100]        0.818   0.515  
      -#>  9 covariate_~ H                outcome_~ (-0.1,50]       0.0769  0.00876
      -#> 10 covariate_~ H                outcome_~ (50,100]        0.923   0.560  
      -#> 11 covariate_~ M                outcome_~ (50,100]        1.00    1.00   
      -#> 12 covariate_~ No               outcome_~ No              1.00    1.00   
      -#> 13 covariate_~ Yes              outcome_~ No              0.0334  0.00884
      -#> 14 covariate_~ Yes              outcome_~ Yes             0.967   0.882  
      -#> 15 covariate_~ No               outcome_~ (-0.1,50]       0.218   0.0670 
      -#> 16 covariate_~ No               outcome_~ (50,100]        0.782   0.479  
      -#> 17 covariate_~ Yes              outcome_~ (-0.1,50]       0.0914  0.0214 
      -#> 18 covariate_~ Yes              outcome_~ (50,100]        0.909   0.684  
      -#> 19 outcome_one No               covariat~ No              0.939   0.778  
      -#> 20 outcome_one No               covariat~ Yes             0.0615  0.0148 
      -#> 21 outcome_one Yes              covariat~ Yes             1.00    1.00   
      -#> 22 outcome_two (-0.1,50]        covariat~ No              0.549   0.294  
      -#> 23 outcome_two (-0.1,50]        covariat~ Yes             0.451   0.219  
      -#> 24 outcome_two (50,100]         covariat~ No              0.305   0.188  
      -#> 25 outcome_two (50,100]         covariat~ Yes             0.695   0.546  
      -#> # ... with 17 more variables: prop_upp <dbl>, prop_cv <dbl>,
      -#> #   prop_se <dbl>, total <dbl>, total_low <dbl>, total_upp <dbl>,
      -#> #   total_cv <dbl>, total_se <dbl>, total_deff <dbl>, total_den <dbl>,
      -#> #   total_den_low <dbl>, total_den_upp <dbl>, raw_num <int>,
      -#> #   raw_den <int>, raw_prop <dbl>, raw_prop_low <dbl>, raw_prop_upp <dbl>
      -
      -
      -

      -3. serology: Estimate prevalence Under misclassification

      - -
      -

      -Known test performance - Bayesian method -

      - -

      -
      example("serosvy_known_sample_posterior")
      +serology: Estimate prevalence Under misclassification for a device with Known or Unknown test performance +
    -
    -

    -Unknown test performance - Bayesian method -

    +
    +

    +More

    - -

    -
    example("serosvy_unknown_sample_posterior")
    -
    -
    - -
    -

    -Run a learnr tutorial

    -
    # install package
    -if(!require("remotes")) install.packages("remotes")
    -remotes::install_github("avallecam/serosurvey")
    -# install learner and run tutorial
    -if(!require("learnr")) install.packages("learnr")
    -learnr::run_tutorial(name = "taller",package = "serosurvey")

    Contributing

    Feel free to fill an issue or contribute with your functions or workflows in a pull request.

    -

    Here are a list of publications with interesting approaches using R:

    - -
    -
    -

    -How to cite this R package

    -
    citation("serosurvey")
    -#> 
    -#> To cite package ‘serosurvey’ in publications use:
    -#> 
    -#> Valle Campos A (2020). "serosurvey: Serological Survey Analysis
    -#> For Prevalence Estimation Under Misclassification." _Zenodo_. doi:
    -#> 10.5281/zenodo.4065080 (URL:
    -#> https://doi.org/10.5281/zenodo.4065080), R package version 1.0,
    -#> <URL: https://avallecam.github.io/serosurvey/>.
    -#> 
    -#> A BibTeX entry for LaTeX users is
    -#> 
    -#>   @Article{,
    -#>     author = {Andree {Valle Campos}},
    -#>     title = {serosurvey: Serological Survey Analysis For Prevalence Estimation Under Misclassification},
    -#>     journal = {Zenodo},
    -#>     month = {oct},
    -#>     year = {2020},
    -#>     doi = {10.5281/zenodo.4065080},
    -#>     note = {R package version 1.0},
    -#>     url = {https://avallecam.github.io/serosurvey/},
    -#>   }

    @@ -318,147 +136,34 @@

    Acknowledgements

    Many thanks to the Centro Nacional de Epidemiología, Prevención y Control de Enfermedades (CDC Perú) for the opportunity to work on this project.

    -
    +

    -References

    -

    Azman, Andrew S, Stephen Lauer, M. Taufiqur Rahman Bhuiyan, Francisco J Luquero, Daniel T Leung, Sonia Hegde, Jason B Harris, et al. 2020. “Vibrio Cholerae O1 Transmission in Bangladesh: Insights from a Nationally- Representative Serosurvey,” March. https://doi.org/10.1101/2020.03.13.20035352.

    -

    Diggle, Peter J. 2011. “Estimating Prevalence Using an Imperfect Test.” Epidemiology Research International 2011: 1–5. https://doi.org/10.1155/2011/608719.

    -

    Flor, Matthias, Michael Weiß, Thomas Selhorst, Christine Müller-Graf, and Matthias Greiner. 2020. “Comparison of Bayesian and Frequentist Methods for Prevalence Estimation Under Misclassification.” BMC Public Health 20 (1). https://doi.org/10.1186/s12889-020-09177-4.

    -

    Gelman, Andrew, and Bob Carpenter. 2020. “Bayesian Analysis of Tests with Unknown Specificity and Sensitivity.” Journal of the Royal Statistical Society: Series C (Applied Statistics), August. https://doi.org/10.1111/rssc.12435.

    -

    Hallal, Pedro C, Fernando P Hartwig, Bernardo L Horta, Mariângela F Silveira, Claudio J Struchiner, Luı́s P Vidaletti, Nelson A Neumann, et al. 2020. “SARS-CoV-2 Antibody Prevalence in Brazil: Results from Two Successive Nationwide Serological Household Surveys.” The Lancet Global Health, September. https://doi.org/10.1016/s2214-109x(20)30387-9.

    -

    Kritsotakis, Evangelos I. 2020. “On the Importance of Population-Based Serological Surveys of SARS-CoV-2 Without Overlooking Their Inherent Uncertainties.” Public Health in Practice 1 (November): 100013. https://doi.org/10.1016/j.puhip.2020.100013.

    -

    Larremore, Daniel B., Bailey K Fosdick, Kate M Bubar, Sam Zhang, Stephen M Kissler, C. Jessica E. Metcalf, Caroline Buckee, and Yonatan Grad.2020.“Estimating SARS-CoV-2 Seroprevalence and Epidemiological Parameters with Uncertainty from Serological Surveys.” medRxiv, April. https://doi.org/10.1101/2020.04.15.20067066.

    -

    Larremore, Daniel B., Bailey K. Fosdick, Sam Zhang, and Yonatan Grad.2020.“Jointly Modeling Prevalence, Sensitivity and Specificity for Optimal Sample Allocation.” bioRxiv, May. https://doi.org/10.1101/2020.05.23.112649.

    -

    Lewis, Fraser I, and Paul R Torgerson. 2012. “A Tutorial in Estimating the Prevalence of Disease in Humans and Animals in the Absence of a Gold Standard Diagnostic.” Emerging Themes in Epidemiology 9 (1). https://doi.org/10.1186/1742-7622-9-9.

    -

    Rogan, Walter J., and Beth Gladen. 1978. “Estimating Prevalence from the Results of A Screening Test.” American Journal of Epidemiology 107 (1): 71–76. https://doi.org/10.1093/oxfordjournals.aje.a112510.

    -

    Silveira, Mariângela F., Aluı́sio J. D. Barros, Bernardo L. Horta, Lúcia C. Pellanda, Gabriel D. Victora, Odir A. Dellagostin, Claudio J. Struchiner, et al. 2020. “Population-Based Surveys of Antibodies Against SARS-CoV-2 in Southern Brazil.” Nature Medicine 26 (8): 1196–9. https://doi.org/10.1038/s41591-020-0992-3.

    -

    Takahashi, Saki, Bryan Greenhouse, and Isabel Rodríguez-Barraquer. 2020. “Are SARS-CoV-2 seroprevalence estimates biased?” The Journal of Infectious Diseases, August. https://doi.org/10.1093/infdis/jiaa523.

    -
    - -
    - -Azman, Andrew S, Stephen Lauer, M. Taufiqur Rahman Bhuiyan, Francisco J -Luquero, Daniel T Leung, Sonia Hegde, Jason B Harris, et al. 2020. -“Vibrio Cholerae O1 Transmission in Bangladesh: Insights from a -Nationally- Representative Serosurvey,” March. -. - - -
    - -
    - -Diggle, Peter J. 2011. “Estimating Prevalence Using an Imperfect Test.” -*Epidemiology Research International* 2011: 1–5. -. - - -
    - -
    - -Flor, Matthias, Michael Weiß, Thomas Selhorst, Christine Müller-Graf, -and Matthias Greiner. 2020. “Comparison of Bayesian and Frequentist -Methods for Prevalence Estimation Under Misclassification.” *BMC Public -Health* 20 (1). . - - -
    - -
    - -Gelman, Andrew, and Bob Carpenter. 2020. “Bayesian Analysis of Tests -with Unknown Specificity and Sensitivity.” *Journal of the Royal -Statistical Society: Series C (Applied Statistics)*, August. -. - - -
    - -
    - -Hallal, Pedro C, Fernando P Hartwig, Bernardo L Horta, Mariângela F -Silveira, Claudio J Struchiner, Luı́s P Vidaletti, Nelson A Neumann, et -al. 2020. “SARS-CoV-2 Antibody Prevalence in Brazil: Results from Two -Successive Nationwide Serological Household Surveys.” *The Lancet Global -Health*, September. . - - -
    - -
    - -Kritsotakis, Evangelos I. 2020. “On the Importance of Population-Based -Serological Surveys of SARS-CoV-2 Without Overlooking Their Inherent -Uncertainties.” *Public Health in Practice* 1 (November): 100013. -. - - -
    - -
    - -Larremore, Daniel B, Bailey K Fosdick, Kate M Bubar, Sam Zhang, Stephen -M Kissler, C. Jessica E. Metcalf, Caroline Buckee, and Yonatan Grad. -2020. “Estimating SARS-CoV-2 Seroprevalence and Epidemiological -Parameters with Uncertainty from Serological Surveys.” *medRxiv*, April. -. - - -
    - -
    - -Larremore, Daniel B., Bailey K. Fosdick, Sam Zhang, and Yonatan H. Grad. -2020. “Jointly Modeling Prevalence, Sensitivity and Specificity for -Optimal Sample Allocation.” *bioRxiv*, May. -. - - -
    - -
    - -Lewis, Fraser I, and Paul R Torgerson. 2012. “A Tutorial in Estimating -the Prevalence of Disease in Humans and Animals in the Absence of a Gold -Standard Diagnostic.” *Emerging Themes in Epidemiology* 9 (1). -. - - -
    - -
    - -Rogan, Walter J., and Beth Gladen. 1978. “Estimating Prevalence from the -Results of A Screening Test.” *American Journal of Epidemiology* 107 -(1): 71–76. . - - -
    - - - -
    - -Takahashi, Saki, Bryan Greenhouse, and Isabel Rodríguez-Barraquer. 2020. -“Are SARS-CoV-2 seroprevalence estimates biased?” *The Journal of -Infectious Diseases*, August. . - -
    -
    -
    -
    -
    ggplot_prevalence(data, category, outcome, proportion, proportion_upp,
    -  proportion_low, breaks_n = 5)
    -
    -ggplot_prevalence_ii(data, denominator_level, numerator, proportion,
    -  proportion_upp, proportion_low, breaks_n = 5)
    +
    ggplot_prevalence(data, denominator_level, numerator, proportion,
    +  proportion_upp, proportion_low)

    Arguments

    @@ -140,12 +140,16 @@

    Arg

    - - + + - - + + @@ -157,23 +161,8 @@

    Arg

    - - - - - - - - - - - - - +

    input tibble

    category

    denominator level

    denominator_level
      +
    • denominator values column

    • +
    outcome

    numerator variable

    numerator
      +
    • numerator variable name column

    • +
    proportion
    proportion_low

    lower interval

    breaks_n

    number of breaks in axis

    denominator_level
      -
    • denominator values column

    • -
    numerator
      -
    • numerator variable name column

    • -

    lower interval +#param breaks_n number of breaks in axis

    @@ -182,7 +171,6 @@

    Fun diff --git a/docs/reference/index.html b/docs/reference/index.html index a8f4f01..8453798 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -88,6 +88,9 @@
  • Workflow: How to use the serosurvey R package?
  • +
  • + Introduction: serosurvey R package +
  • @@ -139,7 +142,7 @@

    ggplot_prevalence() ggplot_prevalence_ii()

    +

    ggplot_prevalence()

    Visualization of proportions

    diff --git a/docs/reference/rogan_gladen_stderr_unk.html b/docs/reference/rogan_gladen_stderr_unk.html index 372364c..fbc602b 100644 --- a/docs/reference/rogan_gladen_stderr_unk.html +++ b/docs/reference/rogan_gladen_stderr_unk.html @@ -91,6 +91,9 @@
  • Workflow: How to use the serosurvey R package?
  • +
  • + Introduction: serosurvey R package +
  • diff --git a/docs/reference/sample_posterior_r_mcmc_hyperR.html b/docs/reference/sample_posterior_r_mcmc_hyperR.html index 449b760..f022e15 100644 --- a/docs/reference/sample_posterior_r_mcmc_hyperR.html +++ b/docs/reference/sample_posterior_r_mcmc_hyperR.html @@ -91,6 +91,9 @@
  • Workflow: How to use the serosurvey R package?
  • +
  • + Introduction: serosurvey R package +
  • diff --git a/docs/reference/sample_posterior_r_mcmc_testun.html b/docs/reference/sample_posterior_r_mcmc_testun.html index a3a4f5e..d9da228 100644 --- a/docs/reference/sample_posterior_r_mcmc_testun.html +++ b/docs/reference/sample_posterior_r_mcmc_testun.html @@ -91,6 +91,9 @@
  • Workflow: How to use the serosurvey R package?
  • +
  • + Introduction: serosurvey R package +
  • diff --git a/docs/reference/serosvy_known_sample_posterior.html b/docs/reference/serosvy_known_sample_posterior.html index e194ce0..675cbea 100644 --- a/docs/reference/serosvy_known_sample_posterior.html +++ b/docs/reference/serosvy_known_sample_posterior.html @@ -91,6 +91,9 @@
  • Workflow: How to use the serosurvey R package?
  • +
  • + Introduction: serosurvey R package +
  • diff --git a/docs/reference/serosvy_unknown_sample_posterior.html b/docs/reference/serosvy_unknown_sample_posterior.html index 62316cf..221e643 100644 --- a/docs/reference/serosvy_unknown_sample_posterior.html +++ b/docs/reference/serosvy_unknown_sample_posterior.html @@ -91,6 +91,9 @@
  • Workflow: How to use the serosurvey R package?
  • +
  • + Introduction: serosurvey R package +
  • diff --git a/docs/reference/srvyr_prop_step_01.html b/docs/reference/srvyr_prop_step_01.html index c527187..1ac491e 100644 --- a/docs/reference/srvyr_prop_step_01.html +++ b/docs/reference/srvyr_prop_step_01.html @@ -91,6 +91,9 @@
  • Workflow: How to use the serosurvey R package?
  • +
  • + Introduction: serosurvey R package +
  • diff --git a/docs/reference/unite_dotwhiskers.html b/docs/reference/unite_dotwhiskers.html index 1412cd1..7acf19d 100644 --- a/docs/reference/unite_dotwhiskers.html +++ b/docs/reference/unite_dotwhiskers.html @@ -91,6 +91,9 @@
  • Workflow: How to use the serosurvey R package?
  • +
  • + Introduction: serosurvey R package +