Learn R Programming

MTE (version 1.0.0)

lnt: Tangent-likelihood function.

Description

The function calculates tangent-likelihood given the value of density.

Usage

lnt(f, t, p)

Arguments

f

values of density function.

t

tangent point. It is positive and close to 0. If 0, the tangent-likelihood is equivalent to log-likelihood.

p

Taylor expansion order, the value can be set up to 3.

Examples

Run this code
# NOT RUN {
set.seed(2017)
x=c(rnorm(80), rnorm(20, 10, 10))
f=dnorm(x)
y=lnt(f, 0.1, 2)
# }

Run the code above in your browser using DataLab