Announcement

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

  • how to generate an age variable that is not static

    hello,

    Please may you help me with this. How do you generate a date variable that is non static. I am trying to calculate firm age and my sample is from 2012-2016 hence the age has to be changing every year. How do I do this? Thank you.


  • #2
    Data in Stata is just data. There are no formulas like there are in e.g., Excel, that are recalculated when opening a file.
    Only way to do this is by running a do file that recalculates with difference between current date and your firm creation dates.

    Comment


    • #3
      You'll increase your chances of a precise answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex.

      With more information, Jorrit or I might have shown you precisely how to code it.

      Comment

      Working...
      X