AnnualClim.Cal: Antecedental accumulation calculator for the annual max VI...

Description Usage Arguments Value Author(s) Examples

View source: R/AnnaulClimCal.R

Description

Takes the Annual Max VI Time Series, the VI.index and tables of every possible accumulation period and offset period for preciptation and Temperature (optional). A OLS is calculated lm for every combination of VI ~ rainfall. If temperature is provided The formula is (VI ~ rainfall + temperature). By defualt, this function preferences those results where slope>0 (increase in rainfall causes an increase in vegetation), returning the rainfall accumulation that has the highest R-squared and a positive slope. If no combinations produce a positive slope then the one with the highest Rsquared is returned. TO DO: non peramtric and other variables

Usage

1
2
3
4
5
6
7
8
9
AnnualClim.Cal(
  anu.VI,
  VI.index,
  ACP.table,
  ACT.table = NULL,
  Breakpoint = FALSE,
  allow.negative = FALSE,
  allowneg.retest = FALSE
)

Arguments

anu.VI

The annual (Growing season) max VI. Must be a object of class 'ts' without NA's. if anu.VI=FALSE, it will be calculated from the CTSR.VI using AnMaxVI.

VI.index

the index of the CTSR.VI ts that the anu.VI values occur at. Must be the same length as anu.VI. NOTE. R indexs from 1 rather than 0. if VI.index=FALSE, it will be calculated from the CTSR.VI using AnMaxVI.

ACP.table

A table of every combination of offset period and accumulation period.for precipitation ACP.table can be calculated using the climate.accumulator.

ACT.table

A table of every combination of offset period and accumulation period.for temperature ACP.table can be calculated using the climate.accumulator.

Breakpoint

Used when calcualting rf.bf and rf.af for ts with breakpoints in the VPR. See CHOW

allow.negative

If true, will not preference positive slope in either CTSR or VI calculations. default=FALSE is set because negative associations between rainfall and vegetation in water limited ecosystems is unexpected If temperature data is included then this paramter is forced to TRUE.

allowneg.retest

default=FALSE If temperature data is provided but found to not be significant then a retest is performed. This paramter is to allow negative on re-test.

Value

summary a Matrix containing "slope", "intercept", "p.value", "R^2.Value", "Break.Height", "Slope.Change" of the lm of VI ~ rainfall. If Breakpoint, summary covers both rf.b4 and rf.af.

acu.RF (aka. annual.precip)The optimal accumulated rainfall for anu.VI. Mut be a object of class 'ts' and of equal length to anu.VI. It is caculated from the ACP.table by finding the acp and osp that has the largest R^2 value. lm(anu.VI ~ rainfall)

acu.TM (aka, annual.temp) The optimal accumulated rainfall for anu.T<. Mut be a object of class 'ts' and of equal length to anu.VI. It is caculated from the ACT.table by finding the tacp and tosp that has the largest R^2 value. lm(anu.VI ~ rainfall+temperature)

rf.b4 The optimal acumulated rainfall before the Breakpoint

rf.af The Optimally accumulated rainfall after the Breakpoint

tm.b4 The optimal acumulated temperature before the Breakpoint

tm.af The Optimally accumulated temperature after the Breakpoint

osp The offest period for the annual max time series rainfall

acp The accumulation period for the annual max time series rainfall

tosp The offest period for the annual max time series temperature

tacp The accumulation period for the annual max time series temperature

Author(s)

Arden Burrell, arden.burrell@unsw.edu.au

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
ARC <- AnnualClim.Cal(stdRESTREND$max.NDVI, stdRESTREND$index, stdRESTRENDrfTab)
print(ARC)
## Not run: 

#Test the complete time series for breakpoints
VPRBFdem <- VPR.BFAST(segVPRCTSR$cts.NDVI, segVPRCTSR$cts.precip)
bp<-as.numeric(VPRBFdem$bkps)

#test the significance of the breakpoints
reschow <- CHOW(segVPR$max.NDVI, segVPR$acum.RF, segVPR$index, bp)
brkp <- as.integer(reschow$bp.summary["yr.index"])
ARCseg <-AnnualClim.Cal(segVPR$max.NDVI, segVPR$index, segVPRrfTab, Breakpoint = brkp)
print(ARCseg)

## End(Not run)

TSS.RESTREND documentation built on Aug. 3, 2020, 1:07 a.m.