# Seasonal Decomposition per Area

### Description

Make a Seasonal Decomposition of Time Series by Loess per group of pixels

### Usage

1 | ```
STLperArea(TS, area, outfile = FALSE, Ystart, period = 36, fct = "mean", SGfilter = TRUE, nSG = "5,5", DSG = 0)
``` |

### Arguments

`TS` |
matrix or data.frame containing the time series (one row per time series). |

`area` |
factor which group pixels of the same area together (applying |

`outfile` |
name of the file where the decomposition is saved (extension ".pdf"). |

`Ystart` |
starting year of the analysis (in four-digit format). |

`period` |
number of observations per year. |

`fct` |
function to be applied to group points from the same |

`SGfilter` |
logical value indicating the application of Savitzky-Golay (SG) filter on time series By default SGfilter=TRUE |

`nSG` |
parameters of the windows of the SG filter. |

`DSG` |
parameters of the degree polynome of the SG filter. By default, DSG=0. |

### Value

The output of STLperArea is the time series computed (mean/max of the time series grouped by `area`

and with/without Savitzky-Golay filter).

### Author(s)

Romain Frelat and Bruno Gerard

### See Also

`TimeSeriesAnalysis`

,`BfastDec`

### Examples

1 2 3 4 5 6 7 8 9 10 | ```
#loading the data
data(SLPSAs_full)
#formating the time series
ts = normNDVI(SLPSAs_full$full, SLPSAs_full$maxNDVI)
#STLperArea
signal=STLperArea(ts, area = SLPSAs_full$full$name,
Ystart = SLPSAs_full$Ystart, period = SLPSAs_full$period)
``` |