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