Learn R Programming

s2dverification (version 2.4.0)

Trend: Computes Trends

Description

Computes the trend along the posTR dimension of the matrix var by least square fitting, and the associated an error interval. Provide also the detrended data. The confidence interval relies on a student-T distribution.

Usage

Trend(var, posTR = 2, interval = 1)

Arguments

Value

$trendSame dimensions as var except along the posTR dimension which is replaced by a length 3 dimension, corresponding to the lower limit of the 95% confidence interval, trends and the upper limit of the 95% confidence interval for each point of the matrix along all the other dimensions.$detrendedSame dimensions as var with linearly detrended var along the posTR dimension.

Examples

Run this code
# Load sample data as in Load() example:
example(Load)
months_between_startdates <- 60
trend <- Trend(sampleData$obs, 3, months_between_startdates)
PlotVsLTime(trend$trend, toptitle = "trend", ytitle = "K / (5 year)",
            monini = 11, limits = c(-1,1), listexp = c('CMIP5 IC3'),
            listobs = c('ERSST'), biglab = FALSE, hlines = 0,
            fileout = 'tos_obs_trend.eps')
PlotAno(trend$detrended, NULL, startDates, 
        toptitle = 'detrended anomalies (along the startdates)', ytitle = 'K',
        legends = 'ERSST', biglab = FALSE, fileout = 'tos_detrended_obs.eps')

Run the code above in your browser using DataLab