Dear Statalist Forum Users,
I need to generate a new variable and it should be an average of Australasia 1-3 by years, respectively. I couldn't do it with mean function. Could you please guide to solve this puzzle?
I am looking forward to hearing from you.
Kind regards,
Firangiz Aghayeva
I need to generate a new variable and it should be an average of Australasia 1-3 by years, respectively. I couldn't do it with mean function. Could you please guide to solve this puzzle?
Code:
* Example generated by -dataex-. For more info, type help dataex clear input int year double(Australasia1 Australasia2 Australasia3) 2004 .031713725 .0188608 .061213625 2005 .07910982500000001 .07479179999999999 .11829147500000001 2006 .068764825 .09010705 .021152375 2007 .01910585 .070793225 .020817725 2008 .2299376 .156618025 0 2009 .07698375 .028891725 0 2010 .17976684999999998 .141374475 .21233075 2011 .24364802500000002 .11400450000000001 .060823025 2012 .132407025 .1499245 .02909345 2013 .034845475 .08928675 .0304878 2014 .1185409 .0925432 .0699606 2015 .1742644 .13983335 .1468419 2016 .2490718 .2701679 .198164525 2017 .307399925 .35079265 .23733085 2018 .172188025 .37054982500000005 .05440995 2019 .21579435000000002 .30530257499999997 .12087587500000001 2020 .31439150000000005 .12100587500000001 .112451975 2021 .254914725 .121079775 .2600728 2022 .193811375 .20712987499999996 .288426825 2023 .074134325 .18276125000000001 .110590775 2024 0 .06948900000000001 0 end
I am looking forward to hearing from you.
Kind regards,
Firangiz Aghayeva
Comment