moonman239
- 276
- 0
I have a dataset in R. What I want to do is simulate a variable that holds the same distribution. How do I do this?
The discussion revolves around simulating a variable in R that maintains the same distribution as a given dataset. Participants explore various methods, including Monte Carlo simulations and bootstrapping, while addressing the use of random number generators and specific functions in R.
Participants express differing views on the best approach to simulate the distribution, with some favoring Monte Carlo methods and others advocating for bootstrapping. The discussion remains unresolved regarding the most effective method.
Participants reference the need for specific functions in R and the limitations of simulations matching the original distribution only on average. There is also mention of various statistical distributions and methods without consensus on the best approach.
Readers interested in statistical simulations, R programming, and methods for data analysis may find this discussion relevant.
mathman said:Are you interested in a computer simulation?
mathman said:Look up Monte Carlo method.
moonman239 said:I have a dataset in R. What I want to do is simulate a variable that holds the same distribution. How do I do this?
SW VandeCarr said:You need a random number generator where you can specify the distribution parameters for N simulations.
moonman239 said:I know. Is there a function to do that in R? I know you can simulate variables from widely-known distributions (normal, Poisson, uniform, chi-square, etc.)