ggbgetResidual | R Documentation |
Called by ggbgetAgesFit()
whenever the user does not want to manually determine the age range used to determine registration coverage. Probably no need to be called by top-level users. If a user would rather determine the optimal age range some other way, then look toggbcoverageFromYear()
where ggbgetResidual
is called and add another condition or make it call something else.
ggbgetResidual(
agesi,
codi,
lm.method = "oldschool",
opt.method = "RMSE",
scale = 1
)
agesi |
the vector of ages used for this iteration |
codi |
|
lm.method |
character, one of:
|
opt.method |
What should we try to minimize when picking age trims? Current options are |
scale |
scale factor for the objective |
Given a vector of ages and a line fitting method, we take one of several potential residuals. RMSE is the root of the mean squared error, MAE is the mean absolute error, MAPE is the mean absolute proportional error, ORSS is the standard deviation of the orthogonal residuals, and r2 is the r2 of an OLS fit.
the RMSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.