I am wondering how to integrate restricted cubic splines (such as in the rms package) in the imputation models within R mice imputation package.
Context: I am doing biomedical research and have access to a dataset consisting of patient characteristics and data about the patient's disease progression, next to outcomes after medical care (e.g. one year survival). The goal is to build a prediction model based on the patient characteristics and disease progression in order to predict occurrence of certain outcomes. Alas, some patients do not have full information on all the variables. As such I've decided to use multiple imputation techniques to estimate (multiple times) what these missing values would be.
Problem: When using multiple imputation there's this 'rule' called congeniality. This means imputation requires the statistical model used for the final analysis (i.e. the prediction model I want to study) should also be included in the imputation model (preferably with additional information added to it). This also means taking into account possible non-linear associations. As I do not know whether certain predictors have non-linear associations with others, I'd like the imputation models to be able to fit restricted cubic splines. However, I do not really grasp how to do this in mice. I would therefore like help in creating imputation models allowing for rcs, suitable for mice.
On a sidenote to any moderators: I thought this question was suited for Crossvalidated as imputation and splines are specific 'statistical' subjects. However, due to the focus on the programming nature of this 'how to' question I wouldn't mind the question being migrated if you think it is more suitable elsewhere. Following this doubt, I also posted this question on StackOverflow (https://stackoverflow.com/questions/45674088/how-to-use-restricted-cubic-splines-with-the-r-mice-imputation-package)