loglikelihood: Calculates the loglikelihood for an abundance datesset and a...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/loglikelihood.R

Description

Calculates the loglikelihood for an abundance datesset and a given function

Usage

1
loglikelihood(dates, func, allowDistrBorders = FALSE)

Arguments

dates

vector; dates, that should be in the range of the function.

func

function object; a given function, for whih the loglikelihood shall be calculated.

allowDistrBorders

logical; If TRUE the first and last values of the dates vector will b changed by 0.00001 (first) or -0.00001(last) if the corresponding result of the function is Inf or -Inf.

Details

Calculates the loglikelihood for an abundance datesset and a given function by multiplying all the values given by the given function, that uses the dates given by dates.

Value

A numeric value representing the loglikelihood.

Author(s)

Florian Berger <florian_berger@ymail.com>

See Also

scale

Examples

1
2
3
4
5
a     <- c(1:10)
dates <- as.Date(a, origin = '2017-01-01')
count <- c(1,1,3,4,6,9,5,4,2,1)
dat   <- data.frame(dates, count)
loglikelihood(dates = dates, func = estdist(dat))

biometry/phenologicalOverlap documentation built on May 21, 2019, 2:31 a.m.