I have two datasets, lets call them A and B.
A is the result of a Monte Carlo simulation and has 100,000 rows - 10,000 draws of a random variable (for this example) for each of 100 IDs/subjects/whatever.
So it looks like:
Iteration ID Draw
1 1 0.073
1 2 0.987
1 3 0.487
...
2 1 0.278
2 2 0.142
etc.
I also have a data set, with these same ID numbers, and a *fixed* set of variables. I'd like to merge them such that each of the 10,000 iterations of the ID sequence gets paired with the fixed variable data set.
I think this is a fairly simple thing to do, but due to some other things running in the background, I can only manage to batch submit SAS jobs, so my usual code-tinkering techniques aren't available to me.
Will a standard Merge and By work?
For example:
data work.desired;
merge work.a work.b;
by ID;
run;
?