Dear Stata Users,
I am simulating all possible combinations of 4 arguments that sum up to 100. The objective is to create all possible weighted sums of 4 variables. i.e.
aX + bY + cZ +dW
where
a+b+c+d=100
a,b,c,d are whole numbers and cannot be larger than 100 or negative (so no possibility of subtraction). They can be in increments of 5 rather than one by one. This isn't essential, just reduces the number of sets of {a,b,c,d}.
the next step is to get each combination in 4 locals and multiply by each of X Y Z and W , store the results and repeat.
Any inspiration is gratefully welcome!
Thanks!
I am simulating all possible combinations of 4 arguments that sum up to 100. The objective is to create all possible weighted sums of 4 variables. i.e.
aX + bY + cZ +dW
where
a+b+c+d=100
a,b,c,d are whole numbers and cannot be larger than 100 or negative (so no possibility of subtraction). They can be in increments of 5 rather than one by one. This isn't essential, just reduces the number of sets of {a,b,c,d}.
the next step is to get each combination in 4 locals and multiply by each of X Y Z and W , store the results and repeat.
Any inspiration is gratefully welcome!
Thanks!
Comment