fit_dist_pois {ABCp2}R Documentation

Fit Offspring Distribution to the Poisson Distribution

Description

This function fits offspring data to the Poisson distribution, and tests the goodness of fit using the chi-squared test.

Usage

fit_dist_pois(dist)

Arguments

dist

a numeric vector of data values for number of offspring per dam.

Value

estimate

Lambda parameter estimated from the supplied distribution.

sd

Standard deviation of the lambda estimate.

vcov

Variance/covariance matrix of the lambda estimate.

loglik

the log-likelihood of the lambda estimate.

n

The number of observations.

statistic

The chi-squared test statistic.

parameter

Degrees of freedom for the chi-squared test.

p.value

P-value for the chi-squared test.

data_pois

Vector of values generated from the Poisson distribution.

Author(s)

M. Catherine Duryea, Andrew D. Kern, Robert M. Cox, and Ryan Calsbeek

Examples

#Fit the Lambda parameter to a distribution of offspring.
#Test the goodness of fit.

data(fungus)
fungus_fit<-fit_dist_pois(fungus$Total_Offspring)
fungus_fit$fit_pois
fungus_fit$chi_pois
hist(fungus_fit$data_pois)

[Package ABCp2 version 1.2 Index]