nbLLZ: Z-squared test statistic of the negative binomial...

View source: R/nbLLZ.R

nbLLZR Documentation

Z-squared test statistic of the negative binomial distribution

Description

Exact test of the negative binomial

Usage

nbLLZ(x, size, mu)

Arguments

x

a numeric vector

size

the size parameter

mu

the mean parameter

Details

Compares the observed log likelihood of the nagative binomial distribution given the data to the sampling distribution of log likelihoods given the negative binomial distribution is true. This test statistic is Chi-square distributed with d.f. = 1, meaning value larger than qchisq(0.95, 1) rejects the "null" hypothesis that the data come from a negative binomial.

Value

A matrix with columns giving the species IDs, the two parameters of the negative binomial distribution, the log likelihood of the negative binomial distribution, and the log likelihood of the Poisson distribution. Each row is one species and the species ID refers to the column index of that species in the site x species matrix x.

Author(s)

Andy Rominger <ajrominger@gmail.com>


ajrominger/ssadAssociation documentation built on Sept. 29, 2023, 4:43 a.m.