Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Exported FLAT file and multiple records

From   Ulises Huerta Munoz <>
Subject   st: Exported FLAT file and multiple records
Date   Thu, 21 Jun 2012 22:09:28 +0700

Hello everyone,

This is my first post.

I am using Stata 12 and data from the Demographic Health Survey.
To assign mother characteristics to children I have done a 1:m merge using
the children's file as the base file. Since this is an exported  "FLAT" file,
multiple or repeating records are placed one after the other on the record
with each occurrence of every such variable having its own name. So for
example, a woman with three children whose height we are interested in shows as:

     v001 v002 v003 child#1height child#2height child #3height
1.     X      Y      Z             98                  72             126

to regress the height of children and use characteristics of the mom
as predictors, I
need each children to have the characteristics of the mom such as

     v001 v002 v003 child height
1.     X      Y      Z             98
2.     X      Y      Z             72
3.     X      Y      Z             126

Is there a command that will allow me to do this?



child#2height child #3height
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index