Violence Against Children And Youth Surveys (VACS)
The global surveillance system to track and monitor the burden of violence against children.
One table per country with one row per sampled respondent.
Nationally representative cross-sectional household surveys of children and youth ages 13–24.
No listed update frequency across the participating nations.
Led by the CDC through funding from PEPFAR, in partnership with Together for Girls.
Please skim before you begin:
Sampling design and methodology of the Violence Against Children and Youth Surveys
Violence Against Children Surveys (VACS): Towards a global surveillance system
A haiku regarding this microdata:
Download, Import, Preparation
Request public VACS data at https://www.togetherforgirls.org/en/analyzing-public-vacs-data.
Select the Mozambique 2019 dataset and Stata option.
Download and unzip the
Mozambique VACS Public Use Dataset
files:
library(haven)
vacs_tbl <- read_stata( file.path( path.expand( "~" ) , "mozambique_public use data.dta" ) )
vacs_df <- data.frame( vacs_tbl )
names( vacs_df ) <- tolower( names( vacs_df ) )
Save Locally
Save the object at any point:
# vacs_fn <- file.path( path.expand( "~" ) , "VACS" , "this_file.rds" )
# saveRDS( vacs_df , file = vacs_fn , compress = FALSE )
Load the same object:
Variable Recoding
Add new columns to the data set:
vacs_design <-
update(
vacs_design ,
one = 1 ,
age_sex_group =
factor(
ifelse( agegrp == 1 , sex , sex + 2 ) ,
levels = 1:4 ,
labels = c( 'male 13-17' , 'female 13-17' , 'male 18-24' , 'female 18-24' )
) ,
sex = factor( sex , levels = 1:2 , labels = c( 'male' , 'female' ) ) ,
agegrp = factor( agegrp , levels = 1:2 , labels = c( '13-17' , '18-24' ) ) ,
ever_attended_school = ifelse( eversch %in% 1:2 , as.numeric( eversch == 1 ) , NA ) ,
childhood_physical_violence = as.numeric( pv18 == 1 ) ,
marry =
factor(
marry ,
levels = 1:3 ,
labels =
c( 'Yes, ever married' , 'Yes, ever lived with a partner' ,
'No, never married or lived with a partner' )
) ,
age_at_first_pregnancy = ifelse( prage < 98 , prage , NA ) ,
age_at_first_cohabitation = ifelse( marage < 98 , marage , NA )
)
Analysis Examples with the survey
library
Unweighted Counts
Count the unweighted number of records in the survey sample, overall and by groups:
Descriptive Statistics
Calculate the mean (average) of a linear variable, overall and by groups:
svymean( ~ age_at_first_cohabitation , vacs_design , na.rm = TRUE )
svyby( ~ age_at_first_cohabitation , ~ age_sex_group , vacs_design , svymean , na.rm = TRUE )
Calculate the distribution of a categorical variable, overall and by groups:
Calculate the sum of a linear variable, overall and by groups:
svytotal( ~ age_at_first_cohabitation , vacs_design , na.rm = TRUE )
svyby( ~ age_at_first_cohabitation , ~ age_sex_group , vacs_design , svytotal , na.rm = TRUE )
Calculate the weighted sum of a categorical variable, overall and by groups:
Calculate the median (50th percentile) of a linear variable, overall and by groups:
svyquantile( ~ age_at_first_cohabitation , vacs_design , 0.5 , na.rm = TRUE )
svyby(
~ age_at_first_cohabitation ,
~ age_sex_group ,
vacs_design ,
svyquantile ,
0.5 ,
ci = TRUE , na.rm = TRUE
)
Estimate a ratio:
Measures of Uncertainty
Extract the coefficient, standard error, confidence interval, and coefficient of variation from any descriptive statistics function result, overall and by groups:
this_result <- svymean( ~ age_at_first_cohabitation , vacs_design , na.rm = TRUE )
coef( this_result )
SE( this_result )
confint( this_result )
cv( this_result )
grouped_result <-
svyby(
~ age_at_first_cohabitation ,
~ age_sex_group ,
vacs_design ,
svymean ,
na.rm = TRUE
)
coef( grouped_result )
SE( grouped_result )
confint( grouped_result )
cv( grouped_result )
Calculate the degrees of freedom of any survey design object:
Calculate the complex sample survey-adjusted variance of any statistic:
Include the complex sample design effect in the result for a specific statistic:
# SRS without replacement
svymean( ~ age_at_first_cohabitation , vacs_design , na.rm = TRUE , deff = TRUE )
# SRS with replacement
svymean( ~ age_at_first_cohabitation , vacs_design , na.rm = TRUE , deff = "replace" )
Compute confidence intervals for proportions using methods that may be more accurate near 0 and 1. See ?svyciprop
for alternatives:
Regression Models and Tests of Association
Perform a design-based t-test:
Perform a chi-squared test of association for survey data:
Perform a survey-weighted generalized linear model:
glm_result <-
svyglm(
age_at_first_cohabitation ~ ever_attended_school + marry ,
vacs_design
)
summary( glm_result )
Replication Example
This example matches statistics and confidence intervals within 0.1% from the Final Report of the Mozambique Violence Against Children and Youth Survey (VACS), 2019, Table 4.1.1. Prevalence of different types of sexual violence[1] before age 18, among 18-24-year-olds
:
females_18_to_24_design <- subset( vacs_design , sex == 'female' & agegrp == '18-24' )
# define a function to check unweighted N, prevalence, confidence interval for each estimate
check_sv <-
function( this_variable , this_design = females_18_to_24_design , N , prevalence , lb , ub ){
this_formula <- as.formula( paste( "~ as.numeric(" , this_variable , "== 1 )" ) )
stopifnot( coef( unwtd.count( this_formula , this_design ) ) == N )
this_result <- svymean( this_formula , this_design , na.rm = TRUE )
stopifnot( round( coef( this_result ) , 3 ) == prevalence )
stopifnot( abs( confint( this_result )[1] - lb ) < 0.0015 )
stopifnot( abs( confint( this_result )[2] - ub ) < 0.0015 )
invisible( TRUE )
}
# sexual touching in childhood
check_sv( "sv1_only18" , N = 1232 , prevalence = 0.066 , lb = 0.039 , ub = 0.093 )
# unwanted attempted sex in childhood
check_sv( "sv2_only18" , N = 1232 , prevalence = 0.061 , lb = 0.035 , ub = 0.087 )
# pressured or coerced sex in childhood
check_sv( "sv4_only18" , N = 1221 , prevalence = 0.056 , lb = 0.035 , ub = 0.077 )
# physically forced sex in childhood
check_sv( "sv3_only18" , N = 1231 , prevalence = 0.035 , lb = 0.020 , ub = 0.051 )
Analysis Examples with srvyr
The R srvyr
library calculates summary statistics from survey data, such as the mean, total or quantile using dplyr-like syntax. srvyr allows for the use of many verbs, such as summarize
, group_by
, and mutate
, the convenience of pipe-able functions, the tidyverse
style of non-standard evaluation and more consistent return types than the survey
package. This vignette details the available features. As a starting point for VACS users, this code replicates previously-presented examples:
Calculate the mean (average) of a linear variable, overall and by groups: