This function converts the estimated parameters from the non-linear least squares (NLS) model fit to the appropriate parameter space corresponding to the cosine model proposed by Balasse et al (2012).

convertParameters(curve)

Arguments

curve

A fitted model object from nls function. The fitted model should have the following parameter estimates - amplitude, intercept, frequency, phase.

Value

A list containing the following components:

amplitude

estimated amplitude

intercept

estimated intercept

x0

delay of the data

X

period of the data

birth

birth seasonality estimate

Examples

armenia_split = split(armenia,f = armenia$ID) curve = sineFit(armenia_split[[1]],method = "OLS") convertParameters(curve)
#> $amplitude #> amplitude #> 5.265299 #> #> $intercept #> intercept #> -4.248525 #> #> $x0 #> phase #> 33.27088 #> #> $X #> frequency #> 37.91834 #> #> $birth #> phase #> 0.877435 #>