Am 13.12.2016 um 17:30 schrieb George Matysiak:
I have a related question. I have undated data in two series x and
y,
with 50 observations in each. There is no overlap in their respective
observation numbers i.e. x runs from 1-50 and y from 51-100. I would
like to draw a random sample from each, say 20, and combine the two
random samples into a series consisting of the 40 observations. I've
played around with this but can't quite seem to get there. Any
suggestions would be very welcome. Thanks.
George, first it would be helpful if you could quote a few lines of the
original post to which you're referring when you write things like
"related". (Also, your posts somehow break the mailing thread structure,
they aren't recognized as replies to something earlier. Which makes it
even harder to understand to what you're referring. That's probably the
fault of your mail program; which one are you using?)
Anyway, you could use the resample() function combined with a bunch of
sample (smpl) restrictions to get the desired sample lengths. This is
also in the menus I think under the "Sample" main menu (draw with
replacement).
Perhaps more advanced and for scripting use could be the use of
mrandgen(i,< ...>) to produce random integers to be used as index
numbers for drawing from the series.
hth,
sven