CalculPx {WLogit}R Documentation

Calculate the class-conditional probabilities.

Description

Calculate the probability for a repsonse to be 1 in the logistic regression model.

Usage

CalculPx(X, beta, intercept = 0)

Arguments

X

Design matrix of the logistic model considered.

beta

Vector of coefficients of the logistic model considered.

intercept

Whether there is the intercept

Value

prob

the probability for a repsonse 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)
CalculPx(X=X, beta=beta)


##---- 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 (X, beta, intercept = 0) 
{
    prob <- 1/(1 + exp(-(X %*% beta + intercept)))
    return(prob)
  }

[Package WLogit version 2.1 Index]