Year State Variable 1 Variable 2 Variable 3 2014 1 0.2 . 0.6 2015 1 . . . 2016 1 0.5 0.6 . 2017 1 0.5 0.6 0.3 2018 1 0.6 . . 2019 1 0.3 . 0.7 2014 2 2 2015 2 2016 2 2017 2 2018 2 2019 2 2014 3 2015 3 2016 3 2017 3 2018 3 2019 3 This is essentially the format of my dataset. For variable 1, I want the 2015 value replaced with an average of the 2014 and 2016 values. For variable 2, I want 2014 and 2015 values replaced with 2016 value and 2018 and 2019 values replaced with 2017 value For variable 3, I want 2015 replaced with 2014, 2016 replaced with 2017, and 2018 replaced with an average of 2017 and 2019
... View more