R/convertParameters.R
convertParameters.Rd
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)
curve | A fitted model object from nls function. The fitted model should have the following parameter estimates - amplitude, intercept, frequency, phase. |
---|
A list containing the following components:
estimated amplitude
estimated intercept
delay of the data
period of the data
birth seasonality estimate
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 #>