View source: R/loglogis_logl.R
loglogis_logl | R Documentation |
A function to calculate the log-likelihood of Log-Logistics model
loglogis_logl(param, x)
param |
parameters of Log-Logistics model |
x |
input data for Log-Logistics model |
returns the value of negative log-likelihood of the Log-Logistics model
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.