Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: stset and the NLSY97


From   Scott Cunningham <scunning@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: stset and the NLSY97
Date   Mon, 17 Oct 2005 13:56:49 -0400

Lars,

Thank you for the suggestions. I made them, and wanted to show you the dataset. The missing observations concerned me, but should I be?

+-------------------------------------------------------+
| id year _st _d _t _t0 age firstsex sa |
|-------------------------------------------------------|
1. | 7 1997 0 . . . 12 13 1 |
2. | 7 1998 1 1 13 12 13 13 1 |
3. | 7 1999 0 . . . 14 13 1 |
4. | 7 2000 0 . . . 15 13 1 |
5. | 7 2001 0 . . . 16 13 1 |
|-------------------------------------------------------|
6. | 7 2002 0 . . . 17 13 1 |
7. | 8 1997 0 . . . 16 15 1 |
8. | 8 1998 1 0 17 16 17 15 1 |
9. | 8 1999 1 0 18 17 18 15 1 |
10. | 8 2000 1 0 19 18 19 15 1 |
+-------------------------------------------------------+

Does this look correct for you?

I have a second question for you, if so. I have a time-varying covariate labeled "sr". For all years the individual was in the survey, I have a value for sr. But, in those years prior to them entering the survey, I do not. This "sr" is a geographic variable, and assuming that they lived in the same place they were living the year they entered the survey, I can find a value for "sr" and match it to them for that year. But, how might I do it? Here's an example so you know the trouble I'm having:

+--------------------------------------------------------------------+
| id year age firstsex sa _st _d _t _t0 sr |
|--------------------------------------------------------------------|
169. | 261 1997 14 11 1 0 . . . 1.080463 |
170. | 261 1998 15 11 1 1 0 15 14 . 9527455 |
171. | 261 1999 16 11 1 1 0 16 15 . 9897038 |
172. | 261 2000 17 11 1 1 0 17 16 . 9689021 |
173. | 261 2001 18 11 1 1 0 18 17 1.062406 |
174. | 261 2002 19 11 1 1 0 19 18 1.025613 |
253. | 475 1997 12 11 1 0 . . . . |
254. | 475 1998 13 11 1 1 0 13 12 . |
255. | 475 1999 14 11 1 1 0 14 13 . 986424 |
256. | 475 2000 15 11 1 1 0 15 14 . |
257. | 475 2001 16 11 1 1 0 16 15 1.060744 |
258. | 475 2002 17 11 1 1 0 17 16 . 9933796 |
277. | 488 1997 14 10 1 0 . . . . 986424 |
278. | 488 1998 15 10 1 1 0 15 14 . 9854093 |
279. | 488 1999 16 10 1 1 0 16 15 1.060744 |
280. | 488 2000 17 10 1 1 0 17 16 . 9933796 |

As you can see, these three individuals all lost their virginity at ages prior to when they entered the survey. id=261 entered the survey when s/he was 14; id=475 when s/he was 12; id=488 when s/he was 14. They lost their virginity, respectively, when they were 11, 11 and 10. I do not have a corresponding value for "sr" in any year when the respondent was younger than 14. Some of these I can deal with - for instance, for id=475, I can -replace sr=X- for certain years, even though they were not asked questions about their sexual behavior prior to age 14, because I have information on variables that can let me match "sr" to the person. But what should I, can I, do for years before 1997?

For instance, for id=261, if I wanted to know the respective "sr" for 1992-1996, I wasn't sure how to alter the data such that I can create new rows of information for that specific person.

Does this make sense?


scott
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index