log_reg: log_reg

Description Usage Arguments Value Examples

View source: R/zzz.R

Description

Calculate the likelihood or log-likelihood for one observation of logistic regression model .

Usage

1
log_reg(y, x, beta, iflog = TRUE)

Arguments

y

Response value (0 or 1).

x

Covariate vector of dimension p*1.

beta

Estimated parameter of logistic regression model.

iflog

If TRUE, log_reg calculate the log-likelihood; else likelihood.

Value

Likelihood or log-likelihood.

Examples

1
res = log_reg(1,c(1,2,3),c(1,-1,1))

misaem documentation built on April 12, 2021, 9:06 a.m.