Computes gradient and diagonal of the Hesse matrix w.r.t. to \(\eta\) of a quadratic approximation to the reparametrized original log-likelihood function
$$L(\phi) = \sum_{i=1}^m w_i \phi(x_i) - \int_{-\infty}^{\infty} \exp(\phi(t)) dt. $$
where \(L\) is parametrized via
$${\bold{\eta}}({\bold{\phi}}) = \Bigl(\phi_1, \Bigl(\eta_1+ \sum_{j=2}^i (x_i-x_{i-1})\eta_i\Bigr)_{i=2}^m\Bigr).$$
\({\bold{\phi}}\): vector \((\phi(x_i))_{i=1}^m\) representing concave, piecewise linear function \(\phi\),
\({\bold{\eta}}\): vector representing successive slopes of \(\phi.\)
quadDeriv(dx, w, eta)
\(m \times 2\) matrix. First column contains gradient and second column diagonal of Hesse matrix.
Vector \((0, x_i-x_{i-1})_{i=2}^m.\)
Vector of weights as in activeSetLogCon
.
Vector \({\bold{\eta}}.\)
Kaspar Rufibach, kaspar.rufibach@gmail.com,
http://www.kasparrufibach.ch
Lutz Duembgen, duembgen@stat.unibe.ch,
https://www.imsv.unibe.ch/about_us/staff/prof_dr_duembgen_lutz/index_eng.html
quadDeriv
is used by the function icmaLogCon
.