CalculWeight | R Documentation |
Calculate the weight in the penalized weighted- least-squares problem
CalculWeight(Px)
Px |
The vector of estimated probability for each response to be 1. |
Wencan Zhu, Celine Levy-Leduc, Nils Ternes
Please read https://hastie.su.domains/Papers/glmnet.pdf for more details
data(X)
data(beta)
px <- CalculPx(X=X, beta=beta)
CalculWeight(px)
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (Px)
{
return(Px * (1 - Px))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.