Hi there,
I'll be working into the night (it's around 23.41 already) with this, so any help would be much appreciated and save some of my sleep!
My issue is the following: How can I draw a value at random from a defined likelihood distribution? I have data on the daily purchases of a product around the year. There might be several (up to a tens or hundreds) purchases per day, and some days might not have purchases at all.
What I want to do, is for each client, draw and create a new variable, a so called random, "shadow" purchase date. This date should be drawn out of a distribution that matches the actual ones, but this shadow date can any of the dates around the year when at least 1 purchase occured. So if february 14th has 100 times more purchases than february 13th, I would like 14th to have 100 times the likelihood of being drawn.
The only method I could come up with is to create a range where I enter each possible date as many times as actual purchases occured (so e.g. 14.02.2012 would have a 100 cells), and then use randbetween. But given the data, this is far too laborious to be feasible.
Any other methods for doing this? Seems like such an elementary thing to do, but my skills or qoogling did not reveal a method.
Help is much appreciated!
Bookmarks