prepare_data_for_fig | R Documentation |
These functions are used to prepare the data required to draw the figures. They allow for the computation of predictions averaged over the non focal fixed predictors.
prepare_newdata_fig_3(birth_level_data, xaxis = c("age", "parity"))
prepare_data_fig_4A(fit_PP)
prepare_data_fig_4B(fit_IBI)
prepare_data_fig_4C(fit_twin)
prepare_newdata_fig_S1()
prepare_data_fig_S1(fit_AFB, nb_boot = 1000)
prepare_data_fig_S2(fit_PP, fit_IBI, fit_twin, mother_level_data)
prepare_data_fig_S6(simulation_obj, birth_level_data)
birth_level_data |
a |
xaxis |
a |
fit_PP |
a fitted model for predicting the parity progression |
fit_IBI |
a fitted model for predicting the interbirth interval |
fit_twin |
a fitted model for predicting the per-birth probability of twinning |
fit_AFB |
a fitted model for predicting the age at first birth |
nb_boot |
the number of simulations for the parametric bootstrap used to compute the intervals |
mother_level_data |
a |
simulation_obj |
an object produced by |
We recommend you to look at the raw R code of these functions on GitHub (file '/R/plots.R') to understand how they work. We commented the code to make this clear. While you could directly look at the code of these functions while using the package, mind that the comments will have been stripped away during the installation process.
prepare_newdata_fig_3()
: an internal function to prepare the data used to generate the predictions to be plotted in Fig. 3
prepare_data_fig_4A()
: prepare the data to be plotted in Fig. 4A
prepare_data_fig_4B()
: prepare the data to be plotted in Fig. 4B
prepare_data_fig_4C()
: prepare the data to be plotted in Fig. 4C
prepare_newdata_fig_S1()
: an internal function to prepare the data used to generate the predictions to be plotted in Fig. S1
prepare_data_fig_S1()
: prepare the data to be plotted in Fig. S1
prepare_data_fig_S2()
: prepare the data to be plotted in Fig. S2
prepare_data_fig_S6()
: prepare the data to be plotted in Fig. S6
prepare_newdata_fig_3(expand_data(data_births_all), xaxis = "age")
prepare_newdata_fig_3(expand_data(data_births_all), xaxis = "parity")
# for more realistic use, see ?twinR
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.