The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Variables missed after appending two de-normalized DHS datasets
Variables missed after appending two de-normalized DHS datasets [message #9632] Tue, 26 April 2016 15:32 Go to next message
AmsP
Messages: 24
Registered: April 2016
Member
Hello,

I need to de-normalize and then append two DHS datasets (e.g. BOIR31 and BOIR41). I first generate a new variable dv005=v005*(number of women aged 15-49 of the country in the survey year)/(number of women in this survey) in the two datasets, respectively. Then I append BOIR41 into BOIR31 (so BOIR31 is the basis). But after appending, all values of dv005 in BOIR41 become ".", while values of dv005 in BOIR31 are correct.

I tried several other datasets, but I always faced this problem.

Thank you very much!
Re: Variables missed after appending two de-normalized DHS datasets [message #9633 is a reply to message #9632] Tue, 26 April 2016 17:20 Go to previous messageGo to next message
Reduced-For(u)m
Messages: 292
Registered: March 2013
Senior Member

Is this an append or a merge? If you are appending, the only thing I can think of is that you are not creating the same variable "type" in both datasets. If you put some actual code up (not too much, just the relevant parts) I might see something, but it seems like either you are mixing two different types of variables (one maybe is a string and the other a number) or appending in some funny way.
Re: Variables missed after appending two de-normalized DHS datasets [message #9642 is a reply to message #9633] Thu, 28 April 2016 05:46 Go to previous message
AmsP
Messages: 24
Registered: April 2016
Member
Thank you! It is appending. I tried it again today with the same method as before, but all the de-normalized weights after appending are correctly shown. I do not know why...... The default type is float.
Previous Topic: Is there a way to add household member's information to birth's recode file?
Next Topic: Discrepancy between household and household members datasets
Goto Forum:
  


Current Time: Fri Mar 29 07:19:28 Coordinated Universal Time 2024