loglogis_logl {marp} | R Documentation |
A function to calculate the log-likelihood of Log-Logistics model
Description
A function to calculate the log-likelihood of Log-Logistics model
Usage
loglogis_logl(param, x)
Arguments
param |
parameters of Log-Logistics model |
x |
input data for Log-Logistics model |
Value
returns the value of negative log-likelihood of the Log-Logistics model
Examples
set.seed(42)
data <- rgamma(30,3,0.01)
# set some parameters
par_hat <- c(2.6037079185931518, 247.59811806509711) # estimated parameters
param <- c(log(par_hat[2]),log(par_hat[1])) # input parameters for logl function
# calculate log-likelihood
result <- marp::loglogis_logl(param, data)
# print result
cat("-logl = ", result, "\n")
[Package marp version 0.1.0 Index]