loglikelihood.logLogistic
loglikelihood.logLogistic, function
def autodiff pure loglikelihood.logLogistic(
alpha: number,
beta: number,
x: number): number
def autodiff pure loglikelihood.logLogistic(
alpha: number,
beta: number,
x: number,
isLowerBound: boolean): number
Returns the log-likelihood of x under a log-logistic distribution. The
isLowerBound overload treats x as a lower bound.
alpha: scale parameter, must be positive.beta: shape parameter, must be positive.x: observation, must be positive.isLowerBound: when true,xis a lower bound.
Examples
table T = with
[| as Alpha, as Beta, as X |]
[| 10, 2, 5 |]
[| 10, 2, 20 |]
T.LL = loglikelihood.logLogistic(T.Alpha, T.Beta, T.X)
show table "Log-logistic" with
T.X
T.LL
This produces the following table:
| X | LL |
|---|---|
| 5 | -2.748872 |
| 20 | -4.135167 |
table T = with
[| as Alpha, as Beta, as X, as IsLowerBound |]
[| 10, 2, 5, true |]
[| 10, 2, 20, true |]
T.LL = loglikelihood.logLogistic(T.Alpha, T.Beta, T.X, T.IsLowerBound)
show table "Lower bound" with
T.X
T.LL
This produces the following table:
| X | LL |
|---|---|
| 5 | -0.2231435 |
| 20 | -1.609438 |