Learn R Programming

infutil (version 1.0)

Jeffreys: Jeffreys Prior and Normalizing Constant

Description

This function returns the Jeffreys prior for an IRT model in the form of a density function, and optionally the normalizing constant of that prior.

Usage

Jeffreys(ltm.obj = NULL, inf.mat = NULL, inf.func = NULL, return = "prior", spl.method = "natural", range.int = c(-Inf, Inf))

Arguments

ltm.obj
An object representing an IRT model of a set of items, from the ltm package (e.g., using the ltm, grm, or gpcm functions).
inf.mat
A two-column matrix representing the information function evaluated at a set of latent trait values, with the first column being the latent trait values and the second column the information at each value (e.g., as returned by the ltm plot function).
inf.func
An information function; a function taking a latent trait value and returning the information at that value.
return
The value(s) to be returned. "prior" returns the prior as a function; "nc" returns the normalizing constant; "both" returns both as a list.
spl.method
A splinefun method to use in constructing an information function; only used if inf.mat is supplied.
range.int
The range to integrate over in calculating the normalizing constant.

Value

If return="prior", the default, a function taking a latent trait value and returning the Jeffreys prior density at that point. If return="nc", the normalizing constant used to calculate the Jeffreys prior and also the lower bound to the Lindley information. If return="both", a list having the following structure:
prior
The Jeffreys prior density as a function.
nc
The normalizing constant.

Details

Only one of ltm.obj, inf.mat, or inf.function should be supplied. An inf.mat matrix can be obtained using the plot function in the ltm package, with the options type="IIC", item=0, and plot=F. As the information function must be interpolated when inf.mat is supplied (using splinefun), supplying an ltm object or information function directly will generally be more accurate. If inf.mat is supplied, the information should be evaluated at a large number of points over a wide range, to maintain accuracy.

Note that currently, range.int must be within (-10, 10) for grm and gpcm objects. If a grm or gpcm object is supplied and range.int is outside this range, the range will be reset.

References

Markon, K. E. (2013). Information utility: Quantifying the total psychometric information provided by a measure. Psychological Methods, 18, 15-35. doi: 10.1037/a0030638..

See Also

rJeffreys, which randomly generates latent trait values distributed asccording to a Jeffreys prior density, and iota and iota.c, which calculate Lindley information quantities, possibly using the Jeffreys prior. Also see splinefun, ltm, grm, and gpcm.

Examples

Run this code
# using an ltm object
ltm.lsat <- ltm(LSAT~z1, IRT=FALSE)

jp.lsat <- Jeffreys(ltm.lsat)
jp.lsat(0)

# using inf.mat
inf.lsat <- plot(ltm.lsat, type="IIC", item=0, plot=FALSE, z=seq(-15, 15, length=10000))

jp.lsat <- Jeffreys(inf.mat=inf.lsat)
jp.lsat(0)

# returning normalizing constant
Jeffreys(ltm.lsat, return="nc")
Jeffreys(inf.mat=inf.lsat, return="nc")

Run the code above in your browser using DataLab