Learn R Programming

pencopula (version 0.3.5.1)

new.weights: Calculating new weights b.

Description

Calculating new weights b using quadratic programing.

Usage

new.weights(penden.env)

Arguments

penden.env

Containing all information, environment of pencopula()

Value

ck.val.temp

Calculated new values for the weights 'b'. The add on 'temp' means, that there is a check in the next step if the weights 'b' have been converted or not. If converted, the new values 'ck.val.temp' are unnoted. If not converted, 'ck.val.temp' become the ordinary 'ck.val' for the next iteration. This check is done in my.loop.

'ck.val.temp' is saved in the environment.

Details

The new weights are calculated solving a quadratic program. Therefore, the derivates of first and second order are needed, 'Derv1.pen' and 'Derv2.pen'. Moreover, we have to fulfill the side conditions c(u,b)>=0, sum(b)=1 and that the marginal densities are uniform. All side conditions are saved as 'AA.help' in the environment. There exists two different algorithms, due to the fact if one works with or without an adaptive grid for the side condition c(u,b)>=0.

If the quadratic program does not find a new feasible solution, the whole program terminates. For solving the quadratic program, we use the function 'solve.QP' from the R-package 'quadprog'.

Using a Bernstein polynomial basis, the side conditions are sum(b)=1 ,b>=0 and that the marginal densities are uniform.

References

Flexible Copula Density Estimation with Penalized Hierarchical B-Splines, Kauermann G., Schellhase C. and Ruppert, D. (2013), Scandinavian Journal of Statistics 40(4), 685-705.