Learn R Programming

TestDimorph (version 0.3.0)

univariate: Univariate Analysis Of Sexual Dimorphism

Description

Calculation and visualization of the differences in degree sexual dimorphism between multiple populations using a modified one-way ANOVA and summary statistics as input

Usage

univariate(
  x,
  Pop = 1,
  es = FALSE,
  pairwise = FALSE,
  padjust = "none",
  ...,
  lower.tail = FALSE,
  N = NULL,
  digits = 4
)

Arguments

x

Tibble/data frame containing summary statistics, Default: NULL

Pop

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

es

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

pairwise

Logical; if TRUE runs multiple pairwise comparisons on different populations using Tg test, Default: FALSE

padjust

Method of p.value adjustment for multiple comparisons following p.adjust.methods, Default: 'none'

...

Additional arguments that could be passed to the Tg function

lower.tail

Logical; if TRUE probabilities are P[X <= x], otherwise, P[X > x]., Default: FALSE

N

Number of pairwise comparisons for p.adjust.methods, if left NULL it will follow the formula n(n-1)/2 where n is the number of populations , Default: NULL

digits

Number of significant digits, Default: 4

Value

Tibble of ANOVA results

Details

Data is entered as a tibble/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

References

konigsberg1991historicalTestDimorph timonov2014studyTestDimorph curate2017sexTestDimorph kranioti2009sexTestDimorph gulhan2015newTestDimorph

Examples

Run this code
# NOT RUN {
# Comparisons of femur head diameter in four populations
library(TestDimorph)
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)
df <-
cbind.data.frame(
   Pop = c('Turkish', 'Bulgarian', 'Greek', 'Portuguese '),
   m,
   f,
   M.mu,
   F.mu,
   M.sdev,
   F.sdev,
   stringsAsFactors = TRUE
)
univariate(df, pairwise = TRUE, padjust = 'bonferroni')
# }

Run the code above in your browser using DataLab