• No se han encontrado resultados

Capítulo 2 ESTADO DE LA CUESTIÓN

2.2.2. Técnicas de análisis químico elemental:

2.2.2.1. Fluorescencia Rayos X (XRF): Se emplea

In our model framework, as we are incorporating the elastic net constraint into our estimation procedure, (MLE), in its purest definition, is not used. In addition, as the log transformation of the likelihood is an increasing monotonic function, maximizing the likelihood is analogous to maximizing the log likelihood. In reality, we are no longer attempting maximization of the log likelihood, we are aiming to maximize based on given parameter limitations. We instead work with a pseudo log likelihood which is the original log likelihood with the constraint added. This is shown in equation (3.8). Although in the functional form of equation (3.8) it may seem as though the constraint is simply added to the log likelihood, the whole process of finding an appropriate solution is somewhat tedious.

To find a solution to this pseudo likelihood a nonlinear objective function optimization procedure, which is able to incorporate nonlinear constraints, must be employed. Derivation of solutions for this particular kind of optimization is intricate (Griva et al.,2009). One such approach is the SOLP solver (Ye, 1987). The details of this solver are provided in an associated users guide (Ye, 1989). This algorithm is designed to solve problems of the form:

minimize g( ) subject to: h( ) 0  ( ) i i l iu l  u,

where is a set of p parameters, h(.) is a nonlinear objective function i(.) is a set of linear or nonlinear constraints with li and ui being the set of lower and upper bounds, and l and u being

the lower and upper bounds imposed on . The solnp algorithm converts the problem into minimize g( )

subject to h( ) 0

l  u

by adding slacks to the inequality constraints. This algorithm consists of major and minor iterations. In the kth major iteration, solnp solves the nonlinear objective function with an added

Lagrangian based function involving h( )k (Robinson, 1972). The problem now becomes (1) minimize g( ) z hk ( ) ( / 2) ( ) h 2

subject to Jk(  k) h( )k

l  u

where Jk is a numerically approximated Jacobian matrix

k

k dh

J

d

and zk is the Lagrange multipliers at the kth major interation. For the major iteration, the first

step is to ascertain the feasibility of zk; an interior linear programming (LP) Phase 1 procedure

being called to find an interior (or near feasible) solution in the case of infeasibility.

In the next step sequential quadratic programming (QP) is implemented to solve problem (1). The gradient vector g is calculated, then the Hessian matrix H, is updated using the BFGS technique, which was discussed in Chapter 1, and then the following quadratic problem is solved.

(2) minimize (1 / 2)(z z k) ' (H z z k) g z z'( k) subject to J z zk( k) g z( )k

l  u

The gradient and Hessian are based on the nonlinear Lagrangian objective function shown in (1). As a precise solution is not required the QP section is only used to find an approximate solution; this usually completes is a small number of steps. For more details on the QP algorithm consult Ye (1987).

Once the feasible, and optimal, QP solution is ascertained for (1), the (k+1)thmajor

iteration initiates with k1 being the updated parameters; zk1 is the optimal multipliers from the

kth major iteration from the previous QP problem. If zk1 is not optimal the gradient g and the

Hessian H are updated, and the minor iteration is invoked in an attempt to re solve (2). This algorithm, consisting of the major and minor algorithm iterates until an optimal solution is found or other termination criteria is reached.

Once we have our fully specified non linear objective function along with the nonlinear inequality constraint, as shown in equation (3.8), we can use the solnp algorithm, as part of our

solution, to find an optimal solution for our problem given a value of . When implementing the solution the goal was to be able to readily, accurately, and efficiently apply the coded method to a wide variety of covariate matrices along with a given ordinal outcome vector. For this reason, a matrix representation of the likelihood, with the stereotype logit, is used. This representation is shown as follows

 



( , , | : ) ' ' n ' ' n'log n J

L β α y xα y 1   z Xβ   1 1 e 1 , (3.20)

where α is a J-1 length vector of the intercepts, z is a n J ( 1) matrix such that for column j if [ ]i j

y then z[ , ] 1i j  , else z[ , ] 0i j  . In addition, 1J and 1n are J length and n length vectors consisting of ones, X is a covariate vector, β is the corresponding parameter vector, is the vector of intensity parameters, and e is a n J ( 1) matrix such that e[ , ]i j eij where

ij

was previously defined. In optimizing the above representation of the log likelihood, the function solnp found in the R library Rsolnp is used (Ghalanos and Theussl, 2010). In addition, bounds were placed on certain parameters (Anderson, 1984). For the Jth level of the ordinal outcome the

following constraints are used: J 0 and J 0. In addition, as in equation (3.20) because in the e matrix ij is exponentiated, it is possible for terms in the matrix to have a value of , due to growth of exponential functions. As, such the intensity parameters are bounded such that 1j0 j. Optional bounds are also placed on the parameters β such that  10 p10 p;

the intercept parameters α may also being subjected to similar optional bounds,  10 j10

j

 . In addition, the covariate matrix X is centered and scaled. These steps are also taken to ensure that no entries in e have a value of . In the paper which first introduced the stereotype logit (Anderson, 1984), an ordering is placed on the intensity parameters, namely

1 2

1  ... J 0. (3.21)

It is worth noting imposing this constraint could lead to difficulty in parameter estimation, but based on the original paper no actual difficulty was encountered. Therefore, similar to the Stata software (StataCorp, College Station, TX), the above ordering was not enforced. In addition, the first and second derivates were also developed and are presented in the supplemental section at the end of this chapter.

Documento similar