jeudi 10 juin 2021

Simulate data by rounding them to multiples of 5, 10, 25 in OX

I recently simulated my data by using the method suggested here. I could look for the possible (true) values, when considering a rule of rounding. I have 5 rules:

  1. Precise numbers rounded at 1%-points;
  2. Rounding to a multiple of 5%-points;
  3. Rounding to a multiple of 10%-points;
  4. Rounding to a multiple of 25%-points;
  5. Rounding to a multiple of 50%-points.

So If g_mY = 25, it could be the result of rounding of a number in the [12.5, 37.5) range, rounding at the nearest multiple of 25 (range = g_mY-12.5, g_mY+12.5). It could also come from the [22.5, 27.5) range if it's rounded to the nearest multiple of 5, or even from the [24.5,25.5) range should we have a precise number..

So now, I want to re-simulate my data by being more agnostic than in the previous topic: generate random numbers Yt (latent variable) in the [0, 100] range, then use the rounding rules to simulate g_mY.

How would you do this? Where would you start?

Many thanks.

Aucun commentaire:

Enregistrer un commentaire