tcensReg_llike: Log Likelihood for Truncated Normal Distribution with...

Description Usage Arguments Details Value

View source: R/tcensReg_llike.R

Description

This is a supporting function that is used to calculate the log likelihood value at the nth iteration of theta.

Usage

1
tcensReg_llike(theta, y, X, a = -Inf, v = NULL)

Arguments

theta

Numeric vector containing estimates of β and \log(σ)

y

Numeric vector with the observed truncated and censored outcomes

X

Numeric design matrix

a

Numeric scalar indicating the truncation value. Initial value is -Inf indicating no truncation

v

Numeric scalar indicating the censoring value. Initially set to NULL indicating no censoring

Details

If a and/or v are not specified then the corresponding censored only, truncated only, or gaussian log likelihood will be used. This function is called as part of the Newton-Raphson algorithm in tcensReg_newton and in additional optimization methods in tcensReg_optim.

Value

Scalar value of the log-likelihood at the nth iterate


williazo/tcensReg documentation built on July 24, 2020, 1:39 a.m.