Description Usage Arguments Value
View source: R/tcensReg_optim.R
Iteratively solves likelihood of truncated normal with censoring using only gradient and/or likelihood values
1 2 3 4 5 6 7 8 9 10 11 12 | tcensReg_optim(
y,
X,
a = -Inf,
v = NULL,
method,
epsilon = 1e-04,
tol_val = 1e-06,
max_iter = 100,
step_max = 10,
theta_init = NULL
)
|
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 |
method |
Character value indicating which optimization routine to perform.
Choices include |
epsilon |
Numeric value used to define when the algorithm should stop when the gradient is less then epsilon. Default is 0.001 |
tol_val |
Tolerance value used to stop the algorithm if the (n+1) and (n) log likelihood is within the tolerance limit |
max_iter |
Maximum number of iterations for algorithm. Default is 100 |
step_max |
Maximum number of steps when performing line search. Default is 10 |
theta_init |
Initial values of theta provided by the user. If unspecified then calculates values from OLS regression |
Returns a list of final estimate of theta, total number of iterations performed, initial log-likelihood, final log-likelihood, and estimated variance covariance matrix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.