I´m doing a multiple imputation for a dataframe named "mydata" with this code:
library(mice)
imp<-mice(mydata,pred=pred,method="pmm", m=10)
Because the default argument for this is function is "seed=NA", the seed-number is chosen randomly. I would like to keep it like this, because i don´t know which number i should choose as a seed. But for replication i would like to know which seed this function chose for me. Is there a possibility to inspect the mids-object "imp" for the seed-value? Or should i just use a random number generator and set the seed to a generated value?
If you look at the documentation, there is no such thing as a
set.seed
argument formice
function. There is, however aseed
argument which takes an integer. If left alone, the integer is generated randomly.You can choose your own integer. If you're stuck at what to choose, try your lucky number, or some random integer, with sky or architecture of your system being the limit.
The function sets seed in the following manner, which translates to "set seed only if specified, otherwise leave alone" as mentioned in the documentation.