Aggregate | R Documentation |
From the input run-off triangle (weekly, monthly, quarterly, etc.) the function creates another triangle on a higher level of aggregation.
Aggregate(triangle, freq = 4)
triangle |
The original run-off (incremental) triangle. It should be a squared matrix (let denote by m its dimension m). |
freq |
The frequency to be considered in the aggregation. The default value is 4, to be used to construct a yearly run-off triangle from a quarterly |
.
If the input triangle does not consist of complete periods (for example a quarterly triangle with only three quarters in the last year), then the last (lower level) periods will been removed to get full aggregated periods.
A run-off triangle in the specified higher level of aggregation.
M.D. Martinez-Miranda, J.P. Nielsen and R. Verrall
get.incremental
,get.cumulative
,Plot.triangle
## A dummy example: a run-off triangle with 5*4=20 quarters m<-20 my.square<-matrix(1,m,m) # Now my.triangle is a quarterly triangle (the upper left triangle from my.square) my.triangle<-my.square my.triangle[row(my.square)+col(my.square)>(m+1)]<-NA my.yearly.triangle<-Aggregate(my.triangle) list(original=my.triangle,yearly=my.yearly.triangle)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.