choose_order: choose_order

Description Usage Arguments Value Examples

View source: R/time_series.R

Description

Take a random sample (of size sample_size) of the rows of m, then fit an AR model to each row in the sample, using AIC to determine the optimal order. Return the largest order across all sampled rows.

Usage

1
choose_order(m, sample_size = 1000L)

Arguments

m

A matrix.

sample_size

An integer smaller than nrow(m).

Value

An integer.

Examples

1
2
3
filepath <- system.file("extdata", "MG_CC_sub_norm_testclip.tif", package="rsar")
m <- load_SAR_matrix(filepath)
order <- choose_order(m)

frycast/rsar documentation built on Sept. 4, 2020, 3:52 a.m.