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

View source: R/bpt_logl.R

bpt_loglR Documentation

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)

Arguments

param

parameters of BPT model

x

input data for BPT model

Value

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

Examples

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")


marp documentation built on Aug. 11, 2022, 5:10 p.m.