Contributor
Posts: 21

# Parameter Constraint Matrix

I am working with a transform both sides regression model via the two parameter Box-Cox power transformation which addresses negative values of x. That is,

fx = [(x + lambda2)^lambda1 - 1]/lambda1

I would like to use maximum likelihood to determine both parameters. The problem is the nonlinear optimization algorithm will only run (for obvious reasons) for large enough values of lambda2. Also different starting values for lambda2 results in different values for lambda1. Is there a way to specify a constraint such as x + lambda2 > 0. Is there a work around to address this problem? If this is not possible, what would be the best starting value for lambda2?

Thanks,

Raphael

SAS Super FREQ
Posts: 4,175

## Re: Parameter Constraint Matrix

1) The TRANSREG procedure solves regression models with Box-Cox transformations. Would that help? I think it requires that you fix lambda2 >= -min(x). It then optimizes over lambda1.

2) lambda2 is called a threashold parameter, and MLE problems of this kind do sometimes have problems converging. They arise in density estimation, such as in PROC UNIVARIATE with the HISTOGRAM statement.  Many practitioners set the value of lambda2 to be either -min(x) or some value that has physical significance.

3) If you really want to solve the two-parameter problem, you can use the BLC matrix to define the linear inequality x+lambda2 > 0.  Again, a feasible starting point is any value such that lambda2 > -min(x). An example of specifying a constraint is at "Specifying the BLC Matrix". You can then use your favorite NLP function to solve the optimization problem.

4) For a worked out example of using SAS/IML to solve an MLE problem, see Maximum likelihood estimation in SAS/IML - The DO Loop

That example does not use a BLC constaint matrix, but the ideas are all there.

5) If you use an optimization routine that requires derivatives, see the hints in this article: Optimizing? Two hints for specifying derivatives - The DO Loop

6) Don't forget to evaluate the BC transformation as log(x+lambda2) when lambda1=0.

Contributor
Posts: 21

## Re: Parameter Constraint Matrix

Thanks Rick!

Discussion stats
• 2 replies
• 384 views
• 4 likes
• 2 in conversation