confint.gower {goweragreement} | R Documentation |
Compute a credible interval for a Bayesian Gower fit.
Description
Compute a credible interval for a Bayesian Gower fit.
Usage
## S3 method for class 'gower'
confint(object, parm = "mu", level = 0.95, ...)
Arguments
object |
an object of class |
parm |
always ignored since there is only one parameter, mu. |
level |
the desired confidence level for the interval. The default is 0.95. |
... |
additional arguments. These are passed to |
Details
This function computes a credible interval for mu, the agreement parameter.
This function uses the bootstrap sample to compute a credible interval. If type = "HPD"
is not an element of ..., the lower and upper limits of the interval are appropriate quantiles of the bootstrap sample. Otherwise the limits are for an HPD interval.
Value
A vector with entries giving the lower and upper limits of the interval. These will be labelled as (1 - level) / 2 and 1 - (1 - level) / 2 if the quantile method was used. They will be labeled "Lower" and "Upper" if the interval is an HPD interval.
See Also
Examples
# Fit the liver data, using the mean distance for each row of the data matrix.
# The range (which is equal to 4) must be passed to \code{\link{gower.agree}}
# since these data are ordinal and the L1 distance function is used. We assume
# a one-way sampling design for these data, i.e., units are random and coders
# are fixed. Also compute a 95\% credible interval using the quantile method
# and then the HPD method.
data(liver)
liver = as.matrix(liver)
fit = gower.agree(liver, data.type = "ordinal", range = 4)
confint(fit)
confint(fit, type = "HPD")