いくつか質問がありましたが、何かが欠けているか、代入プロセス/ロジックを理解していない限り、ドキュメントについて何も見つけることができませんでした。
基本的に最も重要なのは、「帰属」値が異なる場合があるため、数値の場合は平均を、カテゴリ値の場合はモードを取りたいということです。
「complete(miced_model, 1)」を示すすべての例。マウス モデルを 5 回または 10 回の異なる反復で実行している場合、1 を選択するだけでは意味がありません。それらすべての平均が必要です。
誰でもこれを行う方法を教えてもらえますか?
set.seed(2016)
library(mice)
nhanes # this is the dataset
nhanes[5,1]=NA # setting up some categorical examples
nhanes[1,1]=NA
nhanes$age = as.factor(nhanes$age)
imputed_values = mice(nhanes, m = 5, method='rf',maxit = 3)
new_nhanes = complete(imputed_values, 'long') # or repeated? or what?
new_hanes_fixed = # new data frame with averaged values imputed rather than just arbitrary '1st' iteration?
ありがとう!!