Returns the covariance matrix or the Fisher information matrix of a fitted mpt model object.

# S3 method for mpt
vcov(object, logit = FALSE, what = c("vcov", "fisher"), ...)

Arguments

object

an object of class mpt, typically the result of a call to mpt.

logit

logical. Switch between logit and probability scale.

what

character. If vcov (default), the covariance matrix is returned; if fisher, the Fisher information matrix is returned.

...

further arguments passed to or from other methods. None are used in this method.

Details

If logit is false, the covariance matrix is based on the observed Fisher information matrix of the ML estimator on the probability scale. This is equivalent to the equations for the covariance matrix given in Hu and Batchelder (1994) and Hu (1999), although the implementation here is different.

If logit is true, the covariance matrix and the estimated information matrix (Elandt-Johnson, 1971) of the ML estimator on the logit scale are obtained by the multivariate delta method (Bishop, Fienberg, and Holland, 1975; Grizzle, Starmer, and Koch, 1969).

Value

A (named) square matrix.

References

Bishop, Y.M.M., Fienberg, S.E., & Holland, P.W. (1975). Discrete multivariate analysis: Theory and practice. Cambridge: MIT Press.

Elandt-Johnson, R. C. (1971). Probability models and statistical methods in genetics. New York: Wiley.

Grizzle, J.E., Starmer, C.F., & Koch, G. (1969). Analysis of categorical data by linear models. Biometrics, 25(3), 489--504. doi: 10.2307/2528901

Hu, X. (1999). Multinomial processing tree models: An implementation. Behavior Research Methods, Instruments, & Computers, 31(4), 689--695. doi: 10.3758/BF03200747

Hu, X., & Batchelder, W.H. (1994). The statistical analysis of general processing tree models with the EM algorithm. Psychometrika, 59(1), 21--47. doi: 10.1007/bf02294263

See also

Examples

data(retroact)
m <- mpt(mptspec("SR"), retroact[retroact$lists == 1, ])

vcov(m)                   # covariance matrix (probability scale)
#>               c             r             u
#> c  0.0012895843 -0.0004079495  0.0006575142
#> r -0.0004079495  0.0020799675 -0.0003823152
#> u  0.0006575142 -0.0003823152  0.0027219988
vcov(m, logit = TRUE)     # covariance matrix (logit scale)
#>             logit(c)     logit(r)     logit(u)
#> logit(c)  0.16578167 -0.018546573  0.033934288
#> logit(r) -0.01854657  0.033441397 -0.006977916
#> logit(u)  0.03393429 -0.006977916  0.056398612
vcov(m, what = "fisher")  # Fisher information
#>           c         r          u
#> c  924.5542 144.00276 -203.10555
#> r  144.0028 515.94665   37.68201
#> u -203.1055  37.68201  421.73096