Learn R Programming

marp (version 0.1.0)

weibull_logl: A function to calculate the log-likelihood of Weibull model

Description

A function to calculate the log-likelihood of Weibull model

Usage

weibull_logl(param, x)

Value

returns the value of negative log-likelihood of the Weibull model

Arguments

param

parameters of Weibull model

x

input data for Weibull model

Examples

Run this code
set.seed(42)
data <-  rgamma(30,3,0.01)

# set some parameters
par_hat <- c(330.801103808081, 1.80101338777944) # estimated parameters
param <- log(par_hat) # input parameters for logl function

# calculate log-likelihood
result <- marp::weibull_logl(param, data)

# print result
cat("-logl = ", result, "\n")


Run the code above in your browser using DataLab