####Overview and Initial Diagnostics

This document will examine the final HIV in the Workplace dataset (with the exception of Lebanon). We will first take a look at how the data breaks along regional, income and country lines; as well as look at the impact of using projection weighting when analyzing the data across countries.

The total number of individuals represented by the ILO survey, across 49 countries is

print(total_proj_n)
## [1] 4025604983

We now consider the break-out of respondents by region and country income

print(region_list)
## # A tibble: 7 x 4
##   region_unaids                              countries unweighted_n projection_n
##   <fct>                                          <int>        <int>        <dbl>
## 1 Eastern and southern Africa                        9         9036   211216841.
## 2 Western and central Africa                        11        11117   205427575.
## 3 Asia and the Pacific                               9        13618  2719724281.
## 4 Eastern Europe and central Asia                    7         8012   198313770.
## 5 Latin America and the Caribbean                    6         6012   212840828.
## 6 Middle East and North Africa                       6         6088   214500208.
## 7 Western/central Europe and Northern Ameri~         1         1008   263581480.
print(wbi_list)
## # A tibble: 4 x 4
##   wbi4                countries unweighted_n projection_n
##   <fct>                   <int>        <int>        <dbl>
## 1 Low income                  5         5035   115204180.
## 2 Lower-middle income        23        25236  1748906068.
## 3 Upper-middle income        16        19576  1848590809.
## 4 High income                 5         5044   312903926.

One strategy for cross-country analysis is to apply projection weights. Given the countries in this set, we see that this approach will give greater representation to respondents from China and India, as seen in the below chart and table

rank_graph + theme_economist()+
  theme(legend.position="none")

As the above graph shows, the countries of India represent over a majority of all respondents when apply projection weights on the pooled cross-country data.

####HIV 3 INDEX OVERALL SCORE.

This analysis considers how many items a respondent answered CORRECTLY in the HIV3 series items. They include:

HIV3. To the best of your knowledge, can HIV be transmirred in any of the following ways?

HIV3A Through unprotected sex (Yes/No) HIV3B Through hugging or shaking hands (Yes/No) HIV3C By sharing needles (Yes/No) HIV3D Through kissing (Yes/No) HIV3E By sharing a bathroom (Yes/No)

Index is calculated by scoring the number of items a person answered correctly and then is divided by the number of total questions answered. The resulting figure is a percentage between 0 and 100, with 100% indicating the person answered all of the questions correctly.

Note there are no results available for the UAE, as Gallup was not allowed to ask these questions in that country.

##Overall country level summary statistis

summary(HIV3_index_data$index_score)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   42.89   68.52   78.07   74.52   82.47   89.83       1
###Graph of country results

hiv3_graph<-ggplot(data=HIV3_index_data,aes(y=index_score, x=index_rank))

hiv3_scatter<-hiv3_graph + geom_text(aes(label=country_abv),
                                        hjust=0, nudge_x=0.05, check_overlap=TRUE)+
  labs(x="Index score rank", y="Index score", title="HIV 3 Index: Country Results")

hiv3_scatter + theme_economist()
## Warning: Removed 1 rows containing missing values (geom_text).

The median country resultstands at 78.07 – meaning about half of the countries in the study had an overall HIV3 Index score ABOVE this figure, while hald of the countries had a score below it

We see several Sub-Saharan African countries report the best overall index score, including South Africa (ZAF), Ethiopia and Namibia. The US finishes fourth, with a score of 86.6; Zimbabwe and Gabon boast scores over 85.

On the other end of the spectrum, Egypt has the lowest score at 42.89. Morrocco is the only other country with a score below 50, at 49.54.

The below table allows you to search for the country results.

library(DT)
## Warning: package 'DT' was built under R version 4.0.3
###Table of country results 

datatable(HIV3_index_data, options=list(pageLength=50))

##wp21335/HIV1: Should people with HIV be allowed or not allowed TO work in a job with direct contact with those who do not have HIV?