dist_ll-methods: The log-likelihood function

Description Usage Arguments Value Note See Also Examples

Description

This is generic function for distribution objects. This function calculates the log-likelihood for the current parameters and xmin value.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
dist_ll(m)

## S4 method for signature 'conlnorm'
dist_ll(m)

## S4 method for signature 'conexp'
dist_ll(m)

## S4 method for signature 'conpl'
dist_ll(m)

## S4 method for signature 'conweibull'
dist_ll(m)

## S4 method for signature 'disexp'
dist_ll(m)

## S4 method for signature 'dislnorm'
dist_ll(m)

## S4 method for signature 'displ'
dist_ll(m)

## S4 method for signature 'dispois'
dist_ll(m)

Arguments

m

a distribution object.

Value

The log-likelihood

Note

This method does *not* alter the internal state of the distribution objects.

See Also

dist_cdf, dist_pdf and dist_rand

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
##########################################
#Load data and create distribution object#
##########################################
data(moby_sample)
m = displ$new(moby_sample)
m$setXmin(7); m$setPars(2)

##########################################
#Calculate the log-likelihood            #
##########################################
dist_ll(m)

Example output

[1] -1328.11

poweRlaw documentation built on April 25, 2020, 9:06 a.m.