Skip to contents

SSD Calculation stratified by Groups

Usage

StratSSD(Size, Sex, Strata, log = F, 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'

Strata

A character or factor vector giving the factor by which we wish to divide individuals into groups before calculating SSD

log

Defaults to FALSE, in which case you use the Lovich and Gibbons SDI to calculate SSD, if changed to TRUE you use the log ratio.

...

If Log is TRUE, then you may pass arguments to the SSDLog function this way.

Examples

data(pupfish)
with(pupfish, StratSSD(CS, Sex, Pop, log = T, positiveM = T))
#> Warning: No data found for at least one sex. Sex variable must be formatted as 'm' and 'f' (see ConvertSexFormat)
#> Warning: No data found for at least one sex. Sex variable must be formatted as 'm' and 'f' (see ConvertSexFormat)
#> Log SSD Ratio by Strata
#> $Factors
#> [1] "Marsh"    "Sinkhole"
#> 
#> $SSD
#> [1] NA NA
#>