Skip to contents

Function for extracting the means and medians of resampled values from a SSDtest object as a matrix.

Usage

centers(x)

Arguments

x

An object of class SSDtest.

Value

A matrix containing the means and medians of resampled distributions in x.

Examples

# Standard significance test with one fossil sample, sampling without replacement
test_faux_uni <- SSDtest(
     fossil=list("Fauxil sp. 1"=fauxil[fauxil$Species=="Fauxil sp. 1", "FHSI"]),
     comp=list("G. gorilla"=apelimbart[apelimbart$Species=="Gorilla gorilla", "FHSI"],
               "H. sapiens"=apelimbart[apelimbart$Species=="Homo sapiens", "FHSI"],
               "P. troglodytes"=apelimbart[apelimbart$Species=="Pan troglodytes", "FHSI"],
               "H. lar"=apelimbart[apelimbart$Species=="Hylobates lar", "FHSI"]),
     fossilsex=NULL,
     compsex=list("G. gorilla"=apelimbart[apelimbart$Species=="Gorilla gorilla", "Sex"],
                  "H. sapiens"=apelimbart[apelimbart$Species=="Homo sapiens", "Sex"],
                  "P. troglodytes"=apelimbart[apelimbart$Species=="Pan troglodytes", "Sex"],
                  "H. lar"=apelimbart[apelimbart$Species=="Hylobates lar", "Sex"]),
     methsUni=c("MMR", "BDI"),
     limit=1000,
     nResamp=100)
#> Warning: The number of possible combinations (3049501) exceeds the user-specified limit. Monte Carlo sampling will be used.
#> Warning: The number of possible combinations (3049501) exceeds the user-specified limit. Monte Carlo sampling will be used.
#> Warning: The number of possible combinations (3049501) exceeds the user-specified limit. Monte Carlo sampling will be used.
#> Warning: The number of possible combinations (3049501) exceeds the user-specified limit. Monte Carlo sampling will be used.
centers(test_faux_uni)
#>   methodUni  center median.Fauxil sp. 1 mean.Fauxil sp. 1 median.G. gorilla
#> 1       MMR geomean           0.2311571         0.2311571         0.1805543
#> 2       BDI geomean           0.1793344         0.1793344         0.1595928
#>   mean.G. gorilla median.H. sapiens mean.H. sapiens median.P. troglodytes
#> 1       0.1829887         0.1562502       0.1527756             0.1053043
#> 2       0.1598203         0.1379936       0.1358323             0.1004279
#>   mean.P. troglodytes median.H. lar mean.H. lar
#> 1           0.1121774    0.06694619  0.06759924
#> 2           0.1009003    0.05737743  0.05762733