Optimise Sinus Fit for Variable Period

optimise_sinus_variablePeriod(
  temp_df,
  optFunc = opt_func,
  opt_limits = c(100, 500),
  opt_tolerance = 0.001,
  opt_debug = FALSE
)

Arguments

temp_df

data frame with temperature data and columns "date" (YYYY-MM-DD) and "value"

optFunc

optimisation function (default: opt_func )

opt_limits

optimisation limits for "period_length" (default: c(100,500))

opt_tolerance

(default: 0.001)

opt_debug

show debug information (default: FALSE)

Value

list with fit parameters ("paras"), goodness-of-fit values ("gof"), special points, i.e. min/max/turning-points ("points), fit model ("lm_model") and input data ("data")

References

https://stats.stackexchange.com/questions/77543/how-do-i-get-the-amplitude-and-phase-for-sine-wave-from-lm-summary