fit_AR_to_SAR: fit_AR_to_SAR

Description Usage Arguments Value Examples

View source: R/time_series.R

Description

Fit an AR model with the chosen order to each row of m using ar (so each row of m is treated as a single time series). The results are returned in a matrix whose columns are the resulting AR coefficients.

Usage

1

Arguments

m

A matrix.

order

An integer giving the order of the AR model. The default uses choose_order to choose automatically.

Value

A matrix of AR coefficients where each row corresponds to one row of m.

Examples

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

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