ProbitLogLik: Probit Regression Log-Likelihood Function

Description Usage Arguments Value Author(s) See Also Examples

View source: R/ProbitLogLik.R

Description

Given a design matrix and vector of binary responses, this function evaluates the log-likelihood function for the Probit regression model.

Usage

1
ProbitLogLik(beta.hat, X, y)

Arguments

beta.hat

A vector of length p. The current estimates of the regression parameters.

X

The n x p design matrix for the Probit regression model.

y

Vector of length n containing binary outcomes (either 0 or 1).

Value

A scalar - the value of the log-likelihood at beta.hat.

Author(s)

Nicholas Henderson

See Also

ProbitSimulate, ProbitUpdate

Examples

1
2
3
4
5
6
7
8
n <- 200
npars <- 5
true.beta <- .5*rt(npars, df=2) + 2
XX <- matrix(rnorm(n*npars), nrow=n, ncol=npars)
yy <- ProbitSimulate(true.beta, XX)

initial.beta <- rep(0.0, npars)
ll <- ProbitLogLik(initial.beta, XX, yy)

daarem documentation built on Feb. 10, 2019, 1:04 a.m.