fitZIDist {fitPS}R Documentation

Fit a Zero-Inflated Zeta Distribution to Forensic Data

Description

This function uses maximum likelihood estimation (MLE) to estimate mixing parameter and the shape parameter of a zero-inflated zeta distribution from a set of observed counts for either the number of groups/sources of forensically interesting material (mostly glass or paint) recovered from clothing, or the number of fragments/particles in each group. This, in turn, allows the estimation of the P and S probabilities, as described by Evett and Buckleton (1990), which used in computing the likelihood ratio (LR) for activity level propositions. The data itself arises from clothing surveys. The zero-inflated zeta distribution has probability mass function

p(k) = \begin{cases} \pi + \frac{(1-\pi)}{\zeta(s)}&,k=0, \\ \frac{(1-\pi)k^{-s}}{\zeta(s)}&,k=1,2,\ldots \end{cases}

where \zeta(s) is the Reimann Zeta function.

Usage

fitZIDist(x, nterms = 10, start = c(0.5, 1), ...)

fitZIdist(x, nterms = 10, start = c(0.5, 1), ...)

fitzidist(x, nterms = 10, start = c(0.5, 1), ...)

Arguments

x

an object of type psData, usually obtained from readData.

nterms

the number of terms to compute the probability distribution for.

start

a starting value for the optimiser.

...

other parameters - not currently used.

Details

The function returns an object of class psFit which is a list contains seven elements:

psData

– an object of class psData–see readData,

fit

– the fitted object from optim,

pi

- the maximum likelihood estimate of the mixing parameter,

shape

– the maximum likelihood estimate of the shape parameter,

var.cov

– the estimated variance-covariance matrix for the parameters,

fitted

– a named vector containing the first nterms of the fitted distribution.

model

– set to "ziz" for this model.

The output can be used in a variety of ways. If the interest is just in the mixing and shape parameter estimates, then the pi and shape member of the psFit object contains this information. It is also displayed along with a number of fitted probabilities by the print.psFit method. The fitted object can also be plotted using the plot method plot.psFit, and to create a probability function with probfun. **NOTE** The value of the shape parameter that is printed (if you print the fitted object) is different from that value that is stored in shape. The stored value is for the VGAM parameterisation of the zeta distribution which uses s^\prime = s - 1. Therefore the printed value is s = s^\prime + 1. If you intend to use the fitted value with dzeta, then you should use the stored value s^\prime.

If start is not specified, then it is set to (0.5, 1). The reason the starting values are not zero is that small starting values seem to cause instability in the likelihood. If you specify your own starting value, it would be sensible to keep both above 0.5.

Value

an object of class psFit–see Details.

References

Evett, I. W. and Buckleton, J. S., "The interpretation of glass evidence. A practical approach", Journal of the Forensic Science Society 1990: 30(4): 215–223.

See Also

plot.psFit, print.psFit, probfun.

Examples

data(Psurveys)
roux = Psurveys$roux
fit = fitZIDist(roux)
fit

[Package fitPS version 1.0.1 Index]