pq_curve_slopes: P-Q signatures computations using P-Q cumulative curve

Description Usage Arguments Details Value

View source: R/pq_approach.R

Description

Compute the seasonal response change signatures: breackpoint date, first period slope (dry), second period slope (wet) and the intercepts associated with these two slopes (only there for plotting purposes).

Usage

1
2
3
4
5
6
7
pq_curve_slopes(
  PQ,
  start = 15,
  end = 183,
  bp = mean(c(start, end)),
  intercept = TRUE
)

Arguments

PQ

numeric vector. The cumulative precipitation minus cumulative streamflow (P-Q) vector.

start

numeric. The day number of the start of the period to search for a change of trend in P-Q.

end

numeric. The day number of the end of the period to search for a change of trend in P-Q.

bp

numeric value. The day number of the initial guess of threshold date

intercept

logical. Should the intercept be estimated (default: TRUE) or fixed to c(0, 0) (FALSE)?

Details

This function uses a segmented regression to find the dry and wet slopes. It also returns the intercepts of the two lines (which are not signatures) that can be used to plot the lines.

Value

A named vector of length 6 containing the breakpoint date ('bp'), breakpoint strength signature ('bp_strength'), the slope of the first (dry) period ('slp_dry') and its corresponding intercept ('b_dry'), the slope of the second (wet) period ('slp_wet') and its corresponding intercept ('b_wet')


IvanHeriver/hsa-R-package documentation built on Dec. 17, 2021, 11:32 p.m.