solution to problem set3 - Eco 572 Research methods in...

Info icon This preview shows pages 1–4. Sign up to view the full content.

Eco 572: Research methods in Demography Solutions to Problem Set 3 [1] Nuptiality in the U.S. We start by reading the data from the website. . infile age n using /// > , clear (31 observations read) (a) Since these are cohort data and we are only interested in the experience up to age 37, which is complete for women aged 37-41 at interview, we can compute d x directly, just dividing the frequencies by the total number of women. The other life table functions follow directly. The only time we need to make an assumption about the distribution of events in a year of age is in computing L x , and we assume a uniform distribution. . quietly summarize n . gen dx = n/r(sum) if age < 37 (6 missing values generated) . gen lx = 1 . replace lx = lx[_n-1] - dx[_n-1] if _n > 1 (30 real changes made, 5 to missing) . gen qx = dx/lx (6 missing values generated) . gen Lx = (lx + lx[_n+1])/2 (6 missing values generated) . format %8.6f dx qx lx Lx . list age dx qx lx Lx if age <= 37 +-------------------------------------------------+ | age dx qx lx Lx | |-------------------------------------------------| 1. | 12 0.000654 0.000654 1.000000 0.999673 | 2. | 13 0.000654 0.000655 0.999346 0.999018 | 3. | 14 0.002618 0.002621 0.998691 0.997382 | 4. | 15 0.008181 0.008213 0.996073 0.991983 | 5. | 16 0.025851 0.026168 0.987893 0.974967 | |-------------------------------------------------| 6. | 17 0.040903 0.042517 0.962042 0.941590 | 7. | 18 0.077552 0.084192 0.921139 0.882363 | 8. | 19 0.081152 0.096199 0.843586 0.803010 | 9. | 20 0.070353 0.092275 0.762435 0.727258 | (1 of 12) [2/11/2008 2:17:33 PM]
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Eco 572: Research methods in Demography 10. | 21 0.062500 0.090307 0.692081 0.660831 | |-------------------------------------------------| 11. | 22 0.068390 0.108628 0.629581 0.595386 | 12. | 23 0.064463 0.114869 0.561191 0.528959 | 13. | 24 0.050393 0.101449 0.496728 0.471531 | 14. | 25 0.051374 0.115103 0.446335 0.420648 | 15. | 26 0.040903 0.103563 0.394961 0.374509 | |-------------------------------------------------| 16. | 27 0.035013 0.098891 0.354058 0.336551 | 17. | 28 0.031414 0.098462 0.319045 0.303338 | 18. | 29 0.022906 0.079636 0.287631 0.276178 | 19. | 30 0.017016 0.064277 0.264725 0.256217 | 20. | 31 0.022579 0.091149 0.247709 0.236420 | |-------------------------------------------------| 21. | 32 0.018652 0.082849 0.225131 0.215805 | 22. | 33 0.013416 0.064976 0.206479 0.199771 | 23. | 34 0.013089 0.067797 0.193063 0.186518 | 24. | 35 0.012762 0.070909 0.179974 0.173593 | 25. | 36 0.010144 0.060665 0.167212 0.162140 | |-------------------------------------------------| 26. | 37 . . 0.157068 . | +-------------------------------------------------+ . quietly sum Lx . di 12 + r(sum) 25.715641 . drop if age > 37 (5 observations deleted) The average time lived in the single state by age 37.0 is 25.7. (b) To answer these questions we need l 20 , l 25 , and l 37 . I'll store these in scalars for clarity . scalar lx20 = lx[9] . scalar lx25 = lx[14] . scalar lx37 = lx[26] . di 1 - lx20 .23756546 . di 1 - lx25 .55366492 . di (lx20-lx25)/lx20 .41459227 . di (lx20-lx25)/(lx20-lx37) .52216214 (2 of 12) [2/11/2008 2:17:33 PM]
Image of page 2
Eco 572: Research methods in Demography (c) We fit a Hernes model following the suggested procedure. . gen y = log(qx/(1-lx)) (2 missing values generated) . gen am = (age+0.5) . gen am15 = am - 15 . reg y am15 Source | SS df MS Number of obs = 24 -------------+------------------------------ F( 1, 22) = 196.19 Model | 26.4196017 1 26.4196017 Prob > F = 0.0000 Residual | 2.96252171 22 .134660078 R-squared = 0.8992 -------------+------------------------------ Adj R-squared = 0.8946 Total | 29.3821234 23 1.27748363 Root MSE = .36696 ------------------------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- am15 | -.1515703 .0108211 -14.01 0.000 -.1740119 -.1291288 _cons | .2402122 .131607 1.83 0.082 -.032724 .5131485 ------------------------------------------------------------------------------ . scalar r = _b[am15] . gen z = logit(1-lx) (1 missing value generated) . gen x = exp(r*(age-15)) . reg z x Source | SS df MS Number of obs = 25 -------------+------------------------------ F( 1, 23) = 5546.13 Model | 169.889412 1 169.889412 Prob > F = 0.0000 Residual | .704536948 23 .030632041 R-squared = 0.9959 -------------+------------------------------ Adj R-squared = 0.9957 Total | 170.593949 24 7.10808121 Root MSE = .17502 ------------------------------------------------------------------------------ z | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- x | -7.001133 .0940098 -74.47 0.000 -7.195607 -6.806658
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 4
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '06
  • Rodriguez
  • Fertility, SIPP, Coef, Mata

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern