Friday, November 04, 2011


So here's what I've been thinking about for the last several days: constrained optimization in Matlab. I'm trying to find the optimal study sample size by maximizing the sum of several power calculations subject to a budget constraint. I haven't used Matlab in 7 years, but I've figured out the basics. The syntax isn't a problem, but the finer parts of the fmincon function are troubling. I get errors when the power is basically 1 (the power formula involves the Normal CDF). I assume that's because corner behavior is messed up. Also, what I really want to do is constrain the solutions to the set of integers, but I don't think the numerical maximization methods can handle that--I'd have to do a grid search, but if I just plain search over all the possibilities of 7 different treatment arm sizes, I think I have around 2 x 10^12 comparisons to make, which I assume will take the processor a very long time.

I'm riding my motorcycle to Lake Baringo tomorrow.

No comments:

Post a Comment