Learn R Programming

marp (version 0.1.0)

loglogis_logl: 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)

Value

returns the value of negative log-likelihood of the Log-Logistics model

Arguments

param

parameters of Log-Logistics model

x

input data for Log-Logistics model

Examples

Run this code
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")

Run the code above in your browser using DataLab