CalculWeight {WLogit}R Documentation

Calculate the weight

Description

Calculate the weight in the penalized weighted- least-squares problem

Usage

CalculWeight(Px)

Arguments

Px

The vector of estimated probability for each response to be 1.

Author(s)

Wencan Zhu, Celine Levy-Leduc, Nils Ternes

See Also

Please read https://hastie.su.domains/Papers/glmnet.pdf for more details

Examples

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))
  }

[Package WLogit version 2.1 Index]