Initial attempt to define recipes for imputed data sets using purrr.
As mentioned I thought about this and think there is a better approach, this is my first attempt at doing so.
The file sections/_recipe_imputed.qmd is included which wraps all the steps in sections/_recipe.qmd in purrr::map() calls which are applied to the mice_cart$imputed data set (which has had Original data set removed, the .id variable stripped and the data split based on .imp).
Its not quite there yet but I think this is the proper way to approach using purrr rather than writing one big function to do everything (which whilst possible would be more challenging for you to undertake @mdp21oe).
I've left some notes in sections/_recipe_imputed.qmd, look for !!!!!!. The first I have copied here as its important...
I'm new to using purrr but from what I can work out/understand so far and the way we want to use it we start with a dataset that is piped into purrr::map() the first thing we do is then define how we will refer to this dataset using the notation \(<some_name>) we then provide a function we wish to apply to each split of the data and use <some_name> as an argument to that function.
Initial attempt to define recipes for imputed data sets using purrr.
As mentioned I thought about this and think there is a better approach, this is my first attempt at doing so.
The file
sections/_recipe_imputed.qmd
is included which wraps all the steps insections/_recipe.qmd
inpurrr::map()
calls which are applied to themice_cart$imputed
data set (which has hadOriginal
data set removed, the.id
variable stripped and the data split based on.imp
).Its not quite there yet but I think this is the proper way to approach using
purrr
rather than writing one big function to do everything (which whilst possible would be more challenging for you to undertake @mdp21oe).I've left some notes in
sections/_recipe_imputed.qmd
, look for!!!!!!
. The first I have copied here as its important...