Nonlinear Optimization Examples

Example 11.5: Profile-Likelihood-Based Confidence Intervals

This example calculates confidence intervals based on the profile likelihood for the parameters estimated in the previous example. The following introduction on profile-likelihood methods is based on the paper of Venzon and Moolgavkar (1988).

Let \hat{\theta} be the maximum likelihood estimate (MLE) of a parameter vector \theta_0 \in {\cal r}^n and let \ell(\theta) be the log-likelihood function defined for parameter values \theta \in \theta \subset {\cal r}^n.

The profile-likelihood method reduces \ell(\theta) to a function of a single parameter of interest, \beta=\theta_j, where \theta=(\theta_1, ... ,   \theta_j, ... ,\theta_n)^', by treating the others as nuisance parameters and maximizing over them. The profile likelihood for \beta is defined as

\tilde{\ell}_j(\beta) = \max_{\theta \in \theta_j(\beta)}    \ell(\theta)
where \theta_j(\beta) = \{\theta \in \theta: \theta_j=\beta\}. Define the complementary parameter set \omega = (\theta_1, ... ,\theta_{j-1},\theta_{j+1},    ... ,\theta_n)^' and \hat{\omega}(\beta) as the optimizer of \tilde{\ell}_j(\beta) for each value of \beta. Of course, the maximum of function \tilde{\ell}_j(\beta) is located at \beta=\hat{\theta}_j. The profile-likelihood-based confidence interval for parameter \theta_j is defined as
\{\beta: \ell(\hat{\theta}) - \tilde{\ell}_j(\beta)    \leq \frac{1}2q_1(1-\alpha) \}
where q_1(1-\alpha) is the (1-\alpha)th quantile of the \chi^2 distribution with one degree of freedom. The points (\beta_l,\beta_u) are the endpoints of the profile-likelihood-based confidence interval for parameter \beta=\theta_j. The points \beta_l and \beta_u can be computed as the solutions of a system of n nonlinear equations f_i(x) in n parameters, where x=(\beta,\omega):
[ \ell(\theta) - \ell^* \    \frac{\partial \ell}{\partial \omega} (\theta)    ] = 0
where \ell^* is the constant threshold \ell^* = \ell(\hat{\theta}) -\frac{1}2q_1(1-\alpha). The first of these n equations defines the locations \beta_l and \beta_u where the function \ell(\theta) cuts \ell^*, and the remaining n-1 equations define the optimality of the n-1 parameters in \omega. Jointly, the n equations define the locations \beta_l and \beta_u where the function \tilde{\ell}_j(\beta) cuts the constant threshold \ell^*, which is given by the roots of  \tilde{\ell}_j(\beta) - \ell^*. Assuming that the two solutions \{\beta_l,\beta_u\} exist (they do not if the quantile q_1(1-\alpha) is too large), this system of n nonlinear equations can be solved by minimizing the sum of squares of the n functions f_i(\beta,\omega):
f = \frac{1}2 \sum_{i=1}^n f_i^2(\beta,\omega)
For a solution of the system of n nonlinear equations to exist, the minimum value of the convex function f must be zero.

The following code defines the module for the system of n=2 nonlinear equations to be solved:

  
    start f_plwei2(x) global(carcin,ipar,lstar); 
       /* x[1]=sigma, x[2]=c */ 
       like = f_weib2(x); 
       grad = g_weib2(x); 
       grad[ipar] = like - lstar; 
       return(grad`); 
    finish f_plwei2;
 

The following code implements the Levenberg-Marquardt algorithm with the NLPLM subroutine to solve the system of two equations for the left and right endpoints of the interval. The starting point is the optimizer (\hat{\sigma},\hat{c}), as computed in the previous example, moved toward the left or right endpoint of the interval by an initial step (refer to Venzon and Moolgavkar 1988). This forces the algorithm to approach the specified endpoint.

  
    /* quantile of chi**2 distribution */ 
    chqua = cinv(1-prob,1); lstar = fopt - .5 * chqua; 
    optn = {2 0}; 
    do ipar = 1 to 2; 
    /* Compute initial step: */ 
    /* Choose (alfa,delt) to go in right direction */ 
    /* Venzon & Moolgavkar (1988), p.89 */ 
       if ipar=1 then ind = 2; else ind = 1; 
       delt = - inv(hes2[ind,ind]) * hes2[ind,ipar]; 
       alfa = - (hes2[ipar,ipar] - delt` * hes2[ind,ipar]); 
       if alfa > 0 then alfa = .5 * sqrt(chqua / alfa); 
       else do; 
          print "Bad alpha"; 
          alfa = .1 * xopt[ipar]; 
       end; 
       if ipar=1 then delt = 1 || delt; 
          else delt = delt || 1; 
  
    /* Get upper end of interval */ 
       x0 = xopt + (alfa * delt)`; 
    /* set lower bound to optimal value */ 
       con2 = con; con2[1,ipar] = xopt[ipar]; 
       call nlplm(rc,xres,"f_plwei2",x0,optn,con2); 
       f = f_plwei2(xres); s = ssq(f); 
       if (s < 1.e-6) then xub[ipar] = xres[ipar]; 
          else xub[ipar] = .; 
  
    /* Get lower end of interval */ 
       x0 = xopt - (alfa * delt)`; 
    /* reset lower bound and set upper bound to optimal value */ 
       con2[1,ipar] = con[1,ipar]; con2[2,ipar] = xopt[ipar]; 
       call nlplm(rc,xres,"f_plwei2",x0,optn,con2); 
       f = f_plwei2(xres); s = ssq(f); 
       if (s < 1.e-6) then xlb[ipar] = xres[ipar]; 
          else xlb[ipar] = .; 
    end; 
    print "Profile-Likelihood Confidence Interval"; 
    print xlb xopt xub;
 

The results, shown in Output 11.5.1, are close to the results shown in Output 11.4.2.

Output 11.5.1: Confidence Interval Based on Profile Likelihood

XLB XOP2 XUB
215.1963 234.31861 255.2157
4.1344126 6.0831471 8.3063797



Previous Page | Next Page | Top of Page