glsMs: GLS model selection for time series

Description Usage Arguments Value Examples

Description

GLS model selection for time series

Usage

1
glsMs(formula, data, diagnostic = F, list_models = F, ...)

Arguments

formula

An object of class formula describing the model to be fitted. Should be in the form series ~ time.

data

Input data.frame to be analyzed.

diagnostic

logical. Returns best fitting model from selection process if TRUE.

list_models

logical. Returns coefficients and AICc scores of all fitted models.

...

Other arguments may be passed to the gls.

Value

gls model object

Examples

1
2
3
4
5
6
7
8
#Generate series

m <- 0.1
x <- 1:30

data <- data.frame(x = x,
                  y = m*x + rnorm(30, sd = 0.35))
glsMs(formula = y ~ x, data = data, diagnostic = T)

NOAA-EDAB/ecotrend documentation built on June 14, 2019, 3:25 p.m.