Announcement

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

  • tsfill

    Hi,


    I'm not very familiar with the tsfill command. Can someone explain to me the difference between using tsfill alone and tsfill, full?

    Thanks in advance!

    Regards,
    Saliha

  • #2
    tsfill fills between the min and max of your time variable found for each id

    Starting from:
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float(company year)
    1 2001
    1 2003
    2 2005
    2 2007
    end
    format %ty year
    Doing:
    Code:
    tsset company year
    tsfill
    Gives:
    Code:
    . list, sepby(company)
    
         +----------------+
         | company   year |
         |----------------|
      1. |       1   2001 |
      2. |       1   2002 |
      3. |       1   2003 |
         |----------------|
      4. |       2   2005 |
      5. |       2   2006 |
      6. |       2   2007 |
         +----------------+
    
    .
    Whereas tsfill, full fills between the min and max of your time variable foudn int the entire dataset
    Doing:
    Code:
    tsset company year
    tsfill, full
    Gives:
    Code:
    . list, sepby(company)
    
         +----------------+
         | company   year |
         |----------------|
      1. |       1   2001 |
      2. |       1   2002 |
      3. |       1   2003 |
      4. |       1   2004 |
      5. |       1   2005 |
      6. |       1   2006 |
      7. |       1   2007 |
         |----------------|
      8. |       2   2001 |
      9. |       2   2002 |
     10. |       2   2003 |
     11. |       2   2004 |
     12. |       2   2005 |
     13. |       2   2006 |
     14. |       2   2007 |
         +----------------+
    
    .

    Comment


    • #3
      Thanks!

      Comment

      Working...
      X