finfo {dbd}R Documentation

Fisher information.

Description

Compute the Fisher information for a db distribution or a beta binomial distribution given the parameters of that distribution. In the case of the db distribution a specified number of observations must be supplied. In the case of the beta binomial distribution the actual observations must be supplied. The inverse of the Fisher information is an estimate of the covariance matrix of the parameter estimates.

Usage

finfo(distr=c("db","betabinom"),alpha, beta, ntop, ndata,
      zeta = FALSE, x, m, s, size)

Arguments

distr

Text string specifying which distribution to consisder. May be abbreviated (e.g. to "d" or "b").

alpha

See ddb(). Ignored if distr is "betabinom".

beta

See ddb(). Ignored if distr is "betabinom".

ntop

See ddb(). Ignored if distr is "betabinom".

ndata

The number of observations for which the Fisher information is being determined. Ignored if distr is "betabinom"; must be supplied if distr is "db".

zeta

See ddb(). Ignored if distr is "betabinom".

x

A numeric vector of observations appropriate for the model under consideration. Ignored if distr is "db"; the Fisher information for the db distribution depends only upon the parameters and not upon the data. Must be supplied if distr is "betabinom".

m

A numeric scalar, between 0 and 1, which may be interpreted as the “success” probability. (See the help for dbetabinom().) Ignored if distr is "db".

s

Numeric scalar, greater than 0. The overdispersion parameter of the distribution. (See the help for dbetabinom().) Ignored if distr is "db".

size

Integer scalar specifying the upper limit of the “support” of the betabinom distribution under consideration. The support is the set of integers {0, 1, ..., size}. (See the help for dbetabinom().) Ignored if distr is "db".

Details

This function differs from aHess() in that its arguments are prescribed “individually” rather than being extracted from an "mleDb" or "mleBb" object. This allows finfo() to be applied to “true” parameters (where these are known) rather than estimated ones.

Note that if distr is "db", the number of observations must be supplied explicitly, whereas for aHess() this number is extracted from the object argument. If distr is "betabinom" then a vector of actual observations must be supplied.

If distr is "db" then finfo() in effect calculates the expected information, since the information matrix does not depend on the parameters. This is not the case if distr is "betabinom". If the parameters supplied are the maximum likelihood estimates based on the supplied vector of observations x, then the value returned by finfoBb() is the observed Fisher information.

Value

A two-by-two positive definite (with any luck!) numeric matrix. Its inverse is an estimate of the covariance matrix of the parameter estimates.

Author(s)

Rolf Turner r.turner@auckland.ac.nz

See Also

link{aHess}() link{nHess}() link{mleDb}() link{mleBb}()

Examples

print(finfo(alpha=0.6,beta=0.3,ntop=5,ndat=54))
X   <- hmm.discnp::SydColDisc
X$y <- as.numeric(X$y)
X   <- split(X,f=with(X,interaction(locn,depth)))
x   <- X[[19]]$y
fit <- mleDb(x, ntop=5)
alpha <- fit["alpha"]
beta  <- fit["beta"]
ntop  <- attr(fit,"ntop")
zeta  <- attr(fit,"zeta")
ndat  <- ndata(fit)
print(finfo(alpha=alpha,beta=beta,ntop=ntop,ndat=ntop,zeta=zeta))
print(aHess(fit)) # Same
X     <- hrsRcePred
top1e <- X[X$sbjType=="Expert","top1"]
fit   <- mleBb(top1e,size=10)
print(finfo(distr="b",x=top1e,m=fit["m"],s=fit["s"],
            size=10)) # Observed Fisher info.
print(aHess(fit,x=top1e)) # Same

[Package dbd version 0.0-22 Index]