Skip to contents

Enhanced partial correlation analysis toolkit with BlueSky integration for comprehensive correlation analysis while controlling for confounding variables. Includes partial and semi-partial correlations, robust error handling, multiple variable support, and advanced statistical inference. Perfect for clinicopathological research where controlling for covariates is essential.

Usage

partialcorrelation(
  data,
  vars,
  controls,
  method = "pearson",
  ci = TRUE,
  ciWidth = 95,
  sig = TRUE,
  sigLevel = 0.05,
  matrixPlot = FALSE,
  showZeroOrder = TRUE,
  correlationType = "partial",
  multipleComparison = "none",
  robustErrorHandling = TRUE,
  showDiagnostics = FALSE,
  detailedOutput = FALSE,
  bootstrapCI = FALSE,
  bootstrapSamples = 1000,
  showEffectSizes = TRUE,
  assumptionChecks = FALSE,
  clinicalInterpretation = TRUE,
  showRecommendations = FALSE,
  bluesky_integration = TRUE,
  comprehensive_output = FALSE
)

Arguments

data

.

vars

.

controls

.

method

.

ci

.

ciWidth

.

sig

.

sigLevel

.

matrixPlot

.

showZeroOrder

.

correlationType

Type of correlation analysis (BlueSky BSkyPartialSemiCorrelations feature)

multipleComparison

Method for correcting p-values for multiple comparisons

robustErrorHandling

Use BlueSky-style error handling with graceful degradation

showDiagnostics

Display diagnostic information about computations and assumptions

detailedOutput

Include comprehensive statistical details and interpretations

bootstrapCI

Calculate bootstrap confidence intervals for correlations

bootstrapSamples

Number of bootstrap samples for confidence intervals

showEffectSizes

Include Cohen's interpretation of correlation effect sizes

assumptionChecks

Perform and report assumption checks for correlation analysis

clinicalInterpretation

Provide clinical context and interpretation guidance

showRecommendations

Provide recommendations based on analysis results

bluesky_integration

Use BlueSky R statistical environment features

comprehensive_output

Include comprehensive statistical details and diagnostics

Value

A results object containing:

results$instructionsa html
results$partialCorra table
results$zeroOrdera table
results$semipartialCorra table
results$diagnosticsComputational diagnostics and assumption checks
results$assumptionResultsResults of statistical assumption testing
results$comprehensiveAnalysisSummaryEnhanced statistical summary with BlueSky integration
results$recommendationsa html
results$clinicalInterpretationGuidea html
results$methodsExplanationa html
results$plotan image
results$partialCorrelationNetworkan image
results$effectSizePlotan image

Tables can be converted to data frames with asDF or as.data.frame. For example:

results$partialCorr$asDF

as.data.frame(results$partialCorr)