Movatterモバイル変換


[0]ホーム

URL:


Mass Balance Regression

This package implements the Mass-balance-adjusted regressionalgorithm for sub-annual streamflow reconstruction. The algorithmimplements a penalty term to minimize the differences between the totalseasonal flow reconstruction and the annual flow reconstruction. Detailsare presented in Nguyen et al (2020).

Currently the package is only available on GitHub, but it will beavailable on CRAN soon.

To install the development from GitHub

install.packages('remotes')remotes::install_github('ntthung/mbr')

The package has two main functions,mb_reconstruction()for reconstruction, andcv_mb() for cross-validation.

Example reconstruction

fit<-mb_reconstruction(instQ = p1Seasonal,pc.list = pc3seasons,start.year =1750,lambda =1,log.trans =1:3)

Example cross-validation

# Create hold-out chunksset.seed(24)cvFolds<-make_Z(obs =1922:2003,nRuns =50,frac =0.25,contiguous =TRUE)# Run cross validationcv<-cv_mb(instQ = p1Seasonal,pc.list = pc3seasons,cv.folds = cvFolds,start.year =1750,lambda =1,log.trans =1:3,return.type ='metric means')# Round up to two decimal placescv[, (2:6):=lapply(.SD, round,digits =2), .SDcols=2:6][]

TypebrowseVignettes('mbr') for details.

References

Nguyen, H. T. T., Galelli, S., Xu, C., & Buckley, B. (2020).Multi-Proxy, Multi-Season Streamflow Reconstruction with Mass BalanceAdjustment. Earth and Space Science Open Archive, 22.https://doi.org/10.1002/essoar.10504791.1


[8]ページ先頭

©2009-2025 Movatter.jp