t_greene: Greene t test of Sexual Dimorphism

Description Usage Arguments Details Value See Also Examples

View source: R/t_greene.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
t_greene(
  x,
  Pop = 1,
  es = "none",
  plot = FALSE,
  ...,
  alternative = c("two.sided", "less", "greater"),
  padjust = "none",
  letters = FALSE,
  digits = 4,
  CI = 0.95
)

Arguments

x

A data frame containing summary statistics.

Pop

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

es

Type of effect size either "d" for Cohen's d,"g" for Hedge's g or "none" , Default:"none".

plot

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

...

additional arguments that can be passed to [corrplot][corrplot::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 Default: "none".

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

CI

confidence interval coverage takes value from 0 to 1, Default: 0.95.

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

Value

data frame of t.test results

See Also

[multcompView::multcompLetters()] [corrplot::corrplot()]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# 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"
)

bassam-abulnoor/TestDimorph documentation built on Jan. 29, 2021, 8:21 a.m.