Learn R Programming

irg (version 0.1.6)

model_start: Model starting parameters

Description

Try guessing starting parameters for model_params and model_ndvi.

Usage

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'.

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.

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.

See Also

Other model: model_ndvi(), model_params()

Examples

Run this code
# NOT RUN {
# 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)
# }

Run the code above in your browser using DataLab