Learn R Programming

TestDimorph (version 0.3.5)

t_greene: Greene t test of Sexual Dimorphism

Description

Calculation and visualization of the differences in degree sexual dimorphism between two populations using summary statistics as input.

Usage

t_greene(
  x,
  Pop = 1,
  es = FALSE,
  plot = FALSE,
  ...,
  alternative = c("two.sided", "less", "greater"),
  padjust = p.adjust.methods,
  letters = FALSE,
  digits = 4,
  sig.level = 0.05
)

Arguments

x

A data frame containing summary statistics.

Pop

Number of the column containing populations' names, Default: 1

es

Logical; if TRUE effect size is included in the output , Default: FALSE

plot

Logical; if TRUE graphical matrix of p values, Default: FALSE

...

additional arguments that can be passed to corrplot function.

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided", "greater" or "less".

padjust

Method of p.value adjustment for multiple comparisons following p.adjust.methods

letters

Logical; if TRUE returns letters for pairwise comparisons where significantly different populations are given different letters, Default: FALSE'

digits

Number of significant digits, Default: 4

sig.level

Critical p.value, Default: 0.05

Value

Tibble of t.test results

Details

The input is a data frame of summary statistics where the column containing population names is chosen by position (first by default), other columns of summary data should have specific names (case sensitive) similar to baboon.parms_df

See Also

multcompView::multcompLetters() corrplot::corrplot()

Examples

Run this code
# NOT RUN {
# Comparisons of femur head diameter in four populations
library(TestDimorph)
df <- data.frame(
  Pop = c("Turkish", "Bulgarian", "Greek", "Portuguese "),
  m = c(150.00, 82.00, 36.00, 34.00),
  f = c(150.00, 58.00, 34.00, 24.00),
  M.mu = c(49.39, 48.33, 46.99, 45.20),
  F.mu = c(42.91, 42.89, 42.44, 40.90),
  M.sdev = c(3.01, 2.53, 2.47, 2.00),
  F.sdev = c(2.90, 2.84, 2.26, 2.90)
)
t_greene(
  df,
  plot = TRUE,
  method = "ellipse",
  padjust = "none",
  type = "lower",
  col = c(
    "#AEB6E5",
    "#B1A0DB",
    "#B788CD",
    "#BC6EB9",
    "#BC569E",
    "#B6407D",
    "#A93154"
  ),
  tl.cex = 0.8,
  tl.col = "black",
  insig =
    "label_sig",
  tl.srt = 0.1,
  pch.cex = 2.5,
  tl.pos = "ld",
  win.asp = 1,
  number.cex = 0.5,
  na.label = "NA"
)
# }

Run the code above in your browser using DataLab