Description Usage Arguments Details Value Note
View source: R/fit_function_to_canopy_health_index.r
Fits a simple polynomial of the form y ~ scale*(x^rate)+interc, using nls, designed to be fit to a time series of a canopy health index that increases(?) in case of anomaly
1 2 | fit_simple_polynomial(data, scale. = 2.8, rate. = 1, interc. = 0,
plott = F, min.n.time. = 3)
|
data |
Data frame with two variables: im.dates, the independent variable, and DN.c, the dependent one (e.g. a VI or reflectance) |
scale. |
The starting value for the scale parameter in the nls estimation of the polynomial. It determines how high the values rise. Default is 2.8. |
rate. |
The starting value for the rate parameter in the nls estimation of the polynomial. **rate.** determines how abrupt the polynomial increases. **rate.** = 1 generates a linear increase. Default is 1. |
interc. |
The starting value for the intercept parameter in the nls estimation of the polynomial. Default is 1. |
plott |
Logical. Should results be plotted. Default is FALSE. |
min.n.time. |
The minimum nr of unique time observations for the model to run |
The current formulation of the model, combined with a scaling of the tim ethat makes it start at 0, forces the model through VI==interc at the first time observation the rate determines how abrupt the increase/decrease is. Rate=1 generates a linear increase Note that when the rate is 0, the model fails
An nls model
called by decline_trees_RS_analysis.r
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.