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
Calculating conditional probabilities on stataHi everyone, I am analyzing a dataset of a specific treatment and the effect of such treatment on s…
Monte Carlo--How to see B variabilityHi everyone, I created a monte carlo simulation. I am trying to see attentuation bias which I see, …
How to compare predicted margins across two separate models?Greetings, I'm running Stata 15 on OSX and working with panel data. My goal is to test and compare …
Creating a new variable based on information in another observationI want to create a new variable based on information in other observations. My data looks like this:…
cmp - unable to allocate matrixHi, I am using the cmp command to simultaneously estimate three probit equation such as: DV1 = b0 …
Subscribe to:
Post Comments (Atom)
0 Response to Trouble with repeated dates and panel creation
Post a Comment