logLik: Log likelihood methods for objects of class 'sad'

logLik.sadR Documentation

Log likelihood methods for objects of class sad

Description

Compute log likelihood and likelihood-based z-scores for objects of class sad.

Usage

## S3 method for class 'sad'
logLik(x)

logLikZ(x, ...)

## S3 method for class 'sad'
logLikZ(x, ...)

Arguments

x

an object of class sad

...

arguments to be passed to methods

Details

logLikZ.sad simulates from a fitted SAD and calculates the likelihood of these simulated data sets. The distribution of these values is compared against the likelihood of the data to obtain a z-score.

Value

logLik returns an object of class logLik with attributes "df" and "nobs". logLikZ returns a list with elements

z

The z-score

obs

The observed log-likelihood of the actual data set

Author(s)

Andy Rominger <ajrominger@gmail.com>

See Also

fitSAD, logLik

Examples

x <- rtpois(1000, 2)
sad1 <- fitSAD(x, models='tpois')
logLik(sad1[[1]])


ajrominger/pika documentation built on Nov. 13, 2022, 8:22 a.m.