movartrend: Compute trends on NetCDF objects

Description Usage Arguments Examples

View source: R/movartrend.R

Description

Compute trends on NetCDF objects where movartrend computes moving linear regressions on the time series, trendresid and trendcov compute simple linear regression with the latter returning the covariance matrix of the standard errors (i.e. for multivariate analyses).

The function convertx is used to expand an object of type NetCDF to fit another object of type NetCDF. The standard use case would be to expand a NetCDF object with ensemble mean global mean temperature to an object with multiple models and simulations. convertx is used in movartrend to convert a potential predictor for the regression.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
movartrend(data, trndln, x = NULL, missthresh = 0.8, robust = FALSE,
  gaps = FALSE, plotable = TRUE, resid = FALSE)

trendcov(data, x = NULL, missthresh = 0.8)

trendresid(data, x = NULL, missthresh = 0.8)

artrend(data, x = NULL, missthresh = 0.8)

convertx(x = NULL, data, dat = data)

Arguments

data

object of type NetCDF containing the time series

trndln

length of trend to be computed (in years if time attribute is present)

x

optional covariate to be used as predictor

missthresh

threshold to indicate what fraction of non-missing values is at least required to run the regression

robust

logical, should robust regression be used?

gaps

logical, should gaps be allowed for?

plotable

logical, should output be rearrange to make it plotable?

resid

logical, should residuals of regression be returned?

x

object of type NetCDF to be expanded to fit dimensions of dat

data

object of type NetCDF to be used to match attributes (e.g. time steps etc.)

dat

object to infer dimensions of output

Examples

1
2
## result should be roughly 1
print(movartrend(t(1:100 + rnorm(100, sd=10)), trndln=100)$trend[1])

jonasbhend/geoutils documentation built on May 19, 2019, 7:27 p.m.