In some meta-analysis studies, researchers generated random data with the same tau square (T^2). How can I generate random data for meta analysis with tau-square=0.1 or 0.2, etc. ? Are there any r packages for generating random data?
There are some example datasets in R. Some are random and others are real data. The random one is generated through binding of random numbers. Generating (quasi-)random numbers are possible, but generating random data makes little sense, since R cannot possibly understand what kind of data you want to generate.
Assuming this is what you want (generate random numbers and bundle them in groups as if they are samples for a study), to achieve various tau^2, you would need to do this in two steps. First, you can generate random results (instead data) with variance tau^2. Second, you can generate some deviation by adding your result with some random numbers (in OLS, these obviously need to be normally distributed).
But, I believe this is no longer qualified to be called "meta-analysis", isn't it?
TAU SQUARED is the variance of the effect size of the meta data. You do not general this value randomly, you obtain it as an empirical result from calculating the variance of the effect size of all studies inside the meta data set.
TEST FOR RANDOMNESS among tau squared of different meta analysis is possible, but that is different issue than what is asked. For example, if your review the literature from 10 meta articles on the same topic, each reported 10 different tau squared values, you can test whether these results are random.
SIMULATION FOR RANDOM NUMBERS of tau squared where you have several studies showing different tau squared, i.e. 0.10 , 0.3 and 0.50. In this case, use 0.10 as min and 0.50 as max, then general Monte Carlo simulation to see how many repetition would it take to achieve a specific % confidence in the distribution. With that N Monte Carlo, now generate random values between min and max. By excel, just simple type: =rand()*(max-min) then drag down the cell equal to Nth repetition. You will have random values between min and max. For what purpose would you do this? To show how many repetition or what possible value to have in order to achieve normality?