Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cubic Splines

    I am running an analysis looking at the relationship between measles mortality (outcome) and vaccine coverage (independent variable). I have fitted a cubic spline with knots at 0, 33.5 and 88 and the outcome variable measles mortality has been log transformed. My question is how do I interpret the STATA output below?


    SEE LESS

  • #2
    I see no output - however, in general, the place to start when using cubic splines is with a graph of the function (or the predicted values against the independent variable)

    please read the FAQ to improve the question and thus make it easier for people to respond

    Comment


    • #3
      My apologies below is the STATA output

      log_Case Coef. Std. Err. t P>t [95% Conf. Interval]
      cubic_spline_var1 -.0207 .0192 -1.07 0.293 -.0602 .0189
      cubic_spline_var2 - .0429 .0328 -1.31 0 .202 -.1101 .0244
      _cons 2.941 0.306 9.61 0.000 2.313 3.570




      Attached Files
      Last edited by willard tinago; 20 Jan 2016, 01:12.

      Comment


      • #4
        I don't know which program you used to fit the cubic spline. This matters a great deal as the parameterizations differ from program to program. So can you tell us exactly what you typed. How were the variables created? What model did you ask Stata to compute for you? Give use the exact commands. Just give us the .do file you used to create that output. Better yet, create the example using data we all have access to. So we can change and run that example as an answer.
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment


        • #5
          Willard:
          as per Rich's wise advice, you may conclude that your graph supports the (widespread, but sometimes argued among the lay public) belief that mortality for measles is reduced by an increased vaccinal coverage.
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment


          • #6
            Thanks Carlo.

            Maarten I used the following commands

            mkspline vac_= vaccine_r , nknots(3) cubic displayknots

            mat knots = r(knots)

            reg log_Case vac_*

            I also duplicated the same analysis using

            plot_rcspline log_Case vaccine_r, keepcons nknots(3)

            Comment


            • #7
              Ok, so you are not estimating a cubic spline, but a restricted cubic spline. The coefficients are hard to interpret. Typically you would interpret that model using a graph.

              Alternatively, use the user written commands frencurve and flexcurve that are described below to get coefficients that are interpretable.

              Newson R. B. 2012. Sensible parameters for univariate and multivariate splines. The Stata Journal 12(3): 479-504. Download from http://www.stata-journal.com/article...rticle=sg151_2.

              Newson R. B. 2011. Sensible parameters for polynomials and other splines. Presented at the 17th UK Stata User Meeting, 15-16 September, 2011. Download from http://ideas.repec.org/p/boc/usug11/01.html.

              Newson R. 2001. Splines with parameters that can be explained in words to non-mathematicians. Presented at the 7th UK Stata User Meeting, 14�15 May, 2001. Download from http://ideas.repec.org/p/boc/usug01/11.html.

              Newson R. 2000. sg151: B-splines and splines parameterized by their values at reference points on the X-axis. Stata Technical Bulletin 57: 20-27. Reprinted in Stata Technical Bulletin Reprints, vol. 10, pp. 221-230. Download
              from http://www.stata.com/products/stb/journals/stb57.html.

              However, I would avoid using a linear regression on a log-transformed variable, and instead use poisson with the vce(robust) option, see: http://blog.stata.com/2011/08/22/use...tell-a-friend/ Another thing to consider is that if cases is a count you need to make sure that the size of the sites is equal: a 10 deaths is not that impressive for Mexico City , but a big deal for a village with a population of a 100. With count models like poisson you would use an offset to control for that.




              ---------------------------------
              Maarten L. Buis
              University of Konstanz
              Department of history and sociology
              box 40
              78457 Konstanz
              Germany
              http://www.maartenbuis.nl
              ---------------------------------

              Comment


              • #8
                Thanks Maarten, much appreciated.

                Willard

                Comment

                Working...
                X