diffMC Function

Jeffrey A. Hostetler, Michael T. Hallworth

2024-01-12

The MigConnectivity package, which quantifies the strength of migratory connectivity, was developed to facilitate quantitative comparisons of migratory connectivity across studies, data types, and taxa while accounting for uneven sampling and the bias inherent to different data types for studying migratory movement. Below, we use the new diffMC function to compare MC estimates for the Yellow Warbler and the Ovenbird. To streamline the vignette and to avoid redundancy we load the results from the estStrength and the Worked Example vignettes.

# Read in the estStrength results for OVEN 
OVEN_mc <- readRDS("OVENmc.rds")
  
# Read in the estStrength results for YEWA
YEWA_mc <- readRDS("YEWAmc.rds")

Compare MC between Ovenbirds and Yellow Warblers

diffStrength(estimates = list(Ovenbird = OVEN_mc,
                              Yellow_Warbler = YEWA_mc))
#> $meanDiff
#> Ovenbird - Yellow_Warbler 
#>                 0.2566347 
#> 
#> $medianDiff
#> Ovenbird - Yellow_Warbler 
#>                 0.2747773 
#> 
#> $seDiff
#> Ovenbird - Yellow_Warbler 
#>                0.08314755 
#> 
#> $simpleCI
#>      Ovenbird - Yellow_Warbler
#> [1,]                0.07361071
#> [2,]                0.37418885
#> 
#> $bcCI
#>      Ovenbird - Yellow_Warbler
#> [1,]                0.06727343
#> [2,]                0.36344487
#> 
#> $sampleDiff
#> [1] NA
#> 
#> $alpha
#> [1] 0.05
#> 
#> attr(,"class")
#> [1] "diffMC"              "diffMigConnectivity"