vcov.btfit | R Documentation |
vcov
method for class "btfit"
## S3 method for class 'btfit' vcov(object, subset = NULL, ref = NULL, ...)
object |
An object of class "btfit", typically the result |
subset |
A condition for selecting one or more subsets of the components. This can either be a character vector of names of the components (i.e. a subset of |
ref |
A reference item. Either a string with the item name, or the number 1, or NULL. If NULL, then the coefficients are constrained such that their mean is zero. If an item name is given, the coefficient estimates are shifted so that the coefficient for the ref item is zero. If there is more than one component, the components that do not include the ref item will be treated as if ref = NULL. If ref = 1, then the first item of each component is made the reference item. |
... |
other arguments |
N.B. this can be slow when there are a large number of items in any component.
A square numeric matrix, which is a non-full-rank variance-covariance matrix for the estimates in coef(object, subset = subset, ref = ref)
; or a list of such matrices if object
has more than one component. The rows and columns of the matrix (or matrices) are arranged in the same order as the object$pi
vector(s).
-#' @author David Firth, Ella Kaye
btfit
, coef.btfit
, summary.btfit
citations_btdata <- btdata(BradleyTerryScalable::citations) #' fit1 <- btfit(citations_btdata, 1) #' vcov(fit1) toy_df_4col <- codes_to_counts(BradleyTerryScalable::toy_data, c("W1", "W2", "D")) toy_btdata <- btdata(toy_df_4col) fit2a <- btfit(toy_btdata, 1) vcov(fit2a) vcov(fit2a, subset = function(x) length(x) > 3) vcov(fit2a, subset = function(x) "Cyd" %in% names(x)) fit2b <- btfit(toy_btdata, 1.1) vcov(fit2b, ref = "Cyd")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.