Learn R Programming

matrixCorr (version 0.12.3)

estimate: Access MatrixCorr Estimates, Confidence Intervals, and Tidy Results

Description

Lightweight accessors for matrixCorr result objects. These functions do not change the stored object structure; they just provide a stable way to extract the estimate matrix, confidence intervals, or a pairwise data frame without reading attributes directly.

Usage

estimate(x, ...)

tidy(x, ...)

ci(x, ...)

# S3 method for corr_result estimate(x, ...)

# S3 method for summary.corr_result estimate(x, ...)

# S3 method for summary.matrixCorr estimate(x, ...)

# S3 method for corr_result coef(object, ...)

# S3 method for corr_result ci(x, ...)

# S3 method for default ci(x, ...)

# S3 method for ba ci(x, ...)

# S3 method for ba_matrix ci(x, ...)

# S3 method for ba_repeated ci(x, ...)

# S3 method for ba_repeated_matrix ci(x, ...)

# S3 method for ccc ci(x, ...)

# S3 method for ccc_ci ci(x, ...)

# S3 method for ccc_glmm ci(x, ...)

# S3 method for cia ci(x, ...)

# S3 method for cia_ci ci(x, ...)

# S3 method for cia_rm ci(x, ...)

# S3 method for cohen_kappa ci(x, ...)

# S3 method for gwet_ac ci(x, ...)

# S3 method for icc ci(x, ...)

# S3 method for icc_overall ci(x, ...)

# S3 method for icc_rm_reml ci(x, ...)

# S3 method for krippendorff_alpha ci(x, ...)

# S3 method for multirater_kappa ci(x, ...)

# S3 method for partial_corr ci(x, ...)

# S3 method for prob_agree ci(x, ...)

# S3 method for rmcorr ci(x, ...)

# S3 method for rmcorr_matrix ci(x, ...)

# S3 method for weighted_kappa ci(x, ...)

# S3 method for partial_corr estimate(x, ...)

# S3 method for ba estimate(x, ...)

# S3 method for ba_matrix estimate(x, ...)

# S3 method for ba_repeated estimate(x, ...)

# S3 method for ba_repeated_matrix estimate(x, ...)

# S3 method for ccc_glmm estimate(x, ...)

# S3 method for ccc_glmm coef(object, ...)

# S3 method for default estimate(x, ...)

# S3 method for corr_result tidy(x, diag = FALSE, triangle = c("upper", "lower", "full"), ...)

# S3 method for summary.corr_result tidy(x, ...)

# S3 method for summary.matrixCorr tidy(x, ...)

# S3 method for partial_corr tidy(x, diag = FALSE, triangle = c("upper", "lower", "full"), ...)

# S3 method for ba tidy(x, ...)

# S3 method for ba_matrix tidy(x, ...)

# S3 method for ba_repeated tidy(x, ...)

# S3 method for ba_repeated_matrix tidy(x, ...)

# S3 method for default tidy(x, diag = FALSE, triangle = c("upper", "lower", "full"), ...)

# S3 method for corr_result confint(object, parm, level = NULL, ...)

# S3 method for summary.corr_result confint(object, parm, level = NULL, ...)

# S3 method for summary.matrixCorr confint(object, parm, level = NULL, ...)

# S3 method for ba confint(object, parm, level = NULL, ...)

# S3 method for ba_repeated confint(object, parm, level = NULL, ...)

# S3 method for ba_matrix confint(object, parm, level = NULL, ...)

# S3 method for ba_repeated_matrix confint(object, parm, level = NULL, ...)

# S3 method for ccc confint(object, parm, level = NULL, ...)

# S3 method for ccc_ci confint(object, parm, level = NULL, ...)

# S3 method for ccc_glmm confint(object, parm, level = NULL, ...)

# S3 method for chatterjee_xi_scalar confint(object, parm, level = NULL, ...)

# S3 method for cia confint(object, parm, level = NULL, ...)

# S3 method for cia_ci confint(object, parm, level = NULL, ...)

# S3 method for cia_rm confint(object, parm, level = NULL, ...)

# S3 method for cohen_kappa confint(object, parm, level = NULL, ...)

# S3 method for gwet_ac confint(object, parm, level = NULL, ...)

# S3 method for icc confint(object, parm, level = NULL, ...)

# S3 method for icc_overall confint(object, parm, level = NULL, ...)

# S3 method for icc_rm_reml confint(object, parm, level = NULL, ...)

# S3 method for krippendorff_alpha confint(object, parm, level = NULL, ...)

# S3 method for multirater_kappa confint(object, parm, level = NULL, ...)

# S3 method for prob_agree confint(object, parm, level = NULL, ...)

# S3 method for partial_corr confint(object, parm, level = NULL, ...)

# S3 method for rmcorr confint(object, parm, level = NULL, ...)

# S3 method for rmcorr_matrix confint(object, parm, level = NULL, ...)

# S3 method for weighted_kappa confint(object, parm, level = NULL, ...)

Value

estimate() returns the primary estimate in its natural shape: a matrix-like result returns a matrix, an edge-list result returns a data frame, and a scalar result returns a numeric value.

tidy() returns a data frame with columns such as item1, item2, estimate, lwr, upr, diagnostics, and inferential quantities when available.

confint() returns a data frame containing confidence limits when they are available.

ci() returns the stored confidence-interval payload. It is mainly a structured alternative to reading attr(x, "ci") directly.

Arguments

x, object

A matrixCorr result, summary object, or scalar result.

...

Additional arguments passed to methods.

diag

Logical; include diagonal entries for matrix-style results. Default is FALSE.

triangle

For matrix-style correlation results, which triangle to return from tidy(): "upper" (default), "lower", or "full". The default avoids duplicate pairs for symmetric matrices; directed matrices use all off-diagonal entries unless triangle is supplied explicitly.

parm

Ignored; included for compatibility with stats::confint().

level

Confidence level requested by stats::confint(). MatrixCorr objects store pre-computed intervals; if level differs from the stored level, recompute the original object with the desired level.

Author

Thiago de Paula Oliveira

Examples

Run this code
X <- cbind(a = 1:10, b = 1:10 + rnorm(10), c = rnorm(10))
fit <- pearson_corr(X, ci = TRUE)

estimate(fit)
tidy(fit)
ci(fit)
confint(fit)

Run the code above in your browser using DataLab