Learn R Programming

marp (version 0.1.0)

bpt_logl: A function to calculate the log-likelihood of BPT model

Description

A function to calculate the log-likelihood of BPT model

Usage

bpt_logl(param, x)

Value

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

Arguments

param

parameters of BPT model

x

input data for BPT model

Examples

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

# set some parameters
par_hat <- c(292.945125794581, 0.718247184450307) # estimated parameters
param <-  c(log(par_hat[1]),log(par_hat[2]^2)) # input parameters for logl function

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

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

Run the code above in your browser using DataLab