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)

Arguments

dist_name

The name of the distribution.

ob_col

The name of the column in a data frame that contains the observations.

type_col

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