mw.2period: Mann-Whitney resurvey test for range shifts

Description Usage Arguments

Description

Use before-and-after comparisons to test for range shifts. Takes the top n unique points from specified variable (elevation, latitude, etc.) and does an unpaired Mann-Whitney test. Returns absolute difference in means (not scaled to time period) and the p-value from the MW test.

Usage

1
mw.2period(dataset, resp = "elev", pre.years, post.years, n.mw = 10)

Arguments

dataset

A dataset frame containing columns "Year" and "Species" at a minimum as well as the response variable.

resp

A variable within the dataset that is being tracked, such as elevation, or latitude. (If latitude is used, just note to convert it back to km manually, it's not currently automatic in here.)

pre.years

An interval entered as "c(year1,year2)"

post.years

An interval entered as "c(year1,year2)"

n.mw

The number of unique points to be used in the Mann-Whitney comparison. It defauls to 10. Remember that if you use negative you can do southern or lower elevations easy


cjcarlson/rangeshifts documentation built on June 17, 2019, 7:32 a.m.