View source: R/plot_functions.R
ggbAgeTrimSensitivity | R Documentation |
Age trim selection is a big open problem for death distribution methods. Here we can see how the "Mxcoverage"
estiamte varies as a function of lower and upper ages of age trims. Alternatively, one could check other optimal criteria, such as r2, RMS, or ORSS statistics over the same space.
ggbAgeTrimSensitivity(
X,
minA = 5,
maxA = 75,
minAges = 8,
deaths.summed = FALSE,
mig.summed = deaths.summed,
lm.method = "tukey",
nx.method = 2,
opt.method = "r2",
type = "Mxcoverage",
plot = TRUE
)
X |
|
minA |
the lowest age to be included in search |
maxA |
the highest age to be included in search (the lower bound thereof) |
minAges |
the minimum number of adjacent ages to be used in estimating |
deaths.summed |
logical. is the deaths column given as the total per age in the intercensal period ( |
mig.summed |
logical. Is the (optional) net migration column |
lm.method |
character, one of:
|
nx.method |
either 2 or 4. 4 is smoother. |
opt.method |
what kind of residual do we minimize? choices |
type |
either |
plot |
logical. Shall we also render the plot? |
The optimal (using the specified opt.method
criterion) age trim is indicated with a circle. Whether or not plot
is TRUE
this function returns a data object that one may wish to analyze.
## Not run:
ZAmx_r2 <-
ggbAgeTrimSensitivity(ZA,
maxA=80,
deaths.summed = TRUE,
type = "resid")
ZAmx_coverage <-
ggbAgeTrimSensitivity(ZA,
maxA=80,
deaths.summed = TRUE,
type = "Mxcoverage")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.