Announcement

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

  • Rescaling Time

    Hi Statlist,

    I have the following problem. I have a panel dataset of the form:
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float(dummy_1 idproduct Year)
    0  1 2010
    0  1 2011
    0  1 2012
    0  2 2004
    0  2 2005
    0  2 2006
    0  2 2007
    0  3 2004
    0  4 2012
    0  4 2013
    0  5 2010
    0  5 2011
    0  6 2010
    0  6 2011
    0  6 2012
    0  7 2007
    0  7 2008
    0  8 2004
    0  8 2015
    0  9 2004
    0  9 2005
    0  9 2006
    0  9 2007
    0  9 2008
    0  9 2009
    0  9 2010
    0  9 2011
    0  9 2012
    0  9 2013
    0  9 2014
    0  9 2015
    0 10 2010
    0 10 2011
    0 10 2012
    0 11 2004
    0 11 2005
    0 11 2006
    0 11 2007
    0 11 2008
    0 11 2009
    0 11 2010
    0 11 2011
    0 11 2012
    0 11 2013
    0 11 2014
    0 11 2015
    0 12 2008
    0 12 2009
    0 12 2010
    0 12 2011
    0 12 2012
    0 12 2013
    0 12 2014
    0 12 2015
    0 13 2010
    0 13 2011
    0 13 2012
    1 14 2004
    0 14 2005
    0 14 2006
    0 14 2007
    0 14 2008
    0 14 2009
    0 14 2010
    0 14 2011
    0 14 2012
    0 14 2013
    0 14 2015
    0 15 2004
    0 15 2005
    1 15 2006
    0 15 2007
    0 15 2008
    0 15 2010
    1 15 2011
    0 15 2012
    0 15 2013
    0 16 2004
    0 16 2005
    0 16 2006
    0 16 2007
    0 16 2008
    0 16 2009
    0 16 2010
    0 16 2011
    0 16 2012
    0 16 2013
    0 16 2014
    0 16 2015
    0 17 2008
    0 17 2009
    0 17 2010
    0 18 2004
    0 18 2005
    0 18 2009
    0 18 2010
    1 18 2011
    1 18 2012
    0 18 2013
    0 18 2014
    end
    Hence, the data consists of products observed in time (unbalanced panel). I also have a dummy variable taking 1 if the product has been recalled in a Year and 0 if not. What I would like to do is basically rescaling the time variable Year for each product with respect to the Year in which it received the recall. SO for instance if the product 3, observed in 2005 2006 2007 and 2008 received a recall in 2007, 2007 should be year 0, 2005 = -2, 2006 = -1, 2007 = 0, 2008 = 1 and so on. I have managed to this. The problem is when more than a recall occurs in a time span. Specifically, say idproduct 18 in the data above. Idprod 18 receives 2 recalls one in 2011 and one in 2012. For such kinds of products (and also the ones receiving more than 2 recalls) I would like to rescale time by splitting it into two rescaled time putting the year in common as "pre" of the "younger" recall and "post" of the "elder". So in the case of product 18 I would like to obtain something like:

    Code:
    input float(dummy_1 idproduct Year rescaled_year)
    0 18 2004 -4
    0 18 2005 -3
    0 18 2009 -2
    0 18 2010 -1
    1 18 2011. 0
    1 18 2012.  0
    0 18 2013  1
    0 18 2014  2
    And for product 15 (which has years in common due to the fact that the recalls are separated):
    Code:
    input float(dummy_1 idproduct Year rescaled_year)
    0 15 2004 -2
    0 15 2005 -1
    1 15 2006 0
    0 15 2007 1; -3
    0 15 2008 2; -2
    0 15 2010 3; -1
    1 15 2011 0
    0 15 2012 1
    0 15 2013 2
    I don't know if the output is correct: indeed the variable rescaled_year should be eventually, plot on the x-axis of a graphic (so two values for a same rescaled_year are not convenient I guess) The point is that I am looking for a way to split into two the spans of the recalls: the first in 2006 should look: -2, -1, 0,1, 2 , 3; the second in 2011: -1, 0,1,2.
    Please notice that this should extend to the case in which I have 3,4 and 5 recalls.
    So, for instance had idpr 15 had 3 recalls, this should have been:

    Code:
    input float(dummy_1 idproduct Year rescaled_year)
    0 15 2004 -1
    1 15 2005 0
    1 15 2006 0
    0 15 2007 1; -3
    0 15 2008 2; -2
    0 15 2010 3; -1
    1 15 2011 0
    0 15 2012 1
    0 15 2013 2

    Sorry for the length of the post and thank you in advance!

    Federico
    Last edited by Federico Nutarelli; 28 Oct 2019, 05:55.

  • #2
    You seem to be asking for one or more mumeric values to be put in one variable. You can put values like 1; -3 in a string variable but what would you (want to do) with such a variable? As you aware it would not be very useful for plotting.

    This code produces a separate rescaling for each recall and is general in terms of how many recalls there are. Some of the technique is discussed in https://www.stata-journal.com/articl...article=dm0055

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float(dummy_1 idproduct Year)
    0  1 2010
    0  1 2011
    0  1 2012
    0  2 2004
    0  2 2005
    0  2 2006
    0  2 2007
    0  3 2004
    0  4 2012
    0  4 2013
    0  5 2010
    0  5 2011
    0  6 2010
    0  6 2011
    0  6 2012
    0  7 2007
    0  7 2008
    0  8 2004
    0  8 2015
    0  9 2004
    0  9 2005
    0  9 2006
    0  9 2007
    0  9 2008
    0  9 2009
    0  9 2010
    0  9 2011
    0  9 2012
    0  9 2013
    0  9 2014
    0  9 2015
    0 10 2010
    0 10 2011
    0 10 2012
    0 11 2004
    0 11 2005
    0 11 2006
    0 11 2007
    0 11 2008
    0 11 2009
    0 11 2010
    0 11 2011
    0 11 2012
    0 11 2013
    0 11 2014
    0 11 2015
    0 12 2008
    0 12 2009
    0 12 2010
    0 12 2011
    0 12 2012
    0 12 2013
    0 12 2014
    0 12 2015
    0 13 2010
    0 13 2011
    0 13 2012
    1 14 2004
    0 14 2005
    0 14 2006
    0 14 2007
    0 14 2008
    0 14 2009
    0 14 2010
    0 14 2011
    0 14 2012
    0 14 2013
    0 14 2015
    0 15 2004
    0 15 2005
    1 15 2006
    0 15 2007
    0 15 2008
    0 15 2010
    1 15 2011
    0 15 2012
    0 15 2013
    0 16 2004
    0 16 2005
    0 16 2006
    0 16 2007
    0 16 2008
    0 16 2009
    0 16 2010
    0 16 2011
    0 16 2012
    0 16 2013
    0 16 2014
    0 16 2015
    0 17 2008
    0 17 2009
    0 17 2010
    0 18 2004
    0 18 2005
    0 18 2009
    0 18 2010
    1 18 2011
    1 18 2012
    0 18 2013
    0 18 2014
    end
    
    bysort idproduct (Year): gen recalls = cond(dummy_1, sum(dummy_1), 0)
    
    su recalls, meanonly
    
    quietly forval j = 1/`r(max)' {
        egen when`j' = total(Year * (recalls == `j')), by(idproduct)
        replace when`j' = . if when`j' == 0
        gen rescale`j' = Year - when`j'
    }
    
    list, sepby(idproduct)
    
         +---------------------------------------------------------------------------+
         | dummy_1   idprod~t   Year   recalls   when1   rescale1   when2   rescale2 |
         |---------------------------------------------------------------------------|
      1. |       0          1   2010         0       .          .       .          . |
      2. |       0          1   2011         0       .          .       .          . |
      3. |       0          1   2012         0       .          .       .          . |
         |---------------------------------------------------------------------------|
      4. |       0          2   2004         0       .          .       .          . |
      5. |       0          2   2005         0       .          .       .          . |
      6. |       0          2   2006         0       .          .       .          . |
      7. |       0          2   2007         0       .          .       .          . |
         |---------------------------------------------------------------------------|
      8. |       0          3   2004         0       .          .       .          . |
         |---------------------------------------------------------------------------|
      9. |       0          4   2012         0       .          .       .          . |
     10. |       0          4   2013         0       .          .       .          . |
         |---------------------------------------------------------------------------|
     11. |       0          5   2010         0       .          .       .          . |
     12. |       0          5   2011         0       .          .       .          . |
         |---------------------------------------------------------------------------|
     13. |       0          6   2010         0       .          .       .          . |
     14. |       0          6   2011         0       .          .       .          . |
     15. |       0          6   2012         0       .          .       .          . |
         |---------------------------------------------------------------------------|
     16. |       0          7   2007         0       .          .       .          . |
     17. |       0          7   2008         0       .          .       .          . |
         |---------------------------------------------------------------------------|
     18. |       0          8   2004         0       .          .       .          . |
     19. |       0          8   2015         0       .          .       .          . |
         |---------------------------------------------------------------------------|
     20. |       0          9   2004         0       .          .       .          . |
     21. |       0          9   2005         0       .          .       .          . |
     22. |       0          9   2006         0       .          .       .          . |
     23. |       0          9   2007         0       .          .       .          . |
     24. |       0          9   2008         0       .          .       .          . |
     25. |       0          9   2009         0       .          .       .          . |
     26. |       0          9   2010         0       .          .       .          . |
     27. |       0          9   2011         0       .          .       .          . |
     28. |       0          9   2012         0       .          .       .          . |
     29. |       0          9   2013         0       .          .       .          . |
     30. |       0          9   2014         0       .          .       .          . |
     31. |       0          9   2015         0       .          .       .          . |
         |---------------------------------------------------------------------------|
     32. |       0         10   2010         0       .          .       .          . |
     33. |       0         10   2011         0       .          .       .          . |
     34. |       0         10   2012         0       .          .       .          . |
         |---------------------------------------------------------------------------|
     35. |       0         11   2004         0       .          .       .          . |
     36. |       0         11   2005         0       .          .       .          . |
     37. |       0         11   2006         0       .          .       .          . |
     38. |       0         11   2007         0       .          .       .          . |
     39. |       0         11   2008         0       .          .       .          . |
     40. |       0         11   2009         0       .          .       .          . |
     41. |       0         11   2010         0       .          .       .          . |
     42. |       0         11   2011         0       .          .       .          . |
     43. |       0         11   2012         0       .          .       .          . |
     44. |       0         11   2013         0       .          .       .          . |
     45. |       0         11   2014         0       .          .       .          . |
     46. |       0         11   2015         0       .          .       .          . |
         |---------------------------------------------------------------------------|
     47. |       0         12   2008         0       .          .       .          . |
     48. |       0         12   2009         0       .          .       .          . |
     49. |       0         12   2010         0       .          .       .          . |
     50. |       0         12   2011         0       .          .       .          . |
     51. |       0         12   2012         0       .          .       .          . |
     52. |       0         12   2013         0       .          .       .          . |
     53. |       0         12   2014         0       .          .       .          . |
     54. |       0         12   2015         0       .          .       .          . |
         |---------------------------------------------------------------------------|
     55. |       0         13   2010         0       .          .       .          . |
     56. |       0         13   2011         0       .          .       .          . |
     57. |       0         13   2012         0       .          .       .          . |
         |---------------------------------------------------------------------------|
     58. |       1         14   2004         1    2004          0       .          . |
     59. |       0         14   2005         0    2004          1       .          . |
     60. |       0         14   2006         0    2004          2       .          . |
     61. |       0         14   2007         0    2004          3       .          . |
     62. |       0         14   2008         0    2004          4       .          . |
     63. |       0         14   2009         0    2004          5       .          . |
     64. |       0         14   2010         0    2004          6       .          . |
     65. |       0         14   2011         0    2004          7       .          . |
     66. |       0         14   2012         0    2004          8       .          . |
     67. |       0         14   2013         0    2004          9       .          . |
     68. |       0         14   2015         0    2004         11       .          . |
         |---------------------------------------------------------------------------|
     69. |       0         15   2004         0    2006         -2    2011         -7 |
     70. |       0         15   2005         0    2006         -1    2011         -6 |
     71. |       1         15   2006         1    2006          0    2011         -5 |
     72. |       0         15   2007         0    2006          1    2011         -4 |
     73. |       0         15   2008         0    2006          2    2011         -3 |
     74. |       0         15   2010         0    2006          4    2011         -1 |
     75. |       1         15   2011         2    2006          5    2011          0 |
     76. |       0         15   2012         0    2006          6    2011          1 |
     77. |       0         15   2013         0    2006          7    2011          2 |
         |---------------------------------------------------------------------------|
     78. |       0         16   2004         0       .          .       .          . |
     79. |       0         16   2005         0       .          .       .          . |
     80. |       0         16   2006         0       .          .       .          . |
     81. |       0         16   2007         0       .          .       .          . |
     82. |       0         16   2008         0       .          .       .          . |
     83. |       0         16   2009         0       .          .       .          . |
     84. |       0         16   2010         0       .          .       .          . |
     85. |       0         16   2011         0       .          .       .          . |
     86. |       0         16   2012         0       .          .       .          . |
     87. |       0         16   2013         0       .          .       .          . |
     88. |       0         16   2014         0       .          .       .          . |
     89. |       0         16   2015         0       .          .       .          . |
         |---------------------------------------------------------------------------|
     90. |       0         17   2008         0       .          .       .          . |
     91. |       0         17   2009         0       .          .       .          . |
     92. |       0         17   2010         0       .          .       .          . |
         |---------------------------------------------------------------------------|
     93. |       0         18   2004         0    2011         -7    2012         -8 |
     94. |       0         18   2005         0    2011         -6    2012         -7 |
     95. |       0         18   2009         0    2011         -2    2012         -3 |
     96. |       0         18   2010         0    2011         -1    2012         -2 |
     97. |       1         18   2011         1    2011          0    2012         -1 |
     98. |       1         18   2012         2    2011          1    2012          0 |
     99. |       0         18   2013         0    2011          2    2012          1 |
    100. |       0         18   2014         0    2011          3    2012          2 |
         +---------------------------------------------------------------------------+
    Last edited by Nick Cox; 28 Oct 2019, 09:39.

    Comment


    • #3
      Wow, basically is a sort of exploiting the fact that 0 = False and 1 = True to create the variable recall. Thanks a lot Nick. I feel a little bit stupid after that but I guess is lack of experience.
      Thanks again!

      Comment


      • #4
        it's a favourite trick, but, really, don't feel stupid at not seeing it. Experience helps a lot. https://www.stata-journal.com/articl...article=dm0087 is a riff on the theme, and doesn't exhaust applications.

        Comment


        • #5
          Thanks a lot!

          To answer your previous question, the graphic I would like to build up consists of a pre-post estimation. Basically I have another variable which is growth rate of sales. Having rescaled all the Years, my attempt is to construct a two-way connected graph having on the x-axis the rescaled years.
          Specifically:

          First I have to regress the growth rate of sales on some controls. The predicted values of such an estimation will constitute my variable of interest. Let's call it av_t.
          The tricky part I was mentioning is: once that I have 7 rescaled years, how can I perform operations like:
          Code:
          collapse (mean) av_t, by(rescaled_year)
          in order to construct a graph that has the rescaled values on the x_axis?


          Comment


          • #6
            If there is only one recall there is only one variable to choose from. if there are two or more rescaled variables, sorry, but I don't understand what you want, so it's my turn to feel stupid.

            Comment


            • #7
              Sorry for having been unclear. So let's say the maximum number of recalls for a single product is 7. According to the code above I will end up, correctly, with 7 rescale variables: rescale1, rescale2,...,rescale7. Something like this:

              Code:
              * Example generated by -dataex-. To install: ssc install dataex
              clear
              input float(rescaled1 rescaled2 rescaled3 rescaled4 rescaled5 rescaled6 rescaled7 idproduct Year av_t)
              -11  .  . . . . .   8 2004         .
                0  .  . . . . .   8 2015         .
               -5  .  . . . . .  22 2004         .
               -4  .  . . . . .  22 2005         .
               -3  .  . . . . .  22 2006         .
               -2  .  . . . . .  22 2007  2.610031
               -1  .  . . . . .  22 2008         .
                0  .  . . . . .  22 2009         .
                1  .  . . . . .  22 2010         .
                2  .  . . . . .  22 2011         .
                0 -1 -9 . . . .  41 2004         .
                1  0 -8 . . . .  41 2005         .
                2  1 -7 . . . .  41 2006         .
                3  2 -6 . . . .  41 2007  3.367997
                4  3 -5 . . . .  41 2008 2.9179316
                5  4 -4 . . . .  41 2009  3.071436
                6  5 -3 . . . .  41 2010  3.307787
                7  6 -2 . . . .  41 2011  2.887359
                8  7 -1 . . . .  41 2012 2.2057533
                9  8  0 . . . .  41 2013  3.188269
               10  9  1 . . . .  41 2014  3.572203
               11 10  2 . . . .  41 2015         .
               -4  .  . . . . .  44 2005         .
               -3  .  . . . . .  44 2006         .
               -2  .  . . . . .  44 2007         .
               -1  .  . . . . .  44 2008 -.2077017
                0  .  . . . . .  44 2009  .9114361
                1  .  . . . . .  44 2010 .19138622
                2  .  . . . . .  44 2011         .
                3  .  . . . . .  44 2012 -.6401815
                4  .  . . . . .  44 2013  2.249567
                5  .  . . . . .  44 2014 2.2605314
                6  .  . . . . .  44 2015  .7698421
               -5  .  . . . . .  62 2004         .
               -4  .  . . . . .  62 2005         .
               -3  .  . . . . .  62 2006         .
               -2  .  . . . . .  62 2007         .
               -1  .  . . . . .  62 2008         .
                0  .  . . . . .  62 2009         .
                1  .  . . . . .  62 2010         .
                2  .  . . . . .  62 2011         .
                3  .  . . . . .  62 2012         .
                4  .  . . . . .  62 2013         .
                5  .  . . . . .  62 2014         .
                6  .  . . . . .  62 2015 -.1879759
               -5  .  . . . . .  99 2004         .
               -4  .  . . . . .  99 2005         .
               -3  .  . . . . .  99 2006         .
               -2  .  . . . . .  99 2007         .
               -1  .  . . . . .  99 2008         .
                0  .  . . . . .  99 2009         .
                1  .  . . . . .  99 2010         .
               -7  .  . . . . . 107 2004         .
               -6  .  . . . . . 107 2005         .
               -5  .  . . . . . 107 2006         .
               -4  .  . . . . . 107 2007         .
               -3  .  . . . . . 107 2008         .
               -2  .  . . . . . 107 2009  .9470272
               -1  .  . . . . . 107 2010         .
                0  .  . . . . . 107 2011         .
                1  .  . . . . . 107 2012         .
                2  .  . . . . . 107 2013         .
                3  .  . . . . . 107 2014         .
                4  .  . . . . . 107 2015 -3.317956
               -5 -6  . . . . . 108 2004         .
               -4 -5  . . . . . 108 2005         .
               -3 -4  . . . . . 108 2006         .
               -2 -3  . . . . . 108 2007         .
               -1 -2  . . . . . 108 2008         .
                0 -1  . . . . . 108 2009         .
                1  0  . . . . . 108 2010         .
                2  1  . . . . . 108 2011         .
                3  2  . . . . . 108 2012         .
                4  3  . . . . . 108 2013         .
                5  4  . . . . . 108 2014         .
                6  5  . . . . . 108 2015         .
               -6 -7  . . . . . 114 2004         .
               -5 -6  . . . . . 114 2005         .
               -4 -5  . . . . . 114 2006         .
               -3 -4  . . . . . 114 2007 2.4716835
               -2 -3  . . . . . 114 2008  3.514191
               -1 -2  . . . . . 114 2009  3.426614
                0 -1  . . . . . 114 2010  3.675565
                1  0  . . . . . 114 2011  3.166685
                2  1  . . . . . 114 2012         .
                3  2  . . . . . 114 2013         .
                4  3  . . . . . 114 2014         .
                5  4  . . . . . 114 2015         .
              -11  .  . . . . . 130 2004         .
              -10  .  . . . . . 130 2005         .
               -9  .  . . . . . 130 2006         .
               -8  .  . . . . . 130 2007  .6483145
               -7  .  . . . . . 130 2008 -.6747503
               -6  .  . . . . . 130 2009  .6400528
               -5  .  . . . . . 130 2010         .
               -4  .  . . . . . 130 2011 -.4608803
               -3  .  . . . . . 130 2012  -.381546
               -2  .  . . . . . 130 2013         .
               -1  .  . . . . . 130 2014         .
                0  .  . . . . . 130 2015         .
              end

              What I would like to do is to collapse everything by a unique rescaled variable. My aim is to make a plot like the one in attachments eventually. So x-axis should be a single "rescale" variable and av_t (y axis) should be the collapse (mean) of av_t in the sample above by the unique rescale variable.

              Thank you a lot Nick!



              Attached Files

              Comment


              • #8
                That's a restatement that doesn't add precision -- for me.

                Your av_t valuescorrespond to one or more rescaled time variables. That's the complete opposite of a collapse problem, in which you have one or more values that you want to combine according to their distinct values on other variables.

                Comment


                • #9
                  av_t is just the prediction error from a regression that I previously made. I would like to collapse it by(rescaled_year). So if I had a single rescaled year (let's say rescale1) this would have been done simply by:

                  Code:
                  collapse (mean) av_t, by(rescale1)
                  but since I have more "rescale" variables I don't know how to perform the collapse properly. In other words the story is: I would like to make a pre (recall) - post(recall) connected graphic where 0 is the year of the recall. To do that I have to perform the collapse by rescaled year. However, before doing the collapse I wanted to rescale the years of the nth recalls independently: if a product has more (max is 7) recalls I would like to rescale the year before and after the first recall differently from the years before and after the second (which will be rescaled independently in the rescale2 variable), the years of the third (stored in rescale3) and so on. I have done this through the code suggested above (see for instance idprod 15 with 2 rescale variables).

                  So starting for instance from the
                  Code:
                   list, sepby(idproduct)
                  of #2 with variable av_t added, I would like to collapse (mean) av_t, by(rescale1) for all products except for 15 and 18 and collapse (mean) av_t, by(rescale2) for idpr 15 and idpr 18, ending up with a unique database looking like this (numbers are randomly taken):

                  Code:
                  * Example generated by -dataex-. To install: ssc install dataex
                  clear
                  input float(rescaled1 mean_av_t1)
                  -11          .
                  -10          .
                   -9          .
                   -8 -1.8001467
                   -7  -.5572022
                   -6  -.7374278
                   -5 -.09903926
                   -4   .0824823
                   -3  .10442357
                   -2  .14755006
                   -1 -.05196958
                    0   .0216428
                    1  .06762971
                    2   -.056027
                    3 -.15613605
                    4 -.28879765
                    5 -.06597874
                    6  .15026453
                    7  -.3318932
                    8 -.11107377
                    9 -.08885004
                   10   .3068888
                   11   .5256295
                  end
                  where mean_avt1 in -7 for instance is the mean of all the values of av_t that are in -7: i.e. sum of the value sof av_t in -7 for rescale1 and for rescale2 divided the total number of values in -7. (to be clearer, the values of av_t exploited for computing the mean av_t in -7 are the values of idpr 15 and 18 corresponding to -7 in rescale 2)
                  Last edited by Federico Nutarelli; 28 Oct 2019, 12:50.

                  Comment


                  • #10
                    Sorry, but I have no more time to spend on this for some while. Someone else may be able to trace this through.

                    Comment


                    • #11
                      Ok. No problem. Thank you a lot. I will try to rephrase it more simply for eventual other members: say I have 3 recalls in 2008, 2013 and 2012 and av_t appears in 2011. So 2011 is -2 with respect to 2013, -1 with respect to 2012 and +3 with respect too 2008. therefore, I would like, in the final collapse, that the value of av_t in 2011 enters either in the construction of the mean for -2 and -1 and +3.

                      Thanks a lot!

                      Comment


                      • #12
                        I have looked at this again, and am still struggling with what you want. But if you want to average observation-wise across the rescaled time variables, that’s not a collapse at all, but a problem for egen‘s rowmean() function.

                        Comment


                        • #13
                          I have looked at this again, and am still struggling with what you want
                          I am trying to collapse (mean) av_t and specifically I would like to perform a mean by rescaled year, thus ending up with 22 values (a mean for rescaled year -11, another for -10...finally a mean for rescaled year 11). The problem is the "by" option basically. Since I have rescaled the years, to a single year can correspond several rescaled years (e.g. 2011 is rescaled both as 4 and as -1 for idpr 15 in #2). Hence when performing the mean, I would like the collapse to include an av_t in the numerator of the mean of each rescaled year corresponding to it. So for instance, for idpr 15 in issue 2 if av_t in 2011 = 3.4, since 2011 is rescaled both as 4 and -1, 3.4 should be in the numerator (and also counted in the denominator) of both the mean in -1 and in the rescaled year 4.

                          sorry for being unclear. Hope this helps
                          Last edited by Federico Nutarelli; 29 Oct 2019, 09:17.

                          Comment


                          • #14
                            Maybe it's clearer if I open a new issue on this

                            Comment

                            Working...
                            X