Announcement

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

  • Help on variable generatation

    Dear All,

    I have a panel of a large number of countries (130). Since the task has to be done manually, I was wondering if there is any way to generate the variables I want. In the dataex, given below, variables to be generated are "low_regime" and "high_regime".

    low_regime if fprob is 0. For "Chile", we can see that fprob is 0 from 2004 to 2011.
    high_regime if fprob is 1. For "Chile", we can see that fprob is 0 from 1990 to 2003 and 2012-2018.
    The year range (2012-2018) captures the continuous 1s or 0s.

    For "Canada", we can see that two-year ranges are there in each regime (low_regime high_regime)

    I would be grateful if you can help me with this.

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input str6 country int year byte(id fprob) str20(low_regime high_regime)
    "Chile"  1990 1 1 "2004-2011"            "1990-2003; 2012-2018"
    "Chile"  1991 1 1 ""                     ""                    
    "Chile"  1992 1 1 ""                     ""                    
    "Chile"  1993 1 1 ""                     ""                    
    "Chile"  1994 1 1 ""                     ""                    
    "Chile"  1995 1 1 ""                     ""                    
    "Chile"  1996 1 1 ""                     ""                    
    "Chile"  1997 1 1 ""                     ""                    
    "Chile"  1998 1 1 ""                     ""                    
    "Chile"  1999 1 1 ""                     ""                    
    "Chile"  2000 1 1 ""                     ""                    
    "Chile"  2001 1 1 ""                     ""                    
    "Chile"  2002 1 1 ""                     ""                    
    "Chile"  2003 1 1 ""                     ""                    
    "Chile"  2004 1 0 ""                     ""                    
    "Chile"  2005 1 0 ""                     ""                    
    "Chile"  2006 1 0 ""                     ""                    
    "Chile"  2007 1 0 ""                     ""                    
    "Chile"  2008 1 0 ""                     ""                    
    "Chile"  2009 1 0 ""                     ""                    
    "Chile"  2010 1 0 ""                     ""                    
    "Chile"  2011 1 0 ""                     ""                    
    "Chile"  2012 1 1 ""                     ""                    
    "Chile"  2013 1 1 ""                     ""                    
    "Chile"  2014 1 1 ""                     ""                    
    "Chile"  2015 1 1 ""                     ""                    
    "Chile"  2016 1 1 ""                     ""                    
    "Chile"  2017 1 1 ""                     ""                    
    "Chile"  2018 1 1 ""                     ""                    
    "Canada" 1990 2 0 "1990-1991; 1994-2008" "1992-1993; 2009-2018"
    "Canada" 1991 2 0 ""                     ""                    
    "Canada" 1992 2 1 ""                     ""                    
    "Canada" 1993 2 1 ""                     ""                    
    "Canada" 1994 2 0 ""                     ""                    
    "Canada" 1995 2 0 ""                     ""                    
    "Canada" 1996 2 0 ""                     ""                    
    "Canada" 1997 2 0 ""                     ""                    
    "Canada" 1998 2 0 ""                     ""                    
    "Canada" 1999 2 0 ""                     ""                    
    "Canada" 2000 2 0 ""                     ""                    
    "Canada" 2001 2 0 ""                     ""                    
    "Canada" 2002 2 0 ""                     ""                    
    "Canada" 2003 2 0 ""                     ""                    
    "Canada" 2004 2 0 ""                     ""                    
    "Canada" 2005 2 0 ""                     ""                    
    "Canada" 2006 2 0 ""                     ""                    
    "Canada" 2007 2 0 ""                     ""                    
    "Canada" 2008 2 0 ""                     ""                    
    "Canada" 2009 2 1 ""                     ""                    
    "Canada" 2010 2 1 ""                     ""                    
    "Canada" 2011 2 1 ""                     ""                    
    "Canada" 2012 2 1 ""                     ""                    
    "Canada" 2013 2 1 ""                     ""                    
    "Canada" 2014 2 1 ""                     ""                    
    "Canada" 2015 2 1 ""                     ""                    
    "Canada" 2016 2 1 ""                     ""                    
    "Canada" 2017 2 1 ""                     ""                    
    "Canada" 2018 2 1 ""                     ""                    
    end
    Thank you.

  • #2
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input str6 country int year byte(id fprob) str20(low_regime high_regime)
    "Chile"  1990 1 1 "2004-2011"            "1990-2003; 2012-2018"
    "Chile"  1991 1 1 ""                     ""                    
    "Chile"  1992 1 1 ""                     ""                    
    "Chile"  1993 1 1 ""                     ""                    
    "Chile"  1994 1 1 ""                     ""                    
    "Chile"  1995 1 1 ""                     ""                    
    "Chile"  1996 1 1 ""                     ""                    
    "Chile"  1997 1 1 ""                     ""                    
    "Chile"  1998 1 1 ""                     ""                    
    "Chile"  1999 1 1 ""                     ""                    
    "Chile"  2000 1 1 ""                     ""                    
    "Chile"  2001 1 1 ""                     ""                    
    "Chile"  2002 1 1 ""                     ""                    
    "Chile"  2003 1 1 ""                     ""                    
    "Chile"  2004 1 0 ""                     ""                    
    "Chile"  2005 1 0 ""                     ""                    
    "Chile"  2006 1 0 ""                     ""                    
    "Chile"  2007 1 0 ""                     ""                    
    "Chile"  2008 1 0 ""                     ""                    
    "Chile"  2009 1 0 ""                     ""                    
    "Chile"  2010 1 0 ""                     ""                    
    "Chile"  2011 1 0 ""                     ""                    
    "Chile"  2012 1 1 ""                     ""                    
    "Chile"  2013 1 1 ""                     ""                    
    "Chile"  2014 1 1 ""                     ""                    
    "Chile"  2015 1 1 ""                     ""                    
    "Chile"  2016 1 1 ""                     ""                    
    "Chile"  2017 1 1 ""                     ""                    
    "Chile"  2018 1 1 ""                     ""                    
    "Canada" 1990 2 0 "1990-1991; 1994-2008" "1992-1993; 2009-2018"
    "Canada" 1991 2 0 ""                     ""                    
    "Canada" 1992 2 1 ""                     ""                    
    "Canada" 1993 2 1 ""                     ""                    
    "Canada" 1994 2 0 ""                     ""                    
    "Canada" 1995 2 0 ""                     ""                    
    "Canada" 1996 2 0 ""                     ""                    
    "Canada" 1997 2 0 ""                     ""                    
    "Canada" 1998 2 0 ""                     ""                    
    "Canada" 1999 2 0 ""                     ""                    
    "Canada" 2000 2 0 ""                     ""                    
    "Canada" 2001 2 0 ""                     ""                    
    "Canada" 2002 2 0 ""                     ""                    
    "Canada" 2003 2 0 ""                     ""                    
    "Canada" 2004 2 0 ""                     ""                    
    "Canada" 2005 2 0 ""                     ""                    
    "Canada" 2006 2 0 ""                     ""                    
    "Canada" 2007 2 0 ""                     ""                    
    "Canada" 2008 2 0 ""                     ""                    
    "Canada" 2009 2 1 ""                     ""                    
    "Canada" 2010 2 1 ""                     ""                    
    "Canada" 2011 2 1 ""                     ""                    
    "Canada" 2012 2 1 ""                     ""                    
    "Canada" 2013 2 1 ""                     ""                    
    "Canada" 2014 2 1 ""                     ""                    
    "Canada" 2015 2 1 ""                     ""                    
    "Canada" 2016 2 1 ""                     ""                    
    "Canada" 2017 2 1 ""                     ""                    
    "Canada" 2018 2 1 ""                     ""                    
    end
    
    bys country (year): gen start= year if fprob & fprob[_n-1]!=1
    bys country (year): gen end=year if (fprob & fprob[_n+1]==0)|(_n==_N)
    by country: replace start= start[_n-1] if missing(start) &!missing(start[_n-1])
    by country: gen tag= !missing(start) & !missing(end)
    bys country tag (year): gen which=_n if tag
    qui sum which
    gen wanted= string(start)+"-"+ string(end) if which==1
    forval i= 1/`r(max)'{
        bys country (which): replace wanted= wanted[_n-1]+ "; "+ string(start)+"-"+ string(end) if which>1 & !missing(which)
    }
    bys country(year): replace wanted= wanted[_N]
    Res.:

    Code:
    . l country year id fprob high_regime wanted, sepby(country)
    
         +---------------------------------------------------------------------------+
         | country   year   id   fprob            high_regime                 wanted |
         |---------------------------------------------------------------------------|
      1. |  Canada   1990    2       0   1992-1993; 2009-2018   1992-1993; 2009-2018 |
      2. |  Canada   1991    2       0                          1992-1993; 2009-2018 |
      3. |  Canada   1992    2       1                          1992-1993; 2009-2018 |
      4. |  Canada   1993    2       1                          1992-1993; 2009-2018 |
      5. |  Canada   1994    2       0                          1992-1993; 2009-2018 |
      6. |  Canada   1995    2       0                          1992-1993; 2009-2018 |
      7. |  Canada   1996    2       0                          1992-1993; 2009-2018 |
      8. |  Canada   1997    2       0                          1992-1993; 2009-2018 |
      9. |  Canada   1998    2       0                          1992-1993; 2009-2018 |
     10. |  Canada   1999    2       0                          1992-1993; 2009-2018 |
     11. |  Canada   2000    2       0                          1992-1993; 2009-2018 |
     12. |  Canada   2001    2       0                          1992-1993; 2009-2018 |
     13. |  Canada   2002    2       0                          1992-1993; 2009-2018 |
     14. |  Canada   2003    2       0                          1992-1993; 2009-2018 |
     15. |  Canada   2004    2       0                          1992-1993; 2009-2018 |
     16. |  Canada   2005    2       0                          1992-1993; 2009-2018 |
     17. |  Canada   2006    2       0                          1992-1993; 2009-2018 |
     18. |  Canada   2007    2       0                          1992-1993; 2009-2018 |
     19. |  Canada   2008    2       0                          1992-1993; 2009-2018 |
     20. |  Canada   2009    2       1                          1992-1993; 2009-2018 |
     21. |  Canada   2010    2       1                          1992-1993; 2009-2018 |
     22. |  Canada   2011    2       1                          1992-1993; 2009-2018 |
     23. |  Canada   2012    2       1                          1992-1993; 2009-2018 |
     24. |  Canada   2013    2       1                          1992-1993; 2009-2018 |
     25. |  Canada   2014    2       1                          1992-1993; 2009-2018 |
     26. |  Canada   2015    2       1                          1992-1993; 2009-2018 |
     27. |  Canada   2016    2       1                          1992-1993; 2009-2018 |
     28. |  Canada   2017    2       1                          1992-1993; 2009-2018 |
     29. |  Canada   2018    2       1                          1992-1993; 2009-2018 |
         |---------------------------------------------------------------------------|
     30. |   Chile   1990    1       1   1990-2003; 2012-2018   1990-2003; 2012-2018 |
     31. |   Chile   1991    1       1                          1990-2003; 2012-2018 |
     32. |   Chile   1992    1       1                          1990-2003; 2012-2018 |
     33. |   Chile   1993    1       1                          1990-2003; 2012-2018 |
     34. |   Chile   1994    1       1                          1990-2003; 2012-2018 |
     35. |   Chile   1995    1       1                          1990-2003; 2012-2018 |
     36. |   Chile   1996    1       1                          1990-2003; 2012-2018 |
     37. |   Chile   1997    1       1                          1990-2003; 2012-2018 |
     38. |   Chile   1998    1       1                          1990-2003; 2012-2018 |
     39. |   Chile   1999    1       1                          1990-2003; 2012-2018 |
     40. |   Chile   2000    1       1                          1990-2003; 2012-2018 |
     41. |   Chile   2001    1       1                          1990-2003; 2012-2018 |
     42. |   Chile   2002    1       1                          1990-2003; 2012-2018 |
     43. |   Chile   2003    1       1                          1990-2003; 2012-2018 |
     44. |   Chile   2004    1       0                          1990-2003; 2012-2018 |
     45. |   Chile   2005    1       0                          1990-2003; 2012-2018 |
     46. |   Chile   2006    1       0                          1990-2003; 2012-2018 |
     47. |   Chile   2007    1       0                          1990-2003; 2012-2018 |
     48. |   Chile   2008    1       0                          1990-2003; 2012-2018 |
     49. |   Chile   2009    1       0                          1990-2003; 2012-2018 |
     50. |   Chile   2010    1       0                          1990-2003; 2012-2018 |
     51. |   Chile   2011    1       0                          1990-2003; 2012-2018 |
     52. |   Chile   2012    1       1                          1990-2003; 2012-2018 |
     53. |   Chile   2013    1       1                          1990-2003; 2012-2018 |
     54. |   Chile   2014    1       1                          1990-2003; 2012-2018 |
     55. |   Chile   2015    1       1                          1990-2003; 2012-2018 |
     56. |   Chile   2016    1       1                          1990-2003; 2012-2018 |
     57. |   Chile   2017    1       1                          1990-2003; 2012-2018 |
     58. |   Chile   2018    1       1                          1990-2003; 2012-2018 |
         +---------------------------------------------------------------------------+
    
    .

    Comment


    • #3
      Dear Andrew Musau, Thank you a lot for providing the code. While it worked for the above data, it did not work for the below data. I think the problem lies in the second code:

      Code:
        
       bys country (year): gen end=year if (fprob & fprob[_n+1]==0)|(_n==_N)


      This generates terminal year incorrectly. For example, in the case of Australia and Austria, the terminal year should be 2016 and 2001, respectively. But it assigns 2018. That is why we see an extra year range of 2015-2018 (Australia) and 1990-2018 (Austria).

      I tried to correct it with the following code:

      Code:
        
       bys country (year): gen end=year if (fprob & fprob[_n+1]==0) | (_n==[_N] & fprob & fprob[_N]!=0) 


      The above code fixed the issue of terminal year but could not generate the "wanted" variable correctly.

      Data example is given below for your reference.

      Code:
      * Example generated by -dataex-. For more info, type help dataex
      clear
      input str52 country int year float(id fprob start end tag which) str75 wanted
      "Argentina" 1990 1 1 1990    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 1991 1 1 1990    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 1992 1 1 1990    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 1993 1 1 1990    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 1994 1 1 1990    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 1995 1 1 1990    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 1996 1 1 1990    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 1997 1 1 1990    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 1998 1 1 1990    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 1999 1 1 1990    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 2000 1 1 1990    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 2001 1 1 1990 2001 1 1 "1990-2001; 2009-2018"                                                       
      "Argentina" 2002 1 0 1990    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 2003 1 0 1990    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 2004 1 0 1990    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 2005 1 0 1990    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 2006 1 0 1990    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 2007 1 0 1990    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 2008 1 0 1990    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 2009 1 1 2009    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 2010 1 1 2009    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 2011 1 1 2009    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 2012 1 1 2009    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 2013 1 1 2009    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 2014 1 1 2009    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 2015 1 1 2009    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 2016 1 1 2009    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 2017 1 1 2009    . 0 . "1990-2001; 2009-2018"                                                       
      "Argentina" 2018 1 1 2009 2018 1 2 "1990-2001; 2009-2018"                                                       
      "Australia" 1990 2 1 1990 1990 1 1 "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 1991 2 0 1990    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 1992 2 0 1990    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 1993 2 0 1990    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 1994 2 0 1990    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 1995 2 1 1995 1995 1 2 "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 1996 2 0 1995    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 1997 2 0 1995    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 1998 2 0 1995    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 1999 2 1 1999    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2000 2 1 1999 2000 1 3 "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2001 2 0 1999    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2002 2 0 1999    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2003 2 1 2003    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2004 2 1 2003    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2005 2 1 2003    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2006 2 1 2003    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2007 2 1 2003    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2008 2 1 2003 2008 1 4 "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2009 2 0 2003    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2010 2 0 2003    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2011 2 0 2003    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2012 2 0 2003    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2013 2 1 2013 2013 1 5 "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2014 2 0 2013    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2015 2 1 2015    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2016 2 1 2015 2016 1 6 "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2017 2 0 2015    . 0 . "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Australia" 2018 2 0 2015 2018 1 7 "1990-1990; 1995-1995; 1999-2000; 2003-2008; 2013-2013; 2015-2016; 2015-2018"
      "Austria"   1990 3 1 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   1991 3 1 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   1992 3 1 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   1993 3 1 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   1994 3 1 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   1995 3 1 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   1996 3 1 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   1997 3 1 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   1998 3 1 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   1999 3 1 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   2000 3 1 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   2001 3 1 1990 2001 1 1 "1990-2001; 1990-2018"                                                       
      "Austria"   2002 3 0 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   2003 3 0 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   2004 3 0 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   2005 3 0 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   2006 3 0 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   2007 3 0 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   2008 3 0 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   2009 3 0 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   2010 3 0 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   2011 3 0 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   2012 3 0 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   2013 3 0 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   2014 3 0 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   2015 3 0 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   2016 3 0 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   2017 3 0 1990    . 0 . "1990-2001; 1990-2018"                                                       
      "Austria"   2018 3 0 1990 2018 1 2 "1990-2001; 1990-2018"                                                       
      end
      format %ty year
      Thank you.

      Comment


      • #4
        We need to add the condition "&fprob" to "(_n==_N)". This also addresses the issue of 1 year spells, i.e., we write "1990" instead of "1990-1990".
        Code:
        * Example generated by -dataex-. For more info, type help dataex
        clear
        input str52 country int year float(id fprob)
        "Argentina" 1990 1 1
        "Argentina" 1991 1 1
        "Argentina" 1992 1 1
        "Argentina" 1993 1 1
        "Argentina" 1994 1 1
        "Argentina" 1995 1 1
        "Argentina" 1996 1 1
        "Argentina" 1997 1 1
        "Argentina" 1998 1 1
        "Argentina" 1999 1 1
        "Argentina" 2000 1 1
        "Argentina" 2001 1 1
        "Argentina" 2002 1 0
        "Argentina" 2003 1 0
        "Argentina" 2004 1 0
        "Argentina" 2005 1 0
        "Argentina" 2006 1 0
        "Argentina" 2007 1 0
        "Argentina" 2008 1 0
        "Argentina" 2009 1 1
        "Argentina" 2010 1 1
        "Argentina" 2011 1 1
        "Argentina" 2012 1 1
        "Argentina" 2013 1 1
        "Argentina" 2014 1 1
        "Argentina" 2015 1 1
        "Argentina" 2016 1 1
        "Argentina" 2017 1 1
        "Argentina" 2018 1 1
        "Australia" 1990 2 1
        "Australia" 1991 2 0
        "Australia" 1992 2 0
        "Australia" 1993 2 0
        "Australia" 1994 2 0
        "Australia" 1995 2 1
        "Australia" 1996 2 0
        "Australia" 1997 2 0
        "Australia" 1998 2 0
        "Australia" 1999 2 1
        "Australia" 2000 2 1
        "Australia" 2001 2 0
        "Australia" 2002 2 0
        "Australia" 2003 2 1
        "Australia" 2004 2 1
        "Australia" 2005 2 1
        "Australia" 2006 2 1
        "Australia" 2007 2 1
        "Australia" 2008 2 1
        "Australia" 2009 2 0
        "Australia" 2010 2 0
        "Australia" 2011 2 0
        "Australia" 2012 2 0
        "Australia" 2013 2 1
        "Australia" 2014 2 0
        "Australia" 2015 2 1
        "Australia" 2016 2 1
        "Australia" 2017 2 0
        "Australia" 2018 2 0
        "Austria"   1990 3 1
        "Austria"   1991 3 1
        "Austria"   1992 3 1
        "Austria"   1993 3 1
        "Austria"   1994 3 1
        "Austria"   1995 3 1
        "Austria"   1996 3 1
        "Austria"   1997 3 1
        "Austria"   1998 3 1
        "Austria"   1999 3 1
        "Austria"   2000 3 1
        "Austria"   2001 3 1
        "Austria"   2002 3 0
        "Austria"   2003 3 0
        "Austria"   2004 3 0
        "Austria"   2005 3 0
        "Austria"   2006 3 0
        "Austria"   2007 3 0
        "Austria"   2008 3 0
        "Austria"   2009 3 0
        "Austria"   2010 3 0
        "Austria"   2011 3 0
        "Austria"   2012 3 0
        "Austria"   2013 3 0
        "Austria"   2014 3 0
        "Austria"   2015 3 0
        "Austria"   2016 3 0
        "Austria"   2017 3 0
        "Austria"   2018 3 0
        end
        format %ty year
        
        bys country (year): gen start= year if fprob & fprob[_n-1]!=1
        bys country (year): gen end=year if (fprob & fprob[_n+1]==0)|(_n==_N &fprob)
        by country: replace start= start[_n-1] if missing(start) &!missing(start[_n-1])
        by country: gen tag= !missing(start) & !missing(end)
        bys country tag (year): gen which=_n if tag
        qui sum which
        gen wanted= cond(start==end, string(start), string(start)+"-"+ string(end)) if which==1
        forval i= 1/`r(max)'{
            bys country (which): replace wanted= cond(start==end, wanted[_n-1]+ "; "+string(start), wanted[_n-1]+ "; "+ string(start)+"-"+ string(end)) if which>1 & !missing(which)
        }
        gsort country -tag -year
        by country: replace wanted= wanted[1]
        Res.:

        Code:
        . sort country year
        
        . l, sepby(country)
        
             +----------------------------------------------------------------------------------------------------------------+
             |   country   year   id   fprob   start    end   tag   which                                              wanted |
             |----------------------------------------------------------------------------------------------------------------|
          1. | Argentina   1990    1       1    1990      .     0       .                                1990-2001; 2009-2018 |
          2. | Argentina   1991    1       1    1990      .     0       .                                1990-2001; 2009-2018 |
          3. | Argentina   1992    1       1    1990      .     0       .                                1990-2001; 2009-2018 |
          4. | Argentina   1993    1       1    1990      .     0       .                                1990-2001; 2009-2018 |
          5. | Argentina   1994    1       1    1990      .     0       .                                1990-2001; 2009-2018 |
          6. | Argentina   1995    1       1    1990      .     0       .                                1990-2001; 2009-2018 |
          7. | Argentina   1996    1       1    1990      .     0       .                                1990-2001; 2009-2018 |
          8. | Argentina   1997    1       1    1990      .     0       .                                1990-2001; 2009-2018 |
          9. | Argentina   1998    1       1    1990      .     0       .                                1990-2001; 2009-2018 |
         10. | Argentina   1999    1       1    1990      .     0       .                                1990-2001; 2009-2018 |
         11. | Argentina   2000    1       1    1990      .     0       .                                1990-2001; 2009-2018 |
         12. | Argentina   2001    1       1    1990   2001     1       1                                1990-2001; 2009-2018 |
         13. | Argentina   2002    1       0    1990      .     0       .                                1990-2001; 2009-2018 |
         14. | Argentina   2003    1       0    1990      .     0       .                                1990-2001; 2009-2018 |
         15. | Argentina   2004    1       0    1990      .     0       .                                1990-2001; 2009-2018 |
         16. | Argentina   2005    1       0    1990      .     0       .                                1990-2001; 2009-2018 |
         17. | Argentina   2006    1       0    1990      .     0       .                                1990-2001; 2009-2018 |
         18. | Argentina   2007    1       0    1990      .     0       .                                1990-2001; 2009-2018 |
         19. | Argentina   2008    1       0    1990      .     0       .                                1990-2001; 2009-2018 |
         20. | Argentina   2009    1       1    2009      .     0       .                                1990-2001; 2009-2018 |
         21. | Argentina   2010    1       1    2009      .     0       .                                1990-2001; 2009-2018 |
         22. | Argentina   2011    1       1    2009      .     0       .                                1990-2001; 2009-2018 |
         23. | Argentina   2012    1       1    2009      .     0       .                                1990-2001; 2009-2018 |
         24. | Argentina   2013    1       1    2009      .     0       .                                1990-2001; 2009-2018 |
         25. | Argentina   2014    1       1    2009      .     0       .                                1990-2001; 2009-2018 |
         26. | Argentina   2015    1       1    2009      .     0       .                                1990-2001; 2009-2018 |
         27. | Argentina   2016    1       1    2009      .     0       .                                1990-2001; 2009-2018 |
         28. | Argentina   2017    1       1    2009      .     0       .                                1990-2001; 2009-2018 |
         29. | Argentina   2018    1       1    2009   2018     1       2                                1990-2001; 2009-2018 |
             |----------------------------------------------------------------------------------------------------------------|
         30. | Australia   1990    2       1    1990   1990     1       1   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         31. | Australia   1991    2       0    1990      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         32. | Australia   1992    2       0    1990      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         33. | Australia   1993    2       0    1990      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         34. | Australia   1994    2       0    1990      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         35. | Australia   1995    2       1    1995   1995     1       2   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         36. | Australia   1996    2       0    1995      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         37. | Australia   1997    2       0    1995      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         38. | Australia   1998    2       0    1995      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         39. | Australia   1999    2       1    1999      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         40. | Australia   2000    2       1    1999   2000     1       3   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         41. | Australia   2001    2       0    1999      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         42. | Australia   2002    2       0    1999      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         43. | Australia   2003    2       1    2003      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         44. | Australia   2004    2       1    2003      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         45. | Australia   2005    2       1    2003      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         46. | Australia   2006    2       1    2003      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         47. | Australia   2007    2       1    2003      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         48. | Australia   2008    2       1    2003   2008     1       4   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         49. | Australia   2009    2       0    2003      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         50. | Australia   2010    2       0    2003      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         51. | Australia   2011    2       0    2003      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         52. | Australia   2012    2       0    2003      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         53. | Australia   2013    2       1    2013   2013     1       5   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         54. | Australia   2014    2       0    2013      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         55. | Australia   2015    2       1    2015      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         56. | Australia   2016    2       1    2015   2016     1       6   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         57. | Australia   2017    2       0    2015      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
         58. | Australia   2018    2       0    2015      .     0       .   1990; 1995; 1999-2000; 2003-2008; 2013; 2015-2016 |
             |----------------------------------------------------------------------------------------------------------------|
         59. |   Austria   1990    3       1    1990      .     0       .                                           1990-2001 |
         60. |   Austria   1991    3       1    1990      .     0       .                                           1990-2001 |
         61. |   Austria   1992    3       1    1990      .     0       .                                           1990-2001 |
         62. |   Austria   1993    3       1    1990      .     0       .                                           1990-2001 |
         63. |   Austria   1994    3       1    1990      .     0       .                                           1990-2001 |
         64. |   Austria   1995    3       1    1990      .     0       .                                           1990-2001 |
         65. |   Austria   1996    3       1    1990      .     0       .                                           1990-2001 |
         66. |   Austria   1997    3       1    1990      .     0       .                                           1990-2001 |
         67. |   Austria   1998    3       1    1990      .     0       .                                           1990-2001 |
         68. |   Austria   1999    3       1    1990      .     0       .                                           1990-2001 |
         69. |   Austria   2000    3       1    1990      .     0       .                                           1990-2001 |
         70. |   Austria   2001    3       1    1990   2001     1       1                                           1990-2001 |
         71. |   Austria   2002    3       0    1990      .     0       .                                           1990-2001 |
         72. |   Austria   2003    3       0    1990      .     0       .                                           1990-2001 |
         73. |   Austria   2004    3       0    1990      .     0       .                                           1990-2001 |
         74. |   Austria   2005    3       0    1990      .     0       .                                           1990-2001 |
         75. |   Austria   2006    3       0    1990      .     0       .                                           1990-2001 |
         76. |   Austria   2007    3       0    1990      .     0       .                                           1990-2001 |
         77. |   Austria   2008    3       0    1990      .     0       .                                           1990-2001 |
         78. |   Austria   2009    3       0    1990      .     0       .                                           1990-2001 |
         79. |   Austria   2010    3       0    1990      .     0       .                                           1990-2001 |
         80. |   Austria   2011    3       0    1990      .     0       .                                           1990-2001 |
         81. |   Austria   2012    3       0    1990      .     0       .                                           1990-2001 |
         82. |   Austria   2013    3       0    1990      .     0       .                                           1990-2001 |
         83. |   Austria   2014    3       0    1990      .     0       .                                           1990-2001 |
         84. |   Austria   2015    3       0    1990      .     0       .                                           1990-2001 |
         85. |   Austria   2016    3       0    1990      .     0       .                                           1990-2001 |
         86. |   Austria   2017    3       0    1990      .     0       .                                           1990-2001 |
         87. |   Austria   2018    3       0    1990      .     0       .                                           1990-2001 |
             +----------------------------------------------------------------------------------------------------------------+
        
        .

        Comment


        • #5
          Thank you, Andrew Musau for kindly providing the solution. That worked fine.

          Comment


          • #6
            Dear Andrew Musau
            To create the "high_regime" variable in #1 (which is basically a spell of 0s), I wrote the following code which is showing some problems.

            Code:
            bys country (year): gen start0= year if fprob[_n-1]!=0
            gen start = year if start0 != . & fprob == 0
            bys country (year): gen end0 = year if fprob & fprob[_n-1]!=1
            g end = year if end0[_n+1] != .
            replace end = . if fprob == 1
            drop start0 end0
            For id=3 (Austria), the above code is not assigning 2018 for the year 2018 in the "end" variable. For id=3, the spell of zeroes is 2002-2018.

            Code:
            * Example generated by -dataex-. For more info, type help dataex
            clear
            input str52 country int year float(id fprob start end)
            "Argentina" 1990 1 1    .    .
            "Argentina" 1991 1 1    .    .
            "Argentina" 1992 1 1    .    .
            "Argentina" 1993 1 1    .    .
            "Argentina" 1994 1 1    .    .
            "Argentina" 1995 1 1    .    .
            "Argentina" 1996 1 1    .    .
            "Argentina" 1997 1 1    .    .
            "Argentina" 1998 1 1    .    .
            "Argentina" 1999 1 1    .    .
            "Argentina" 2000 1 1    .    .
            "Argentina" 2001 1 1    .    .
            "Argentina" 2002 1 0 2002    .
            "Argentina" 2003 1 0    .    .
            "Argentina" 2004 1 0    .    .
            "Argentina" 2005 1 0    .    .
            "Argentina" 2006 1 0    .    .
            "Argentina" 2007 1 0    .    .
            "Argentina" 2008 1 0    . 2008
            "Argentina" 2009 1 1    .    .
            "Argentina" 2010 1 1    .    .
            "Argentina" 2011 1 1    .    .
            "Argentina" 2012 1 1    .    .
            "Argentina" 2013 1 1    .    .
            "Argentina" 2014 1 1    .    .
            "Argentina" 2015 1 1    .    .
            "Argentina" 2016 1 1    .    .
            "Argentina" 2017 1 1    .    .
            "Argentina" 2018 1 1    .    .
            "Australia" 1990 2 1    .    .
            "Australia" 1991 2 0 1991    .
            "Australia" 1992 2 0    .    .
            "Australia" 1993 2 0    .    .
            "Australia" 1994 2 0    . 1994
            "Australia" 1995 2 1    .    .
            "Australia" 1996 2 0 1996    .
            "Australia" 1997 2 0    .    .
            "Australia" 1998 2 0    . 1998
            "Australia" 1999 2 1    .    .
            "Australia" 2000 2 1    .    .
            "Australia" 2001 2 0 2001    .
            "Australia" 2002 2 0    . 2002
            "Australia" 2003 2 1    .    .
            "Australia" 2004 2 1    .    .
            "Australia" 2005 2 1    .    .
            "Australia" 2006 2 1    .    .
            "Australia" 2007 2 1    .    .
            "Australia" 2008 2 1    .    .
            "Australia" 2009 2 0 2009    .
            "Australia" 2010 2 0    .    .
            "Australia" 2011 2 0    .    .
            "Australia" 2012 2 0    . 2012
            "Australia" 2013 2 1    .    .
            "Australia" 2014 2 0 2014 2014
            "Australia" 2015 2 1    .    .
            "Australia" 2016 2 1    .    .
            "Australia" 2017 2 0 2017    .
            "Australia" 2018 2 0    . 2018
            "Austria"   1990 3 1    .    .
            "Austria"   1991 3 1    .    .
            "Austria"   1992 3 1    .    .
            "Austria"   1993 3 1    .    .
            "Austria"   1994 3 1    .    .
            "Austria"   1995 3 1    .    .
            "Austria"   1996 3 1    .    .
            "Austria"   1997 3 1    .    .
            "Austria"   1998 3 1    .    .
            "Austria"   1999 3 1    .    .
            "Austria"   2000 3 1    .    .
            "Austria"   2001 3 1    .    .
            "Austria"   2002 3 0 2002    .
            "Austria"   2003 3 0    .    .
            "Austria"   2004 3 0    .    .
            "Austria"   2005 3 0    .    .
            "Austria"   2006 3 0    .    .
            "Austria"   2007 3 0    .    .
            "Austria"   2008 3 0    .    .
            "Austria"   2009 3 0    .    .
            "Austria"   2010 3 0    .    .
            "Austria"   2011 3 0    .    .
            "Austria"   2012 3 0    .    .
            "Austria"   2013 3 0    .    .
            "Austria"   2014 3 0    .    .
            "Austria"   2015 3 0    .    .
            "Austria"   2016 3 0    .    .
            "Austria"   2017 3 0    .    .
            "Austria"   2018 3 0    .    .
            end



            I tried a lot to fix that, but could not succeed.
            Could you kindly help with the code?

            Thank you.

            Comment


            • #7
              It's the same code as #4, but you are just changing the condition fbrob=1 to fbrob=0. You can read the condition "!frob" as "fprob==0" in the code below.

              Code:
              * Example generated by -dataex-. For more info, type help dataex
              clear
              input str52 country int year float(id fprob)
              "Argentina" 1990 1 1
              "Argentina" 1991 1 1
              "Argentina" 1992 1 1
              "Argentina" 1993 1 1
              "Argentina" 1994 1 1
              "Argentina" 1995 1 1
              "Argentina" 1996 1 1
              "Argentina" 1997 1 1
              "Argentina" 1998 1 1
              "Argentina" 1999 1 1
              "Argentina" 2000 1 1
              "Argentina" 2001 1 1
              "Argentina" 2002 1 0
              "Argentina" 2003 1 0
              "Argentina" 2004 1 0
              "Argentina" 2005 1 0
              "Argentina" 2006 1 0
              "Argentina" 2007 1 0
              "Argentina" 2008 1 0
              "Argentina" 2009 1 1
              "Argentina" 2010 1 1
              "Argentina" 2011 1 1
              "Argentina" 2012 1 1
              "Argentina" 2013 1 1
              "Argentina" 2014 1 1
              "Argentina" 2015 1 1
              "Argentina" 2016 1 1
              "Argentina" 2017 1 1
              "Argentina" 2018 1 1
              "Australia" 1990 2 1
              "Australia" 1991 2 0
              "Australia" 1992 2 0
              "Australia" 1993 2 0
              "Australia" 1994 2 0
              "Australia" 1995 2 1
              "Australia" 1996 2 0
              "Australia" 1997 2 0
              "Australia" 1998 2 0
              "Australia" 1999 2 1
              "Australia" 2000 2 1
              "Australia" 2001 2 0
              "Australia" 2002 2 0
              "Australia" 2003 2 1
              "Australia" 2004 2 1
              "Australia" 2005 2 1
              "Australia" 2006 2 1
              "Australia" 2007 2 1
              "Australia" 2008 2 1
              "Australia" 2009 2 0
              "Australia" 2010 2 0
              "Australia" 2011 2 0
              "Australia" 2012 2 0
              "Australia" 2013 2 1
              "Australia" 2014 2 0
              "Australia" 2015 2 1
              "Australia" 2016 2 1
              "Australia" 2017 2 0
              "Australia" 2018 2 0
              "Austria"   1990 3 1
              "Austria"   1991 3 1
              "Austria"   1992 3 1
              "Austria"   1993 3 1
              "Austria"   1994 3 1
              "Austria"   1995 3 1
              "Austria"   1996 3 1
              "Austria"   1997 3 1
              "Austria"   1998 3 1
              "Austria"   1999 3 1
              "Austria"   2000 3 1
              "Austria"   2001 3 1
              "Austria"   2002 3 0
              "Austria"   2003 3 0
              "Austria"   2004 3 0
              "Austria"   2005 3 0
              "Austria"   2006 3 0
              "Austria"   2007 3 0
              "Austria"   2008 3 0
              "Austria"   2009 3 0
              "Austria"   2010 3 0
              "Austria"   2011 3 0
              "Austria"   2012 3 0
              "Austria"   2013 3 0
              "Austria"   2014 3 0
              "Austria"   2015 3 0
              "Austria"   2016 3 0
              "Austria"   2017 3 0
              "Austria"   2018 3 0
              end
              format %ty year
              
              bys country (year): gen start= year if !fprob & fprob[_n-1]
              bys country (year): gen end=year if (!fprob & fprob[_n+1]==1)|(_n==_N &!fprob)
              by country: replace start= start[_n-1] if missing(start) &!missing(start[_n-1])
              by country: gen tag= !missing(start) & !missing(end)
              bys country tag (year): gen which=_n if tag
              qui sum which
              gen wanted= cond(start==end, string(start), string(start)+"-"+ string(end)) if which==1
              forval i= 1/`r(max)'{
                  bys country (which): replace wanted= cond(start==end, wanted[_n-1]+ "; "+string(start), wanted[_n-1]+ "; "+ string(start)+"-"+ string(end)) if which>1 & !missing(which)
              }
              gsort country -tag -year
              by country: replace wanted= wanted[1]
              Res.:

              Code:
              . sort id year
              
              . list, sepby(id)
              
                   +--------------------------------------------------------------------------------------------------------------------------+
                   |   country   year   id   fprob   start    end   tag   which                                                        wanted |
                   |--------------------------------------------------------------------------------------------------------------------------|
                1. | Argentina   1990    1       1       .      .     0       .                                                     2002-2008 |
                2. | Argentina   1991    1       1       .      .     0       .                                                     2002-2008 |
                3. | Argentina   1992    1       1       .      .     0       .                                                     2002-2008 |
                4. | Argentina   1993    1       1       .      .     0       .                                                     2002-2008 |
                5. | Argentina   1994    1       1       .      .     0       .                                                     2002-2008 |
                6. | Argentina   1995    1       1       .      .     0       .                                                     2002-2008 |
                7. | Argentina   1996    1       1       .      .     0       .                                                     2002-2008 |
                8. | Argentina   1997    1       1       .      .     0       .                                                     2002-2008 |
                9. | Argentina   1998    1       1       .      .     0       .                                                     2002-2008 |
               10. | Argentina   1999    1       1       .      .     0       .                                                     2002-2008 |
               11. | Argentina   2000    1       1       .      .     0       .                                                     2002-2008 |
               12. | Argentina   2001    1       1       .      .     0       .                                                     2002-2008 |
               13. | Argentina   2002    1       0    2002      .     0       .                                                     2002-2008 |
               14. | Argentina   2003    1       0    2002      .     0       .                                                     2002-2008 |
               15. | Argentina   2004    1       0    2002      .     0       .                                                     2002-2008 |
               16. | Argentina   2005    1       0    2002      .     0       .                                                     2002-2008 |
               17. | Argentina   2006    1       0    2002      .     0       .                                                     2002-2008 |
               18. | Argentina   2007    1       0    2002      .     0       .                                                     2002-2008 |
               19. | Argentina   2008    1       0    2002   2008     1       1                                                     2002-2008 |
               20. | Argentina   2009    1       1    2002      .     0       .                                                     2002-2008 |
               21. | Argentina   2010    1       1    2002      .     0       .                                                     2002-2008 |
               22. | Argentina   2011    1       1    2002      .     0       .                                                     2002-2008 |
               23. | Argentina   2012    1       1    2002      .     0       .                                                     2002-2008 |
               24. | Argentina   2013    1       1    2002      .     0       .                                                     2002-2008 |
               25. | Argentina   2014    1       1    2002      .     0       .                                                     2002-2008 |
               26. | Argentina   2015    1       1    2002      .     0       .                                                     2002-2008 |
               27. | Argentina   2016    1       1    2002      .     0       .                                                     2002-2008 |
               28. | Argentina   2017    1       1    2002      .     0       .                                                     2002-2008 |
               29. | Argentina   2018    1       1    2002      .     0       .                                                     2002-2008 |
                   |--------------------------------------------------------------------------------------------------------------------------|
               30. | Australia   1990    2       1       .      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               31. | Australia   1991    2       0    1991      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               32. | Australia   1992    2       0    1991      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               33. | Australia   1993    2       0    1991      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               34. | Australia   1994    2       0    1991   1994     1       1   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               35. | Australia   1995    2       1    1991      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               36. | Australia   1996    2       0    1996      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               37. | Australia   1997    2       0    1996      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               38. | Australia   1998    2       0    1996   1998     1       2   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               39. | Australia   1999    2       1    1996      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               40. | Australia   2000    2       1    1996      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               41. | Australia   2001    2       0    2001      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               42. | Australia   2002    2       0    2001   2002     1       3   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               43. | Australia   2003    2       1    2001      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               44. | Australia   2004    2       1    2001      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               45. | Australia   2005    2       1    2001      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               46. | Australia   2006    2       1    2001      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               47. | Australia   2007    2       1    2001      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               48. | Australia   2008    2       1    2001      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               49. | Australia   2009    2       0    2009      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               50. | Australia   2010    2       0    2009      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               51. | Australia   2011    2       0    2009      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               52. | Australia   2012    2       0    2009   2012     1       4   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               53. | Australia   2013    2       1    2009      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               54. | Australia   2014    2       0    2014   2014     1       5   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               55. | Australia   2015    2       1    2014      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               56. | Australia   2016    2       1    2014      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               57. | Australia   2017    2       0    2017      .     0       .   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
               58. | Australia   2018    2       0    2017   2018     1       6   1991-1994; 1996-1998; 2001-2002; 2009-2012; 2014; 2017-2018 |
                   |--------------------------------------------------------------------------------------------------------------------------|
               59. |   Austria   1990    3       1       .      .     0       .                                                     2002-2018 |
               60. |   Austria   1991    3       1       .      .     0       .                                                     2002-2018 |
               61. |   Austria   1992    3       1       .      .     0       .                                                     2002-2018 |
               62. |   Austria   1993    3       1       .      .     0       .                                                     2002-2018 |
               63. |   Austria   1994    3       1       .      .     0       .                                                     2002-2018 |
               64. |   Austria   1995    3       1       .      .     0       .                                                     2002-2018 |
               65. |   Austria   1996    3       1       .      .     0       .                                                     2002-2018 |
               66. |   Austria   1997    3       1       .      .     0       .                                                     2002-2018 |
               67. |   Austria   1998    3       1       .      .     0       .                                                     2002-2018 |
               68. |   Austria   1999    3       1       .      .     0       .                                                     2002-2018 |
               69. |   Austria   2000    3       1       .      .     0       .                                                     2002-2018 |
               70. |   Austria   2001    3       1       .      .     0       .                                                     2002-2018 |
               71. |   Austria   2002    3       0    2002      .     0       .                                                     2002-2018 |
               72. |   Austria   2003    3       0    2002      .     0       .                                                     2002-2018 |
               73. |   Austria   2004    3       0    2002      .     0       .                                                     2002-2018 |
               74. |   Austria   2005    3       0    2002      .     0       .                                                     2002-2018 |
               75. |   Austria   2006    3       0    2002      .     0       .                                                     2002-2018 |
               76. |   Austria   2007    3       0    2002      .     0       .                                                     2002-2018 |
               77. |   Austria   2008    3       0    2002      .     0       .                                                     2002-2018 |
               78. |   Austria   2009    3       0    2002      .     0       .                                                     2002-2018 |
               79. |   Austria   2010    3       0    2002      .     0       .                                                     2002-2018 |
               80. |   Austria   2011    3       0    2002      .     0       .                                                     2002-2018 |
               81. |   Austria   2012    3       0    2002      .     0       .                                                     2002-2018 |
               82. |   Austria   2013    3       0    2002      .     0       .                                                     2002-2018 |
               83. |   Austria   2014    3       0    2002      .     0       .                                                     2002-2018 |
               84. |   Austria   2015    3       0    2002      .     0       .                                                     2002-2018 |
               85. |   Austria   2016    3       0    2002      .     0       .                                                     2002-2018 |
               86. |   Austria   2017    3       0    2002      .     0       .                                                     2002-2018 |
               87. |   Austria   2018    3       0    2002   2018     1       1                                                     2002-2018 |
                   +--------------------------------------------------------------------------------------------------------------------------+
              
              .
              Last edited by Andrew Musau; 21 Apr 2022, 10:18.

              Comment


              • #8
                Thank you very much, Professor Andrew Musau.

                Comment

                Working...
                X