model_start: Model starting parameters

Description Usage Arguments Details Value See Also Examples

View source: R/model.R

Description

Try guessing starting parameters for model_params and model_ndvi.

Usage

1
model_start(DT, id = "id", year = "yr")

Arguments

DT

filtered and scaled data.table of NDVI time series. Expects columns 'scaled' and 't' are present.

id

id column. default is 'id'. See details.

year

year column name. default is 'yr'.

Details

The id argument is used to split between sampling units. This may be a point id, polygon id, pixel id, etc. depending on your analysis. This should match the id provided to filtering functions.

Value

The input DT data.table appended with xmidS_start and xmidA_start columns. Note - we curently do not attempt to guess appropriate starting values for scalS and scalA.

See Also

Other model: model_ndvi(), model_params()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Load data.table
library(data.table)

# Read in example data
ndvi <- fread(system.file("extdata", "sampled-ndvi-MODIS-MOD13Q1.csv", package = "irg"))

# Filter and scale NDVI time series
filter_ndvi(ndvi)
scale_doy(ndvi)
scale_ndvi(ndvi)

# Guess starting parameters for xmidS and xmidA
model_start(ndvi)

irg documentation built on Dec. 22, 2021, 9:06 a.m.