Hello Gretl Community,
I have a database with daily prices which is in a rather unusual format and I want to know if it is possibly to create a panel data with it using Gretl scripts. The database is extracted from a dbf archive, and its has 6 variables:
- The (number of) supermarket from which the price is reported
- The (number of) the product which price is being reported
- The year of the price
- The month of the price
- The price reported itself
- The first day of the month the price is reported
- The last day of the month the price is reported
I have nearly one million rows with data, but in order to do some regressions -and use it as a panel- I will need to transform it in a suitable way.
I suppose that the best way that Gretl can handle it is to create a specific column for each product, and then stack all the supermarkets on a daily basis. In this way, I will have each column representing a product, the first 700 rows being a price for each product for supermarket 1, the next 700 rows being a price for each product for supermarket 2, etc.
But in order to do it, I will need first to create the daily prices series, which is now "compacted" in the datafile. I am attaching a random 10 elements from the database in order to get a better picture of the situation. In the first sheet I submit the actual data format, on the second one which I think should be the (best?) result.
I will first ask if this kind of transformation is possible in Gretl. I am aware that running some scripts on other programs could do the trick, but I think that it could be possible in Gretl to do it. But I am also think that it could be rather complex to do it, and I am a new one on this issues.
Thank in advance.
Best regards,
Leandro Zipitrķa