perhaps it's easiest if you use a calendar for those years, and work out
exactly which month that week falls into. If a week falls 3 days into Jan
and 4 days into Feb, say, then you can group it into February. In this way
some months will be based on 5 weeks and others 4, but i guess that's the
best you can do.
Tim
"Thomas Speidel" <[email protected]>
Sent by: [email protected]
24/10/2005 14:50
Please respond to
[email protected]
To
<[email protected]>
cc
Subject
st: From Weekly Data to Monthly Data
I have a dataset containing yearly and weekly data starting from week 1
1999 (i.e. week of Jan 1, 1999) to week 53. This is repeated from year
1999 to year 2004. I am trying to convert this data to monthly data,
containing the total no. of units for each month of each year. The
problem is all months (except some Februarys) contain a little more than
4 weeks, and so computing the total for each month is not
straight-forward. I guess any solution will have to include some error,
which is fine.
Any ideas? Thanks for any suggestions.
Thomas
The following is a sample of my data:
year weeks units
1999 1 600
1999 2 597
1999 3 588
1999 4 562
1999 5 558
1999 6 544
1999 7 531
1999 8 533
1999 9 541
1999 10 534
1999 11 526
1999 12 502
1999 13 503
1999 14 498
1999 15 499
1999 16 488
1999 17 494
1999 18 505
1999 19 507
1999 20 518
1999 21 534
1999 22 555
1999 23 547
1999 24 566
1999 25 563
1999 26 580
1999 27 570
1999 28 583
1999 29 605
1999 30 602
1999 31 616
1999 32 627
1999 33 645
1999 34 668
1999 35 671
1999 36 690
1999 37 703
1999 38 720
1999 39 730
1999 40 741
1999 41 721
1999 42 750
1999 43 761
1999 44 763
1999 45 774
1999 46 797
1999 47 795
1999 48 796
1999 49 813
1999 50 815
1999 51 797
1999 52 771
1999 53 .
2000 1 786
...
2004 53 .
This e-mail and any attachments may contain confidential and
privileged information. If you are not the intended recipient,
please notify the sender immediately by return e-mail, delete this
e-mail and destroy any copies. Any dissemination or use of this
information by a person other than the intended recipient is
unauthorized and may be illegal.
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/