Announcement

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

  • Confidence and prediction interval for dependent variable after MLR

    Hello ,
    I'm running a multiple regression analysis , and i'm looking to find confidence and prediction intervals for the dependent variable given fixed values of independent variables
    Is there a commande to do this using stata 13?
    Thank you

  • #2
    I'm not sure I understand your request, but it sounds like -predict- will do this. Pay particular attention to the xb and stdp options. Then you can get the confidence intervals by adding and subtracting 1.96*stdp to the xb result. (I'm assuming you are working with a large sample; if your sample is small, then replace the 1.96 by the appropriate figure for the t-distribution with the right number of degrees of freedom.)

    Comment


    • #3
      Hi Ashtone. Here is a thread from last year you may find helpful. Using the stdf option for predict was the key to getting the individual prediction interval Keowmani Thamron was looking for. Cheers,
      Bruce
      --
      Bruce Weaver
      Email: [email protected]
      Version: Stata/MP 18.5 (Windows)

      Comment


      • #4
        Maybe you could take a look at -margins - command.

        For example, getting the predicted mean value in a given model for, say, 8, 12 and 16 (you may consider as years of education):

        Code:
        margins, at(year_educ=(8 12 16))
        Last edited by Marcos Almeida; 23 Jul 2017, 19:12.
        Best regards,

        Marcos

        Comment


        • #5
          Ashtone lazarre is asking about both confidence intervals and prediction intervals. I believe she is making the same distinction that is shown on slides 54 & 55 here: Both margins and predict with the stdp option give confidence intervals (as defined on slide 54); but in order to get prediction intervals (slide 55), one must use predict with the stdf (standard error of forecast) option. Richard Williams demonstrated this in post #11 here: HTH.
          --
          Bruce Weaver
          Email: [email protected]
          Version: Stata/MP 18.5 (Windows)

          Comment


          • #6
            I see that in post #2, Clyde suggests using the stdp option while in posts #3 and #5, Bruce suggests using the stdf option; these are different and the OP should read the Stata documentation carefully to see which is appropriate in her case

            Comment


            • #7
              Actually, a close reading of the original post suggests that she is interested in both of these errors, as recommended by Bruce.

              Comment

              Working...
              X