prevR (version 3.3)

prevR-package: Estimating regional trends of a prevalence from a DHS.

Description

prevR allows spatial estimation of a prevalence surface or a relative risks surface, using data from a Demographic and Health Survey (DHS) or an analog survey.

Arguments

Acknowledgement

prevR has been developed with funding from the French National Agency for Research on AIDS and Viral Hepatitis (ANRS - http://www.anrs.fr) and the French Research Institute for Development (IRD - http://www.ird.fr), and technical support from LYSIS (info@lysis-consultants.fr).

Citation

To cite prevR: Larmarange Joseph, Vallo Roselyne, Yaro Seydou, Msellati Philippe and Meda Nicolas (2011) "Methods for mapping regional trends of HIV prevalence from Demographic and Health Surveys (DHS)", Cybergeo: European Journal of Geography, no 558, http://cybergeo.revues.org/24606, DOI: 10.4000/cybergeo.24606.

Details

Package: prevR
Type: Package
Licence: CeCILL-C - http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html
Website: http://www.ceped.org/prevR,
http://joseph.larmarange.net/prevR

This package performs a methodological approach for spatial estimation of regional trends of a prevalence using data from surveys using a stratified two-stage sample design (as Demographic and Health Surveys). In these kind of surveys, positive and control cases are spatially positioned at the centre of their corresponding surveyed cluster.

This package provides functions to estimate a prevalence surface using a kernel estimator with adaptative bandwiths of equal number of persons surveyed (a variant of the nearest neighbour technique) or with fixed bandwiths. The prevalence surface could also be calculated using a spatial interpolation (kriging or inverse distance weighting) after a moving average smoothing based on circles of equal number of observed persons or circles of equal radius.

With the kernel estimator approach, it's also possible to estimate a surface of relative risks.

For a quick demo, enter quick.prevR(fdhs).

For a full demo, enter demo(prevR).

The content of prevR can be broken up as follows:

Datasets fdhs is a fictive dataset used for testing the package. TMWorldBorders provides national borders of every countries in the World and could be used to define the limits of the studied area.

Creating objects prevR functions takes as input ojects of class prevR. import.dhs allows to import easily, through a step by step procedure, data from a DHS (Demographic and Health Surveys) downloaded from http://www.measuredhs.com. as.prevR is a generic function to create an object of class prevR. create.boundary could be used to select borders of a country and transfer them to as.prevR in order to define the studied area.

Data visualisation Methods show, print and summary display a summary of a object of class prevR. The method plot could be used on a object of class prevR for visualising the studied area, spatial position of clusters, number of observations or number of positive cases by cluster.

Data manipulation The method changeproj changes the projection of the spatial coordinates. The method as.data.frame converts an object of class prevR into a data frame. The method export export data and/or the studied area in a text file, a dbf file or a shapefile.

Data analysis rings calculates rings of equal number of observations and/or equal radius. kde calculates a prevalence surface or a relative risks surface using gaussian kernel density estimators (kde) with adaptative bandwiths. krige executes a spatial interpolation using an ordinary kriging. idw executes a spatial interpolation using an inverse distance weighting (idw) technique.

Results visualisation and export Outputs of kde, krige and idw are objects of class SpatialPixelsDataFrame{sp}. Results could be plotted using the function spplot{sp}. prevR provides several continuous color palettes (see prevR.colors) compatible with spplot. Calculated surfaces could be export using the function writeAsciiGrid{maptools}.

References

Larmarange Joseph and Bendaud Victoria (2014) "HIV estimates at second subnational level from national population-based survey", AIDS, n<U+00B0> 28, p. S469-S476, DOI: 10.1097/QAD.0000000000000480.

Larmarange Joseph, Vallo Roselyne, Yaro Seydou, Msellati Philippe and Meda Nicolas (2011) "Methods for mapping regional trends of HIV prevalence from Demographic and Health Surveys (DHS)", Cybergeo: European Journal of Geography, n<U+00B0> 558, http://cybergeo.revues.org/24606, DOI: 10.4000/cybergeo.24606.

Larmarange Joseph (2007) Pr<U+00E9>valences du VIH en Afrique : validit<U+00E9> d'une mesure, PhD thesis in demography, directed by Beno<U+00EE>t Ferry, universit<U+00E9> Paris Descartes, http://tel.archives-ouvertes.fr/tel-00320283.

Larmarange Joseph, Vallo Roselyne, Yaro Seydou, Msellati Philippe Meda Nicolas and Ferry Beno<U+00EE>t (2006), "Cartographier les donn<U+00E9>es des enqu<U+00EA>tes d<U+00E9>mographiques et de sant<U+00E9> <U+00E0> partir des coordonn<U+00E9>es des zones d'enqu<U+00EA>te", Chaire Qu<U+00E9>telet, 29 novembre au 1er d<U+00E9>cembre 2006, Universit<U+00E9> Catholique de Louvain, Louvain-la-Neuve, Belgique, http://www.uclouvain.be/13881.html.

Examples

Run this code
# NOT RUN {
par(ask = TRUE)
# Creating an object of class prevR
col <- c(id = "cluster", 
        x = "x",
        y = "y",
        n = "n",
        pos = "pos",
        c.type = "residence",
        wn = "weighted.n",
        wpos = "weighted.pos"
)
dhs <- as.prevR(fdhs.clusters,col, fdhs.boundary)

str(dhs)
print(dhs)

plot(dhs, main="Clusters position")
plot(dhs, type="c.type", main="Clusters by residence")
plot(dhs, type="count", main="Observations by cluster")
plot(dhs, type="flower", main="Positive cases by cluster")

# Changing coordinates projection
plot(dhs,axes=TRUE)
dhs <- changeproj(dhs,
                 "+proj=utm +zone=30 +ellps=WGS84 +datum=WGS84 +units=m +no_defs")
print(dhs)
plot(dhs, axes=TRUE)

# Calculating rings of equal number of observations for different values of N
dhs <- rings(dhs,N=c(100,200,300,400,500))
print(dhs)
summary(dhs)

# Prevalence surface for N=300
prev.N300 <- kde(dhs, N=300, nb.cells=200)
spplot(prev.N300, 'k.wprev.N300.RInf',
      cuts=100, col.regions=prevR.colors.red(101),
      main="Regional trends of prevalence (N=300)"
)

# Smoothing ring radii surface (spatial interpolation by kriging)
radius.N300 <- krige('r.radius', dhs, N=300, nb.cells=200)
spplot(radius.N300, 
      cuts=100, col.regions=prevR.colors.blue(101),
      main="Radius of circle (N=300)"
)
par(ask = FALSE)
# }

Run the code above in your browser using DataLab