notes smoothing-Splines - Eco 572 Research methods in...

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

View Full Document Right Arrow Icon
Eco 572: Research methods in Demography Smoothing: Splines This continues our work on smoothing. Let's start by making sure we have loaded the data. . infile age pop using /// > (99 observations read) Our application will focus on regression splines, because they are the easiest ones to use in Stata, but we will mention briefly natural regression splines and smoothing splines. Regression Splines A cubic spline S(x) with knots t 1 ... t k has linear, quadratic and cubic terms on x , and one term of the form (x-t j ) 3 + for each knot. These terms can easily be computed and entered in a regression, although one should be careful about multi-collinearity when there are lots of knots. A better solution is to use b-splines , a well-conditioned basis for splines. Stata does not have built-in b-splines, but Roger Newson has contributed a command that you can install from the depository at SSC (the Statistical Software Components archive) or from his own website. Type findit bspline to learn more. Let us use spline regression to smooth the Colombian data. We will use a cubic spline with 3 internal knots at ages 25, 50 and 75. For comparison we will fit a second spline with 4 internal knots at ages 20, 40, 60 and 80. Newson's command requires you to specify the extremes as well, so we add 0 and 100 in both cases, but these don't count as real knots in our terminology. Don't forget to specify p(3)
Image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ 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