normal
, weibull
, exp
, etc. and then
we have a set of functions that are named
p<name>
, d<name>
, q<name>
, r<name>
, etc.,
where the first letter is the first letter of the
distribution name. For instance, for the normal
distribution, we have pnorm
, dnorm
, qnorm
,
rnorm
, respectively for the cdf, pdf, quantile
function, and random variate generator.R/likelihood_name.R
likelihood_name.Rd
This function generates a likelihood model based on a distribution name. The distribution name is used to generate the log-likelihood function, the score function, and the Hessian of the log-likelihood function for either exact (pdf), left-censored (cdf), right-censored (1 - cdf), or interval-censored (cdf(b) - cdf(a)) observations.
likelihood_name(dist_name, ob_col, censor_col)
The name of the distribution.
The name of the column in a data frame that contains the observations.
The name of the column in a data frame that contains the censoring type. The values in this column determine the type of censoring.
exact
or NA: exact observation
left
: left-censored observation
right
: right-censored observation
interval
: interval-censored observation