Apply Sklar's Omega.
sklars.omega(
data,
level = c("nominal", "ordinal", "count", "percentage", "amount", "balance"),
confint = c("none", "bootstrap", "asymptotic"),
verbose = FALSE,
control = list()
)
Function sklars.omega
returns an object of class "sklarsomega"
, which is a list comprising the following elements.
the value of AIC for the fit, if level = "amount"
or level = "balance"
and dist != "empirical"
, or if level = "percentage"
.
the value of BIC for the fit, if level = "amount"
or level = "balance"
and dist != "empirical"
, or if level = "percentage"
.
when applicable, the bootstrap sample.
the matched call.
a named vector of parameter estimates.
the value of argument confint
.
the list of control parameters.
unless optimization failed, the value of convergence
returned by optim
or hjkb
.
if confint = "asymptotic"
, the estimate of the covariance matrix of the parameter estimator.
the matrix of scores, perhaps altered to remove rows (units) containing fewer than two scores.
if optimization converged, the number of iterations required to optimize the objective function.
the level of measurement.
if applicable, the value of message
returned by optim
.
the approach to inference, one of "CML"
, "DT"
, "ML"
, or "SMP"
(semiparametric).
the number of marginal parameters.
the total number of parameters.
the method used to optimize the objective function. The L-BFGS-B method is attempted first. If L-BFGS-B fails, a second attempt is made using the bounded Hooke-Jeeves algorithm.
the initial value of the copula correlation matrix.
the estimated value of the copula correlation matrix.
the residuals.
a square root of the estimated copula correlation matrix. This is used for simulation and to compute the residuals.
the minimum of the log objective function.
the value of argument verbose
.
the scores as a vector, perhaps altered to remove rows (units) containing only one score.
a matrix of scores. Each row corresponds to a unit, each column a coder. The columns must be named appropriately so that the correct copula correlation matrix can be constructed. See build.R
for details regarding column naming.
the level of measurement, one of "nominal"
, "ordinal"
, "count"
, "amount"
, "balance"
, or "percentage"
.
the method for computing confidence intervals, one of "none"
, "bootstrap"
, or "asymptotic"
.
logical; if TRUE, various messages may be printed to the console.
a list of control parameters.
bootit
the size of the (parametric) bootstrap sample. This applies when confint = "bootstrap"
or when confint = "asymptotic"
and level = "count"
. Defaults to 1,000.
when level = "balance"
, one of "gaussian"
, "laplace"
, "t"
, or "empirical"
; when level = "amount"
, one of "gamma"
or "empirical"
; when level = "percentage"
, one of "beta"
or "kumaraswamy"
; when level = "count"
, one of "poisson"
or "negbinomial"
.
the desired number of nodes in the cluster.
logical; if TRUE (the default is FALSE), bootstrapping is done in parallel.
one of the supported cluster types for makeCluster
. Defaults to "SOCK"
.
This is the package's flagship function. It applies the Sklar's Omega methodology to nominal, ordinal, count, amount, balance, or percentage outcomes, and, if desired, produces confidence intervals. Parallel computing is supported, when applicable, and other measures (e.g., sparse matrix operations) are taken in the interest of computational efficiency.
If the level of measurement is nominal or ordinal, the scores (which must take values in \(1, \dots , K\)) are assumed to share a common categorical marginal distribution. A composite marginal likelihood (CML) approach is used for categorical scores. Only parametric bootstrap intervals are supported for categorical outcomes since sandwich estimation tends to lead to inflated standard errors.
If the scores are counts, control parameter dist
must be used to select a marginal distribution of "poisson"
or "negbinomial"
. For counts a distributional transform (DT) approximation of the likelihood is employed. Either bootstrap or sandwich intervals are available: confint = "bootstrap"
or confint = "asymptotic"
.
If the level of measurement is balance or amount or percentage, control parameter dist
must be used to select a marginal distribution from among "gaussian"
, "laplace"
, "t"
, and "empirical"
; or from among "gamma"
and "empirical"
; or from among "beta"
or "kumaraswamy"
, respectively. The method of maximum likelihood (ML) is used unless dist = "empirical"
, in which case conditional maximum likelihood is used, i.e., the copula parameters are estimated conditional on the sample distribution function of the scores. For the ML method, both bootstrap and asymptotic confidence intervals are available. When dist = "empirical"
, only bootstrap intervals are available.
When applicable, functions of appropriate sample quantities are used as starting values for marginal parameters, regardless of the level of measurement.
Hughes, J. (2018). Sklar's Omega: A Gaussian copula-based framework for assessing agreement. ArXiv e-prints, March.
Nissi, M. J., Mortazavi, S., Hughes, J., Morgan, P., and Ellermann, J. (2015). T2* relaxation time of acetabular and femoral cartilage with and without intra-articular Gd-DTPA2 in patients with femoroacetabular impingement. American Journal of Roentgenology, 204(6), W695.
# Fit a subset of the cartilage data, assuming a Laplace marginal distribution. Compute
# confidence intervals in the usual ML way (observed information matrix).
data(cartilage)
data.cart = as.matrix(cartilage)[1:100, ]
colnames(data.cart) = c("c.1.1", "c.2.1")
fit.lap = sklars.omega(data.cart, level = "balance", confint = "asymptotic",
control = list(dist = "laplace"))
summary(fit.lap)
# Now assume a noncentral t marginal distribution.
fit.t = sklars.omega(data.cart, level = "balance", confint = "asymptotic",
control = list(dist = "t"))
summary(fit.t)
Run the code above in your browser using DataLab