data frequency conversion problem
Show older comments
Dear all,
Is there any function for converting data that are available every 2 months to monthly data
thank you
EDIT [01 Aug 2012, 19:33 BST - OK] Added example input from comment
Here is an example of a panel data set with 3 individuals
A = {
1 '1-2 2004' 0.256 0.385
1 '3-4 2004' 0.268 3.0394
1 '5-6 2004' 0.0504 0.6475
1 '7-8 2004' 14.0985 148.2583
1 '9-10 2004' 0.1128 1.1506
1 '11-12 2004' NaN 148.2583
1 '1-2 2005' NaN 148.2583
1 '3-4 2005' 2.5852 34.0146
1 '5-6 2005' 0.322 3.2846
1 '7-8 2005' 14.0985 148.2583
1 '9-10 2005' 2.5852 NaN
1 '11-12 2005' 0.2938 2.854
2 '1-2 2004' 0.256 0.385
2 '3-4 2004' 0.268 3.0394
2 '5-6 2004' 0.0504 0.6475
2 '7-8 2004' 14.0985 148.2583
2 '9-10 2004' 0.1128 1.1506
2 '11-12 2004' NaN 148.2583
2 '1-2 2005' NaN 148.2583
2 '3-4 2005' 2.5852 34.0146
2 '5-6 2005' 0.322 3.2846
2 '7-8 2005' 14.0985 148.2583
2 '9-10 2005' 2.5852 NaN
2 '11-12 2005' 0.2938 2.854
3 '1-2 2004' 0.256 0.385
3 '3-4 2004' 0.268 3.0394
3 '5-6 2004' 0.0504 0.6475
3 '7-8 2004' 14.0985 148.2583
3 '9-10 2004' 0.1128 1.1506
3 '11-12 2004' NaN 148.2583
3 '1-2 2005' NaN 148.2583
3 '3-4 2005' 2.5852 34.0146
3 '5-6 2005' 0.322 3.2846
3 '7-8 2005' 14.0985 148.2583
3 '9-10 2005' 2.5852 NaN
3 '11-12 2005' 0.2938 2.854}
Note that I have 30000 invividuals (instead of 3) and 20 numerical columns instead of the last 2 that I display above. The interpolation should be done for each i=1,2,3 separately.
10 Comments
salva
on 31 Jul 2012
Oleg Komarov
on 31 Jul 2012
Why do you wanna use elaborated methods? Have you tried interpolation? Also, sometimes no data no party. It means that you don't have monthly data, you can't do research in that way.
Oleg Komarov
on 1 Aug 2012
Please, post a brief example here so that everyone can contribute.
salva
on 1 Aug 2012
salva
on 1 Aug 2012
John Petersen
on 1 Aug 2012
If you're going from bimonthly data to monthly data, why not just average the bimonthly data?
Oleg Komarov
on 1 Aug 2012
Are the data stocks or flows? Because in the former case you can interpolate while in the latter case you have to split.
salva
on 1 Aug 2012
salva
on 2 Aug 2012
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!