powered by
Calculate the likelihood or log-likelihood for one observation of logistic regression model .
log_reg(y, x, beta, iflog = TRUE)
Response value (0 or 1).
Covariate vector of dimension \(p \times 1\).
Estimated parameter of logistic regression model.
If TRUE, log_reg calculate the log-likelihood; else likelihood.
Likelihood or log-likelihood.
# NOT RUN { res = log_reg(1,c(1,2,3),c(1,-1,1)) # }
Run the code above in your browser using DataLab