Description Usage Arguments Examples
asdf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | PlotDDM(
ddm_results,
base.size.point.estimates = 13,
base.size.sensitivity = 7,
fig.nrow = 2,
fig.ncol = 1,
show.lines.sex.differential = TRUE,
show.size.population = TRUE,
label.completeness = "Estimated adult death registration completeness (GGB-SEG)",
label.RMSE = "RMSE from GGB age-range selection",
label.subnational.level = ddm_results$name_disaggregations,
save.name.plot.point.estimates = NULL,
save.name.plots.sensitivity = NULL,
save.name.plots.RMSE = NULL,
plots.dir = ""
)
|
ddm_results |
The object returned by the 'EstimateDDM()' function |
base.size.point.estimates |
A numeric fed to 'ggplot2::theme_classic(base_size)' for the plot of point estimates. Defaults to 13 |
base.size.sensitivity |
A numeric fed to 'ggplot2::theme_classic(base_size)' for the plot of point estimates. Defaults to 9 |
fig.nrow |
An integer fed to 'gridExtra::arrangeGrob(nrow)' to indicate how many rows of plots should appear in the visualizations of the sensitivity results by level of disaggregation (males and females in a given level of disaggregation will always be included in the same row). Defaults to 2 |
fig.ncol |
An integer fed to 'gridExtra::arrangeGrob(ncol)' to indicate how many times the side-by-side male/female sensitivity plots should appear in each of 'fig.nrow' rows. Defaults to 1 |
show.lines.sex.differential |
A logical indixating whether vertical lines connecting the estimated completenss for males and females should be drawn. Defaults to TRUE |
show.size.population |
A logical indicating whether the size of plotted points should vary according to the total population size in the second data year. Defaults to TRUE |
label.completeness |
A character label for the axis showing estimated completeness of death registration (on a scale of 0 to 100). Default is "Estimated adult death registration completeness (GGB-SEG)" |
label.RMSE |
A character label for the axis showing RMSEs corresponding to different age-ranges during estimation completeness of death registration completeness. Default is "RMSE for age-range selection" |
label.subnational.level |
A character label for the axis showing the level of subnational disaggregation present in the data. Default is the value of the 'name.disaggregations' argument supplied to EstimateDDM() |
save.name.plot.point.estimates |
A character specifying a custom file name for the plot of point estimates across the levels of disaggregation saved on the local file system. Defaults to NULL, which combines 'name.disaggregations' and the current date |
plots.dir |
A character specifying the directory where plots should be saved. Defaults to "", saving the plots in the working directory |
save.name.plot.point.sensitivity |
A character specifying a custom file name for the plots of point estimates for possible age-ranges across the levels of disaggregation saved on the local file system. Defaults to NULL, which combines ‘name.disaggregations' and the current date #’ @param save.name.plot.point.sensitivity A character specifying a custom file name for the plots of sensitivity estimates across the levels of disaggregation saved on the local file system. Defaults to NULL, which combines 'name.disaggregations' and the current date |
save.name.plot.point.RMSE |
A character specifying a custom file name for the plots of RMSE for possible age-ranges across the levels of disaggregation saved on the local file system. Defaults to NULL, which combines ‘name.disaggregations' and the current date #’ @param save.name.plot.point.sensitivity A character specifying a custom file name for the plots of sensitivity estimates across the levels of disaggregation saved on the local file system. Defaults to NULL, which combines 'name.disaggregations' and the current date |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # It takes about 45 seconds to run this example with show.age.range.sensitivity=TRUE; to run in under 5 seconds please instead use show.age.range.sensitivity=FALSE
ecuador_ddm_results_with_sensitivity <- EstimateDDM(data=ecuador_five_year_ages,
name.disaggregations="province_name",
name.age="age",
name.sex="sex",
name.males="m",
name.females="f",
name.date1="date1",
name.date2="date2",
name.population.year1="pop1",
name.population.year2="pop2",
name.deaths="deaths",
deaths.summed=TRUE,
show.age.range.sensitivity=TRUE)
PlotDDM(ddm_results=ecuador_ddm_results_with_sensitivity,
save.plot.point.estimates=FALSE)
# Example with show.age.range.sensitivity=FALSE. Also better to use "province_name_short" as disaggregations name here to prevent overcrowding of x-axis.
ecuador_ddm_results_no_sensitivity <- EstimateDDM(data=ecuador_five_year_ages,
name.disaggregations="province_name_short",
name.age="age",
name.sex="sex",
name.males="m",
name.females="f",
name.date1="date1",
name.date2="date2",
name.population.year1="pop1",
name.population.year2="pop2",
name.deaths="deaths",
deaths.summed=TRUE,
show.age.range.sensitivity=FALSE)
PlotDDM(ddm_results=ecuador_ddm_results_no_sensitivity,
save.plot.point.estimates=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.