logistic: The logistic function.

Description Usage Arguments Value Examples

Description

Called by various routines in the package. May also be used to predict fitted conditional probabilities by supplying a set of variables and corresponding coefficients estimated from a logit model.

Usage

1
logistic(theta, data)

Arguments

theta

A vector of coefficients.

data

A dataframe of multiple exogenous regressors.

Value

A vector of values produced by a logistic formula under specified parameters and data.

Examples

1
2
3
4
5
6
7
8
9
logitdata <- simulateLogit(1000, c(1,0.5,-0.5,-0.3))
model <- logit(logitdata)
pars <- coef(model)
# predict with logistic function
predicted <- logistic(pars, cbind(1,logitdata[,-1]))
# compare with data
describe(logitdata[,1])
# compare with predict function from R
describe(fitted(model))

BPJandree/AutoGLM documentation built on May 5, 2019, 10:25 a.m.