Announcement

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

  • Is there an arbitrary way of choosing the duration of longitudinal data?

    Hi Statalist Community,

    I am currently working with so-called longitudinal variables. I would like to know if it is possible to extend a longitudinal dataset over time using stata, even if this generates a lot of missing data and/or 0 values.

    For example, in my case, I would like the time variable to start in January 2005 and end in December 2010. Is there a way of doing this, please?

    Here's a small sample:


    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input str31 municipio str22 province long cmunine int date double(date_quarterly power power_solar power_wind power_hydro) long power_biomass double(cumpower_solar cumpower_wind)
    "Campello (el)" "Alicante/Alacant" 3050 548 182   0   0 0 0 0   15 0
    "Campello (el)" "Alicante/Alacant" 3050 549 183 1.4 1.4 0 0 0 16.4 0
    "Campello (el)" "Alicante/Alacant" 3050 550 183   0   0 0 0 0 16.4 0
    "Campello (el)" "Alicante/Alacant" 3050 551 183   0   0 0 0 0 16.4 0
    "Campello (el)" "Alicante/Alacant" 3050 552 184   0   0 0 0 0 16.4 0
    end
    format %tm date
    format %tq date_quarterly


    Thank you very much in advance for your time and help!
    Best,

    Michael

  • #2
    I received an excellent answer about it in another recent post.
    Thank you all the same for your support and dedication!

    Here is the link, for those interested:

    https://www.statalist.org/forums/for...80#post1751780

    Lovely day to all of you.

    Michael

    Comment

    Working...
    X