Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Commit

Permalink
will's run-through on vaccines
Browse files Browse the repository at this point in the history
  • Loading branch information
fwhigh committed Mar 18, 2014
1 parent c1a0495 commit 2ae7fb9
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 53 deletions.
31 changes: 14 additions & 17 deletions inst/anc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,33 +37,33 @@
<div id="editor">Medic Mobile ANC Effectiveness Worksheet
========================================

# Synopsis
## Synopsis

The purpose of this worksheet is to estimate the effectiveness of ANC
treatment on a population.

# Requirements
## Requirements

This worksheet requires you to run Spectrum. Spectrum is a Windows
program, but you can run it on a Mac. Please see the DataKind How To
document for instructions.

# Software Versions Tested
## Software Versions Tested

* Mac OS X Mavericks
* Wine 1.6.1, packaged with WineBottler
* Spectrum 4.7, includes LiST, DemProj and AIM
* RStudio 0.98, R 3.0.1, knitr 1.5, Markdownapp for OpenCPU 1.2.2

# Glossary
## Glossary

ANC: Antenatal care

CBR: Crude birth rate

LiST: Lives Saved Tool

# Instructions
## Instructions

This is a [knitr](http://yihui.name/knitr/)
[markdown](http://daringfireball.net/projects/markdown/) document.
Expand Down Expand Up @@ -93,7 +93,7 @@
to enter data into this worksheet or copy a derived quantity from this
worksheet into Spectrum.

# Preparation
## Preparation

What is the name of the country?

Expand Down Expand Up @@ -151,7 +151,7 @@
n.women.covered <- 100000
```

# Do a national projection for `r country.name`
## Do a national projection for `r country.name`

Launch Spectrum. (If this is your first time, proceed to the next
step now. If this is not your first time, make sure all your previous
Expand Down Expand Up @@ -180,7 +180,6 @@
1. _Demographic Projection (DemProj)_
1. _AIDS (AIM)_
1. _Lives Saved Tool (LiST)_
1. _Family Planning (FamPlan)_

In the “Select a country from which to retrieve demographic and other
default data”, click _Country data_ and select the country
Expand All @@ -197,7 +196,7 @@

Click _Home &rarr; Save_.

# Do a subnational projection for `r catchment.name`
## Do a subnational projection for `r catchment.name`

In the _Home_ tab, click Click _New_.

Expand All @@ -219,12 +218,10 @@
1. _Demographic Projection (DemProj)_
1. _AIDS (AIM)_
1. _Lives Saved Tool (LiST)_
1. _Family Planning (FamPlan)_

In the “Select a country from which to retrieve demographic and other
default data”, click _Country data_ and select the country
corresponding to 1b. Make sure DemProj, AIM, and LiST are checked
(they should already be).
default data”, click _Country data_ and select
`r country.name`. Make sure DemProj, AIM, and LiST are checked.

Now check the box for _Subnational projection_, write `r catchment.name`.

Expand All @@ -244,7 +241,7 @@

Hit _Ok_.

# Do a population and birth rate projection
## Do a population and birth rate projection

Click _Modules &rarr; DemProj &rarr; Results &rarr; Population &rarr;
Total population_. Accept the defaults by clicking _Ok_ in the dialog.
Expand Down Expand Up @@ -282,7 +279,7 @@
`r catchment.name` in `r first.anc.year` is
`r sprintf("%.0f",n.pregnant.women.first.anc.year)`.

# Scale up ANC in LiST
## Scale up ANC in LiST

Make sure you’re in the _Modules_ tab. Select the _LiST_ module.

Expand Down Expand Up @@ -325,7 +322,7 @@

Click _Ok_ to save changes and exit the dialog.

# Project lives saved
## Project lives saved

Now to compute lives saved. Click _Results &rarr; Neonatal &rarr;
Additional deaths prevented in children under one month of age_. In
Expand Down Expand Up @@ -359,7 +356,7 @@
Enter the values from Spectrum into the [ANC Impact Google
Spreadsheet](https://docs.google.com/spreadsheets/d/1bdJjavgBQ9Q5ZU7ODK0jO0VvNO24V2TCifoAj8DEkEc/edit?usp=sharing).

# Explore the relative effectiveness of ANC
## Explore the relative effectiveness of ANC

In the _LiST_ module, click _Effectiveness_ &rarr; Effectiveness of
interventions (maternal)_. You will see numbers between 0 and 1 in a
Expand Down
Binary file added inst/images/VaccineLivesSavedByIntervention.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
128 changes: 92 additions & 36 deletions inst/vaccine/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,41 +36,75 @@

<div id="editor">
Medic Mobile Vaccine Effectiveness Worksheet
========================================
============================================

# Synopsis
## Synopsis

The purpose of this worksheet is to estimate the effectiveness of
childhood vaccination programs on a population.

# Instructions
## Requirements

Every time you see a sentence in boldface, go to the R markdown source
document and enter the requested value.
This worksheet requires you to run Spectrum. Spectrum is a Windows
program, but you can run it on a Mac. Please see the DataKind How To
document for instructions.

# Software Versions Tested
## Software Versions Tested

* Mac OS X Mavericks
* Wine 1.6.1, packaged with WineBottler
* Spectrum 4.7, includes LiST, DemProj and AIM
* RStudio 0.98 with knitr 1.5

# Preparation
## Instructions

**What is the name of the country?**
This is a [knitr](http://yihui.name/knitr/)
[markdown](http://daringfireball.net/projects/markdown/) document.
knitr is an R package that allows you decorate R code with formatted
text for ease of reading. knitr allows you to insert R source code
in-line with the simple text formatting. R code is enclosed in sets
of one or three back-quotes. knitr compiles the document into HTML by
interpeting the markdown as HTML elements, evaluating the R source
code and inserting it directly into the HTML. You are left with a
readable document that contains dynamically evaluated R code.

For those wishing to complete the worksheet, we have streamlined the
process using [OpenCPU](https://www.opencpu.org/) and
[markdownapp](https://github.com/opencpu/markdownapp), which provides
an editor in your web browser and compiles the markdown dynamically
into a separate frame.

Note that the worksheet resets to default values when you refresh the
page. If you need to save your worksheet in in your browswer, click
on the compiled markdown document in the right-hand frame in your
browser, select all (command-a on a Mac), and print (command-p on a
Mac).

When doing the worksheet, **read this document carefully and in
order.** You will read descriptive text that provides some context on
what you are undertaking, and every once in a while you will be asked
to enter data into this worksheet or copy a derived quantity from this
worksheet into Spectrum.

## Preparation

What is the name of the country?

**Enter the value in the markdown document.**

```{r}
country.name <- "Kenya"
```

**What is the first year you will be modeling an increase in vaccine
coverage? Must be the current year or later.**

```{r}
first.anc.year <- 2015
```{r echo=FALSE}
this.year <- as.POSIXlt(Sys.Date())
this.year$year <- this.year$year + 1
first.anc.year <- format(as.Date(this.year),"%Y")
```

**How many children will the program serve in `r first.anc.year`?**
How many children will the program serve in `r first.anc.year`?

**Enter the value in the markdown document.**

```{r}
n.child.covered <- 5000
Expand All @@ -79,7 +113,7 @@
You are embarking on vaccine projection for `r country.name`. The year
you want to model an increase in coverage is `r first.anc.year`.

# Initialize Spectrum
## Initialize Spectrum

Launch Spectrum. (If this is your first time, proceed to the next
step now. If this is not your first time, make sure all your previous
Expand Down Expand Up @@ -107,13 +141,12 @@
1. _Lives Saved Tool (LiST)_

In the “Select a country from which to retrieve demographic and other
default data”, click _Country data_ and select the country
corresponding to 1b. Make sure DemProj, AIM, and LiST are checked
(they should already be).
default data”, click _Country data_ and select
`r country.name`. Make sure DemProj, AIM, and LiST are checked.

Click _Ok_.

# Determine Children in Country
## Determine Children in Country

Click on the _Modules_ tab in the main window.

Expand All @@ -137,7 +170,9 @@

![title](/ocpu/library/MedicMobileImpact/images/PopByAgeAndSex.png)

**What is the number in the upper left box (`r first.anc.year` Total 0-4`)?**
What is the number in the upper left box (`r first.anc.year` Total 0-4`)?

**Enter the value in the markdown document.**

```{r}
n.child.zero_to_four <- 7334114
Expand All @@ -157,7 +192,7 @@

*`r n.child.infant`*

# Scale up Vaccines in LiST
## Scale up Vaccines in LiST

Make sure you’re in the _Modules_ tab. Select the _LiST_ module.

Expand All @@ -167,25 +202,35 @@

![title](/ocpu/library/MedicMobileImpact/images/VaccineTab.png)

**What is the coverage rate shown for Polio in `r first.anc.year`?**
What is the coverage rate shown for Polio in `r first.anc.year`?

**Enter the value in the markdown document.**

```{r}
baseline.polio.coverage.rate <- 88.0
```

**What is the coverage rate shown for DTP in `r first.anc.year`?**
What is the coverage rate shown for DPT in `r first.anc.year`?

**Enter the value in the markdown document.**

```{r}
baseline.dtp.coverage.rate <- 0.0
baseline.dpt.coverage.rate <- 0.0
```

**What is the coverage rate shown for Measles in `r first.anc.year`?**
What is the coverage rate shown for Measles in `r first.anc.year`?

**Enter the value in the markdown document.**

```{r}
baseline.measles.coverage.rate <- 93.0
```

In order to compute the new vaccine rates after the intervention, we'll assume that all children in the country not affected by the intervention are subject to the national average rate, and that all children in the intervention have a 100% coverage rate for a given vaccine.
In order to compute the new vaccine rates after the intervention, we
will assume that all children in the country not affected by the
intervention are subject to the national average rate, and that all
children in the intervention have a 100% coverage rate for a given
vaccine.

To compute this we use the formula

Expand All @@ -198,7 +243,7 @@
```

```{r echo=FALSE}
new.dtp.coverage.rate <- min(1,(baseline.dtp.coverage.rate/100*(n.child.infant-min(0,n.child.covered )) + n.child.covered )/n.child.infant)
new.dpt.coverage.rate <- min(1,(baseline.dpt.coverage.rate/100*(n.child.infant-min(0,n.child.covered )) + n.child.covered )/n.child.infant)
```

```{r echo=FALSE}
Expand All @@ -209,9 +254,9 @@

*`r sprintf("%.1f",new.polio.coverage.rate*100)`*

New DTP Coverage Rate:
New DPT Coverage Rate:

*`r sprintf("%.1f",new.dtp.coverage.rate*100)`*
*`r sprintf("%.1f",new.dpt.coverage.rate*100)`*

New Measles Coverage Rate:

Expand All @@ -227,15 +272,26 @@
Click _Ok_ to save changes and exit the dialog.

Now to compute lives saved. Click _Results &rarr; Child &rarr;
Additional deaths prevented in children under five years of age
relative to impact year_. In the dialog, select _Table_ and hit _Ok_.
You should see a table like this.
Additional deaths prevented in children under five years of age by
intervention relative to impact year_. In the dialog, select _Table_
and hit _Ok_. You should see a table like this.

![title](/ocpu/library/MedicMobileImpact/images/VaccineLivesSavedByIntervention.png)

Add the results under the _Vaccine_ subheading together to estimate
lives saved from the vaccine coverage increase.

Enter the values from Spectrum into the [Vaccine Impact Google
Spreadsheet](https://docs.google.com/spreadsheets/d/1GmnXEAV0ol38_gj90GpHLsryquQOkrt1_D6JKqI1gIM/edit?usp=sharing)

Zero or negative numbers mean you have not prevented any deaths.
Positive numbers tell you how many lives you have saved per year.

![title](/ocpu/library/MedicMobileImpact/images/ChildrenSaved.png)
## Explore the relative effectiveness of vaccines

Zero or negative numbers mean you haven't prevented any deaths.
Positive numbers tell you how many lives you've saved per year. The
totals across all age groups appear in the first line of the table.
You can explore the relative effectiveness of interventions using
LiST's _Interventions_ tool. See the ANC worksheet for a brief
discussion.
</div>

<iframe src="about:blank"></iframe>
Expand Down

0 comments on commit 2ae7fb9

Please sign in to comment.