cutTrend: Actually do the cutting of trends, not simply setting it

Description Usage Arguments Note

View source: R/yieldPrev.R

Description

Two input parameters: It receives the edges to cut at: "begin" and "end".

The resulting trend are saved for their contribution to each year yield. If a trend ends before the time series data, it's results are preserved (and not increased) in the following years.

Usage

1
2
#called by sewTrends()
cutTrend(inizio, fine)

Arguments

inizio

is the lower year (included) of the trended lapse

fine

is the upper year (included) of the trended lapse

Note

The lower year included in the trend comes out as it get in. Considering that the trand is, at that time, experiencing the year of its start no changes actually occur.

Mathematically, the trend is accounted to be linear, and so described by the following:

$yield_n~unTrended= yield_n~Offical - ( year_n - year_startTrend ) * Trend_coefficient $

So that is clear that for n = startTrend (aka "inizio") it is that the trend and the unTrended versions of yield are the same.


FoscoV/foreYield documentation built on June 20, 2021, 7:17 p.m.