These software tools compute quasi-variances for estimates of a group or factor effect in a generalized linear model (including linear models, logistic regression, log linear models, hazard models, etc.) The software can be used either in conjunction with R (as contributed package qvcalc) or Xlisp-Stat on a PC, Mac or Unix computer; or remotely through the Kuvee web-based calculator.
The current, stable release of qvcalc is published on CRAN, at https://cloud.r-project.org/web/packages/qvcalc.
The development version, which may be more recent but less stable, is maintained on github at https://github.com/DavidFirth/qvcalc.
Installation in R: either
[for the stable, CRAN package]; or
[for the development version on github]
(Kuvee is new in 2013 — developed and maintained by Shaun Killingbeck. This is a client-side calculator, which offers improved facilities and performance and which replaces the server-side calculator that was previously available here.)
Documentation is vailable at two levels of detail:
- a brief description of the methodology, for users of the web-based Kuvee calculator
- a more complete manual, "Quasi-variances in Xlisp-Stat and on the Web", intended mainly for those who use the method in conjunction with Xlisp-Stat on their own computer. Cite as: Firth, D (2000), Quasi-variances in Xlisp-Stat and on the web, Journal of Statistical Software 5.4, 1-13.
The R package qvcalc comes with its own documentation.
NOTE on incompatibility, at present, with "BTabilities" objects (which come from the BradleyTerry2 package)
In R, the qvcalc function should work directly with objects of class "BTabilities". But at present (November 2015) it does not work correctly, and instead results in an error. The following extract from a recent email explanation explains:
What you encountered here is actually a bug in the BTabilities function. It's now fixed in the development version of BradleyTerry2, but not yet in the CRAN released version. If you have facilities there for installing and working with /source/ packages, and you have svn installed, you can get the development version by svn checkout svn://svn.r-forge.r-project.org/svnroot/bradleyterry2/ I'm aware, though, that many R users do /not/ have their system set up for that! So, in case it helps, here is a workaround for the current (broken) interface between BTabilities and qvcalc. I'll demonstrate it here using the "citations" example from BradleyTerry2. Hopefully you can see how to adapt it to your own data if you still need to do this. ----- library(BradleyTerry2) library(qvcalc) example(citations) citations.ab <- BTabilities(citeModel) cf <- coef(citations.ab) vc <- vcov(citations.ab) vc <- rbind(0, cbind(0, vc)) ##### THE FIX! rownames(vc) <- colnames(vc) <- "..Biometrika" citations.qv <- qvcalc(vc, estimates = cf, factorname = "journal") ----- The fix is needed because the dimensions of vcov(citations.ab) and coef(citations.ab) do not match up. This is caused by the bug in BTabilities() in the current CRAN release of BradleyTerry2. I hope that helps. We hope to get a new version out soon to fix this properly (along with one or two other glitches).
For use with R:
For use with Xlisp-Stat:
If you want to use the QV Calculator on your own computer in conjunction with Xlisp-Stat, the file needed is:
- qvcalc.lsp (36k)
After downloading qvcalc.lsp simply Load it into Xlisp-Stat to make available the QV Calculator.
The ship-damage example discussed in the documentation is in a separate file:
- example.lsp (8k)
Version history for the R package "qvcalc"
[Starting with version 0.8-9 (3 February 2015) --- earlier versions are not listed here.]
0.9-0: Minor tweaks to fix the dependencies 'NOTE' on CRAN checks
0.8-9: corrects an error in the calculation of the relative errors for simple contrasts. The formula used for this now agrees with the definition of relative error that was given in the Biometrika paper. Many thanks to Shaun Killingbeck for spotting the error in version 0.8-8. Also made some small improvements to examples, and cosmetic changes to avoid a NOTE in the latest CRAN checks.
© David Firth, 1999. This software carries ABSOLUTELY NO WARRANTY: feel free to use it, but use it at your own risk!