0
$\begingroup$

I have 4 national representative surveys (DHS) and let us assume one survey belong to one country (e.g. Lesotho, Namibia, South Africa, and Zimbabwe).

The sampling method used in these surveys is biased (two-stage sampling) and the DHS provides sampling weights calculated against PSU (primary sampling units) and STRATA.

Although, I know it is possible to combine multiple surveys from the same target population (US) through reweighting as pointed by CDC (e.g. NHANES). I wonder if it's possible to combine surveys from different populations? This will allow me to obtain one giant dataset for southern Africa that I can analysis in further multilevel approaches.

if yes, how the weights are recalculated.

My environment (R 3.6.4, survey, INLA)

Thanks in advance

$\endgroup$
  • $\begingroup$ Would it be reasonable to consider the target population to be the south african population, and treat the countries as strata? $\endgroup$ – Roberto Jul 29 at 6:23
0
$\begingroup$

in some circumstances, adding a country-sample-specific identifier to the psu and strata variables would be enough to maintain the svydesign calculations. if you stacked the datasets from those four nations, would the sum of weights match their relative populations? otherwise you might want to postStratify ?

set.seed(1999)

library(survey)

x <- data.frame( psu_variable = sample( 1:3 , 200 , replace = TRUE ) , strata_variable = sample( 1:10 , 200 , replace = TRUE ) , weight_variable = sample( 1:2 , 200 , replace = TRUE ) , some_variable = sample( 1:50 , 200 , replace = TRUE ) )

y <- data.frame( psu_variable = sample( 1:3 , 200 , replace = TRUE ) , strata_variable = sample( 1:10 , 200 , replace = TRUE ) , weight_variable = sample( 1:2 , 200 , replace = TRUE ) , some_variable = sample( 1:50 , 200 , replace = TRUE ) )


# first country
# x
x[ , 'country_name' ] <- 'first country'

# second country
# y
y[ , 'country_name' ] <- 'second country'


# possible design for first country
x_des <- svydesign( ~ psu_variable , strata = ~ strata_variable , data = x , weights = ~ weight_variable , nest = TRUE )

# possible design for second country
y_des <- svydesign( ~ psu_variable , strata = ~ strata_variable , data = y , weights = ~ weight_variable , nest = TRUE )

# add a unique country identifier to psu and strata variables
x[ , 'new_psu_variable' ] <- paste( "first country" , x[ , 'psu_variable' ] )
y[ , 'new_psu_variable' ] <- paste( "second country" , y[ , 'psu_variable' ] )
x[ , 'new_strata_variable' ] <- paste( "first country" , x[ , 'strata_variable' ] )
y[ , 'new_strata_variable' ] <- paste( "second country" , y[ , 'strata_variable' ] )

# stack and create possible design
needed_variables <- c( 'new_psu_variable' , 'new_strata_variable' , 'weight_variable' , 'country_name' , 'some_variable' )
z <- rbind( x[ needed_variables ] , y[ needed_variables ] )

# possible stacked design
z_des <- svydesign( ~ new_psu_variable , strata = ~ new_strata_variable , data = z , weights = ~ weight_variable , nest = TRUE )

# these statistics definitely need to line up
svymean( ~ some_variable , x_des )
svymean( ~ some_variable , y_des )
svyby( ~ some_variable , ~ country_name , z_des , svymean )


# combined result assumes x and y had appropriate weights
svymean( ~ some_variable , z_des )


# do the weights match the country populations?
sum( x[ , 'weight_variable' ] )
sum( y[ , 'weight_variable' ] )

# otherwise, post-stratify the design so it matches the relative population sizes
pop.types <- data.frame( country_name = c( 'first country'  , 'second country' ) , Freq = c( 250000 , 750000 ) )
z_des_p <- postStratify( z_des , ~ country_name , pop.types )


# within-country estimates do not change
svyby( ~ some_variable , ~ country_name , z_des , svymean )
svyby( ~ some_variable , ~ country_name , z_des_p , svymean )

# combined country estimates now reflect relative population sizes for the `z_des_p` survey design
svymean( ~ some_variable , z_des )
svymean( ~ some_variable , z_des_p )
| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Hi Anthony, thanks for your highly detailed answer. It is right what I was looking for. Have you tried some multilevel analysis with this kind of data? I have some geospatial covariates I would like to add at Admin1-level but I have not figured it out yet. Thanks $\endgroup$ – Esteban M. Correa Jul 31 at 23:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.