The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » Multilevel Logistic Regression
Re: Multilevel Logistic Regression [message #24937 is a reply to message #24936] Thu, 04 August 2022 11:22 Go to previous messageGo to previous message
phehintee@gmail.com is currently offline  phehintee@gmail.com
Messages: 4
Registered: July 2018
Member
Thank you for your response

I performed the following with the information provided in the shared link. I want to confirm if I got it right.
*****

* Stage A *** Compile parameters/inputs for Level-weights calculations

. ************************************************************ **********

. * a_c_h completed clusters by strata

. gen a_c_h=.
(94,388 missing values generated)

. quietly levelsof v022, local(lstrata)

. quietly foreach ls of local lstrata {
. tab v021 if v022==`ls', matrow(T)
. scalar stemp=rowsof(T)
. replace a_c_h=stemp if v022==`ls'
. }

. replace a_c_h=stemp if v022==`ls'

gen DHSwt = v005 / 1000000

*Step 1. De-normalize the final weight, using approximated normalization factor

. gen d_HH = DHSwt * (249454252/80137279)

.
. gen f = d_HH / ((696232/a_c_h) * (69361.60205/22))

* Calculating the level-weights based on different values of alpha

. local alphas 0 0.1 .25 .50 .75 0.90 1

. local i = 1

Secondly, I do not know how to apply this part, I am using a p-value of 0.05, please how do I apply it

* Calculating the level-weights based on different values of alpha

foreach dom of local alphas{
gen wt2_`i' = (A_h/a_c_h)*(f^`dom')
gen wt1_`i' = d_HH/wt2_`i'
local ++i
}

Thanks in anticipation of your response
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Weight to use for regression that has children and mother level variables
Next Topic: Declaring Survey Design for dataset on STATA: NFHS-5 India 2019-2021
Goto Forum:
  


Current Time: Thu Apr 18 12:24:42 Coordinated Universal Time 2024