Skip to contents

Dot Chart

Usage

jjdotplotstats(
  data,
  dep,
  group,
  grvar,
  typestatistics = "parametric",
  effsizetype = "biased",
  centralityplotting = FALSE,
  centralitytype = "parametric",
  mytitle = "",
  xtitle = "",
  ytitle = "",
  originaltheme = FALSE,
  resultssubtitle = TRUE,
  testvalue = 0,
  bfmessage = TRUE,
  conflevel = 0.95,
  k = 2,
  testvalueline = FALSE,
  centralityparameter = "mean",
  centralityk = 2
)

Arguments

data

The data as a data frame.

dep

A continuous numeric variable for which the distribution will be displayed across different groups using dot plots.

group

A categorical variable that defines the groups for comparison. Each level will be displayed as a separate group in the dot plot.

grvar

Optional grouping variable to create separate dot plots for each level of this variable (grouped analysis).

typestatistics

Type of statistical test to perform. 'parametric' for t-tests, 'nonparametric' for Mann-Whitney U test, 'robust' for robust tests, 'bayes' for Bayesian analysis.

effsizetype

Type of effect size calculation for parametric tests. 'biased' for Cohen's d, 'unbiased' for Hedge's g, 'eta' for eta-squared, 'omega' for omega-squared.

centralityplotting

.

centralitytype

.

mytitle

.

xtitle

.

ytitle

.

originaltheme

.

resultssubtitle

.

testvalue

A number specifying the value of the null hypothesis for one-sample tests.

bfmessage

Whether to display Bayes Factor in the subtitle when using Bayesian analysis.

conflevel

Confidence level for confidence intervals.

k

Number of decimal places for displaying statistics in the subtitle.

testvalueline

Whether to display a vertical line at the test value.

centralityparameter

Which measure of central tendency to display as a vertical line.

centralityk

Number of decimal places for centrality parameter label.

Value

A results object containing:

results$todoa html
results$plot2an image
results$plotan image

Examples

# \donttest{
# Load test data
data(jjdotplotstats_test_data)
#> Warning: data set ‘jjdotplotstats_test_data’ not found

# Basic dot plot
jjdotplotstats(
  data = jjdotplotstats_test_data,
  dep = "crp_level",
  group = "disease_severity",
  typestatistics = "parametric"
)
#> Error: object 'jjdotplotstats_test_data' not found

# Grouped dot plot by treatment center
jjdotplotstats(
  data = jjdotplotstats_test_data,
  dep = "esr_level",
  group = "disease_severity",
  grvar = "treatment_center",
  typestatistics = "nonparametric",
  centralityplotting = TRUE
)
#> Error: object 'jjdotplotstats_test_data' not found
# }