Hi all,
I have a time serie dataset, yearly between 1993-2010 for 7 districts. Here is an extract for one of the seven districts:
year dist sumyrwrain meanyrwrain stdyrwrain sumlr meanlr shock
1993 Kadapa 86975.36 517.7104 833.2421 1449708 80539.31 0
1994 Kadapa 103504.3 616.0969 932.221 1449708 80539.31 0
1995 Kadapa 73511.12 437.5662 746.5975 1449708 80539.31 1
1996 Kadapa 104767.3 623.6147 1000.061 1449708 80539.31 0
1997 Kadapa 77549.91 461.6066 803.1562 1449708 80539.31 1
1998 Kadapa 82867.43 493.2585 869.8391 1449708 80539.31 0
1999 Kadapa 65157.68 387.8433 669.4527 1449708 80539.31 1
2000 Kadapa 78883.34 469.5437 790.1378 1449708 80539.31 1
2001 Kadapa 81103.82 482.7609 864.0387 1449708 80539.31 0
2002 Kadapa 55331.86 329.3563 597.1664 1449708 80539.31 1
2003 Kadapa 41383.3 246.3291 474.8039 1449708 80539.31 1
2004 Kadapa 75030.71 446.6114 816.4559 1449708 80539.31 1
2005 Kadapa 110613.6 658.4145 1119.453 1449708 80539.31 0
2006 Kadapa 69959.75 416.4271 680.7109 1449708 80539.31 1
2007 Kadapa 87482.21 520.7274 850.8123 1449708 80539.31 0
2008 Kadapa 75579.64 449.8788 809.5716 1449708 80539.31 1
2009 Kadapa 75579.64 449.8788 809.5716 1449708 80539.31 1
2010 Kadapa 104426.7 621.5875 951.5563 1449708 80539.31 0
I have two questions:
1. The above dataset is created by collapse command to extract total sum, mean and std for each district, yearly.
However, as you can see, the meanyrwrain and stdyrwrain is not correct. Why so?
2. I would like to create a dummy for each year between 2002-2006 to indicate whether ex: in year 2002, the district Kadapa experienced a shock or not.
What is the most efficient command ?
Thanks !!
I have a time serie dataset, yearly between 1993-2010 for 7 districts. Here is an extract for one of the seven districts:
year dist sumyrwrain meanyrwrain stdyrwrain sumlr meanlr shock
1993 Kadapa 86975.36 517.7104 833.2421 1449708 80539.31 0
1994 Kadapa 103504.3 616.0969 932.221 1449708 80539.31 0
1995 Kadapa 73511.12 437.5662 746.5975 1449708 80539.31 1
1996 Kadapa 104767.3 623.6147 1000.061 1449708 80539.31 0
1997 Kadapa 77549.91 461.6066 803.1562 1449708 80539.31 1
1998 Kadapa 82867.43 493.2585 869.8391 1449708 80539.31 0
1999 Kadapa 65157.68 387.8433 669.4527 1449708 80539.31 1
2000 Kadapa 78883.34 469.5437 790.1378 1449708 80539.31 1
2001 Kadapa 81103.82 482.7609 864.0387 1449708 80539.31 0
2002 Kadapa 55331.86 329.3563 597.1664 1449708 80539.31 1
2003 Kadapa 41383.3 246.3291 474.8039 1449708 80539.31 1
2004 Kadapa 75030.71 446.6114 816.4559 1449708 80539.31 1
2005 Kadapa 110613.6 658.4145 1119.453 1449708 80539.31 0
2006 Kadapa 69959.75 416.4271 680.7109 1449708 80539.31 1
2007 Kadapa 87482.21 520.7274 850.8123 1449708 80539.31 0
2008 Kadapa 75579.64 449.8788 809.5716 1449708 80539.31 1
2009 Kadapa 75579.64 449.8788 809.5716 1449708 80539.31 1
2010 Kadapa 104426.7 621.5875 951.5563 1449708 80539.31 0
I have two questions:
1. The above dataset is created by collapse command to extract total sum, mean and std for each district, yearly.
However, as you can see, the meanyrwrain and stdyrwrain is not correct. Why so?
2. I would like to create a dummy for each year between 2002-2006 to indicate whether ex: in year 2002, the district Kadapa experienced a shock or not.
What is the most efficient command ?
Thanks !!
Comment