Hi all,
I have the following issue, I want to create a panel out of data that contains a code (the product), a date and a price. The problem is, the way data was collected, instead of referring to a month (is supposed to be monthly), the dates refer to the actual date prices were input into the dataset. An example:
Code Price Date
77348 0.6439 03/11/2015
77348 0.6588 01/12/2015
77348 0.672 30/12/2015
See, the issue is that, for the same code, I have two entries in the same month, which doesn't allow to create the panel. The dates should instead refer to the end of the month, so that, that date 01/12/2015 should refer to November, 03/11/2015 should refer to October and so forth. That is, dates that are ate at the beginning of the month refer to the last month, dates that are at the end of the month reflect the prices at that same month.
I just don't know a way to correct this and create another time variable in Stata, since the dates are so random.
Any help is appreciated.
Related Posts with Trouble with repeated dates and panel creation
Lca with ordinal manifest variables -- equivalent of constraining constants?I am very new to doing LCA. I'm using Stata 15, in case that matters. I am trying to do a latent cl…
calculate annualized std.dev of weekly stock returns (volatility)Hi Statalisters, I need some guidance about the calculation of volatility. I have data of weekly cl…
Looking for online courseI must learn basic data analysis, time series analysis, multilevel regression and the emphasis on pa…
Meta-analysis commands; Metainf and metatrim vil not runHi! I'm a medical student and brand new to Stata. To start with I was told I need the following met…
calculate annualized std.dev of weekly stock returns (volatility)Hi Statalisters, I need some guidance about the calculation of volatility. I have data of weekly cl…
Subscribe to:
Post Comments (Atom)
0 Response to Trouble with repeated dates and panel creation
Post a Comment