Announcement

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

  • Regression with time

    Hello everyone,

    I would like to run a regression with date for example as follows:

    Inflation=GDP+year+month

    where year and month are dummies variables, knowing that the data is monthly time series, the date variable is in the format of 2006m6, 2006m7, 2006m8 . . . . . . 2012m12.

    how can I do it ? I need to turn the date variable into a numeric value ?

    Thanks in advance !


  • #2
    Your date variable is quite likely already a numeric value, a Stata Internal Format monthly date formatted with the %tm format. See the output of
    Code:
    describe date_variable
    Stata's "date and time" variables are complicated and there is a lot to learn. If you have not already read the very detailed Chapter 24 (Working with dates and times) of the Stata User's Guide PDF, do so now. If you have, it's time for a refresher. After that, the help datetime documentation will usually be enough to point the way. You can't remember everything; even the most experienced users end up referring to the help datetime documentation or back to the manual for details. But at least you will get a good understanding of the basics and the underlying principles. An investment of time that will be amply repaid.

    All Stata manuals are included as PDFs in the Stata installation and are accessible from within Stata - for example, through the PDF Documentation section of Stata's Help menu.

    Comment


    • #3
      Hi William,

      Thank you for your advice, I understood well and succeeded in running the regression.


      Best regards !


      Comment

      Working...
      X