Skip to main content
26 events
when toggle format what by license comment
Aug 13, 2019 at 18:58 answer added abalter timeline score: 1
Jul 4, 2017 at 4:45 answer added Tyelcie timeline score: 3
Apr 13, 2017 at 12:44 history edited CommunityBot
replaced http://stats.stackexchange.com/ with https://stats.stackexchange.com/
Feb 8, 2017 at 20:12 answer added Ian Hincks timeline score: 2
Sep 20, 2016 at 15:33 answer added Xi'an timeline score: 2
Mar 17, 2016 at 12:41 history edited Silverfish
add dataset tag
Jan 30, 2016 at 17:24 comment added Ladislas Nalborczyk Your answer is at the bottom of this page : stackoverflow.com/questions/18919091/…
Sep 30, 2013 at 13:31 history edited gung - Reinstate Monica
added tag
Sep 30, 2013 at 3:01 answer added gung - Reinstate Monica timeline score: 28
Jun 12, 2012 at 15:33 comment added whuber @Macro This is a good point, but perhaps the best reply is, "of course they won't have the same distribution"! The distribution you want is the distribution conditional on the constraints. In general that will not be from the same family as the parent distribution. E.g., each element of a sample of size 4 with mean 0 and SD 1 drawn from a normal distribution is going to have nearly a uniform probability on [-1.5, 1.5], because the conditions place upper and lower bounds on the possible values.
Jun 12, 2012 at 15:04 comment added Macro @whuber, as cardinal alludes to in a comment to my answer (which mentions this "trick") and a comment to another answer - this method, in general, will not keep the variables within the same distributional family, since you're dividing by the sample standard deviation.
Jun 12, 2012 at 14:48 comment added whuber BTW, the last question is trivial for location-scale distribution families. E.g., x<-rnorm(72);x<-5.2*(x-mean(x))/sd(x)+102 does the trick.
Jun 12, 2012 at 14:10 answer added Macro timeline score: 32
Jun 12, 2012 at 14:07 comment added whuber Because this question appears to be collecting replies that miss the mark (IMHO), I would like to point out that conceptually the answer is straightforward: equality constraints are treated like marginal distributions and inequality constraints are multivariate analogs of truncation. Truncation is relatively easy to handle (often with rejection sampling); the harder problem amounts to finding a way to sample these marginal distributions. This means either sampling marginals given the distribution and the constraint, or integrating to find the marginal distribution and sampling from it.
Jun 12, 2012 at 13:53 answer added jthetzel timeline score: 11
Jun 12, 2012 at 13:34 history tweeted twitter.com/#!/StackStats/status/212538305525452801
Jun 12, 2012 at 12:23 comment added Jeromy Anglim @GavinSimpson My motivation comes from my previous question about thinking about performing meta-analysis on a mixture of real individual-level-data, and simulated individual-level-data that matches real-aggregated-data. Irrespective of whether such a meta-analytic approach is a good idea, I was curious about how the simulated data could be generated.
Jun 12, 2012 at 12:08 comment added Gavin Simpson @JeromyAnglim Me to (interested that is). Was just wondering if more than just curiosity here.
Jun 12, 2012 at 11:49 comment added Jeromy Anglim @cardinal I suppose ideally in practical circumstances the simulated data would also be constrained to approximate the properties of a given distribution.
Jun 12, 2012 at 11:42 comment added cardinal Without putting some specification on the desired distribution it's usually easy to generate data to satisfy simple constraints. For example, for the mean and standard deviation and an even sample size (to make things simple for a moment) the data need only take on two distinct values! I'd guess that is probably not satisfactory for what you're really interested in, though.
Jun 12, 2012 at 11:28 comment added Jeromy Anglim @Procrastinator Good point. Yes I understand that you could set constraints that are impossible to satisfy. However, if the constraints were derived from summary statistics from an existing dataset, that would generally not be a problem.
Jun 12, 2012 at 11:27 comment added Jeromy Anglim @Gavin In any respect, I am also just curious about how such data could be simulated in a relatively efficient and meaningful way.
Jun 12, 2012 at 11:24 comment added user10525 Note also that some constraints cannot be exactly satisfied because they have probability $0$ under continuous models. For example if one of the conditions is $\max (sample)=37$. In those cases you would need to fix a tolerance. This reminds me a bit of ABC.
Jun 12, 2012 at 11:21 comment added Gavin Simpson Why do you want them to be exactly like the published results? Aren't these estimates of the population mean and standard deviation given their sample of data. Given uncertainty in those estimates, who is to say that the sample you show above is not consistent with their observations?
Jun 12, 2012 at 11:09 answer added Sean timeline score: 10
Jun 12, 2012 at 11:03 history asked Jeromy Anglim CC BY-SA 3.0