Skip to contents

Sexual Size Dimorphism Calculator: calculates the log ratio of sexual dimorphism, log(F/M) (adapted with alterations from Smith 1999). For the SDI (Lovich and Gibbons 1992), use SSDI.

Usage

SSDLog(Size, Sex, Base = exp(1), positiveM = F)

Arguments

Size

A numerical vector giving the size of each individual as a scalar quantity

Sex

A character or factor vector recording sex for each individual as 'm' or 'f', individuals should be in the same order as the Size vector

Base

the base for the logarithm (defaults to e = 2.718...)

positiveM

Smith 1999 has the log ratio with male biased being positive and female biased being negative (suited to mammalian research), can have the statistic operate in that manner by setting this to TRUE

Examples

data(pupfish)
with(pupfish, SSDLog(CS, Sex))
#> Warning: No data found for at least one sex. Sex variable must be formatted as 'm' and 'f' (see ConvertSexFormat)
#> [1] NA
with(pupfish, SSDLog(CS, Sex, positiveM = T))
#> Warning: No data found for at least one sex. Sex variable must be formatted as 'm' and 'f' (see ConvertSexFormat)
#> [1] NA