OpenDendro / dplPy

The Dendrochronology Program Library for Python
https://opendendro.org/python/
GNU General Public License v3.0
6 stars 8 forks source link

Add calculation of running rbar for use in chronology statistics and variance stabilization #42

Open kanchukaitis opened 1 year ago

kanchukaitis commented 1 year ago

rbar is typically calculated as 'the mean interseries correlation between all series from different trees' (Wigley et al. 1994). This can (and typically is) calculated over some common period that maximizes the number of years and series (e.g. the largest covering rectangle in a matrix of series (variables) and years (observations)). For use in deciding when there is sufficiently high, a running rbar can also be calculated for fixed windows of Y year overlapping by some number of years (e.g. 50 year windows lagged 25 years, or with 25 years of overlap; 100 year windows lagged 10 years at a time with 90 years of consecutive overlap, etc). dplR function is rwi.stats.running (https://github.com/cran/dplR/blob/master/R/rwi.stats.running.R) Wigley1984.pdf

AndyBunn commented 1 year ago

Alas though, people tend to prefer the “COFECHA” interseries correlation because the numbers are higher! In dplR that is the interseries.cor function. That stat is the correlation between a series and a master chronology.

From: Kevin Anchukaitis @.> Date: Thursday, March 30, 2023 at 4:10 PM To: OpenDendro/dplPy @.> Cc: Subscribed @.***> Subject: [OpenDendro/dplPy] Add calculation of running rbar for use in chronology statistics and variance stabilization (Issue #42)

rbar is typically calculated as 'the mean interseries correlation between all series from different trees' (Wigley et al. 1994). This can (and typically is) calculated over some common period that maximizes the number of years and series (e.g. the largest covering rectangle in a matrix of series (variables) and years (observations)). For use in deciding when there is sufficiently high, a running rbar can also be calculated for fixed windows of Y year overlapping by some number of years (e.g. 50 year windows lagged 25 years, or with 25 years of overlap; 100 year windows lagged 10 years at a time with 90 years of consecutive overlap, etc). dplR function is rwi.stats.running (https://github.com/cran/dplR/blob/master/R/rwi.stats.running.Rhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcran%2FdplR%2Fblob%2Fmaster%2FR%2Frwi.stats.running.R&data=05%7C01%7Cbunna%40wwu.edu%7Cc40aa1e63ddf4a11588b08db3173f351%7Cdc46140ce26f43efb0ae00f257f478ff%7C0%7C0%7C638158146447461582%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=q%2FR4aDd94YBDnQ4MwFWqhBJrl36a8gn6Kg5BBXNQGvs%3D&reserved=0) Wigley1984.pdfhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FOpenDendro%2FdplPy%2Ffiles%2F11116825%2FWigley1984.pdf&data=05%7C01%7Cbunna%40wwu.edu%7Cc40aa1e63ddf4a11588b08db3173f351%7Cdc46140ce26f43efb0ae00f257f478ff%7C0%7C0%7C638158146447461582%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=KsAuwNRKrTu7nlaUH7f4vO3deFaaQzXvP7uF6xfMVhk%3D&reserved=0

— Reply to this email directly, view it on GitHubhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FOpenDendro%2FdplPy%2Fissues%2F42&data=05%7C01%7Cbunna%40wwu.edu%7Cc40aa1e63ddf4a11588b08db3173f351%7Cdc46140ce26f43efb0ae00f257f478ff%7C0%7C0%7C638158146447617825%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=PxmlVrSN9X4JJIGLZKxGR%2FgwhJFHFWwQzaWD1ekJwXA%3D&reserved=0, or unsubscribehttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAC7UCXLHJANJWCGPXI5OW53W6YHGHANCNFSM6AAAAAAWN5S3WM&data=05%7C01%7Cbunna%40wwu.edu%7Cc40aa1e63ddf4a11588b08db3173f351%7Cdc46140ce26f43efb0ae00f257f478ff%7C0%7C0%7C638158146447617825%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=DHzHJZhfIBdF%2FgoTmZ6cSPl77ub8JWWnx4MbAJk%2F3sQ%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.***>

kanchukaitis commented 1 year ago

Indeed - we actually need both - the COFECHA version (the average of all the correlations between individual series and the mean of the remaining series) and the ARSTAN version (the mean of all the correlations between all individual series over a given period). I think the stats are already there for the COFECHA version (@ifeoluwaale calculates these as part of the cross-dating functions, I think?) - the ARSTAN way can build on the windowing used for crossdating too, so hopefully neither of these is a big lift. @Andy - do you have an efficient way to calculate the best common interval? This is pretty fast in FORTRAN, but doing it as a loop in a non-compiled language will be slow.