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, 1, 1, 1, 6, NA, 7, NA, NA, NA, 4, 4, NA, 7, 5, 7, NA, 5, NA,
NA, 5, 4, 4, 7, 7, 5, 5, NA, 2, 7, NA, NA, NA, NA, 5, NA, 5,
1, 6, 7, 3, 3, NA, 4, NA, NA, 7, 6, NA, NA, NA, 2, NA, 1, 4,
2, 7, 4, NA, 1, NA, NA, 6, NA, 2, NA, NA, 7, 5, 3, NA, NA, NA,
3, 1, 7, 1, 3, NA, 7, 1, 3, 2, NA, NA, 6, 2, NA, 1, NA, 2, 5,
5, NA, 5, 3, 4, 5, NA, NA, NA, 3, 7, 6, 6, 5, 3, NA, 3, NA, 2,
6, NA, 4, 1, 6, 5, 5, NA, 1, 7, 5, 6, 4, NA, NA, NA, NA, 7, 7,
NA, 6, 2, 5, 7, 4, 1), RC_12 = c(6, NA, NA, NA, 7, 6, 5, 4, NA,
6, 6, 5, NA, 7, 1, 6, 7, NA, NA, NA, 5, 6, 7, NA, 6, 7, 2, NA,
7, 1, 6, 7, 6, 6, 7, NA, NA, 6, 7, 7, 6, NA, NA, 6, 5, 7, 4,
NA, NA, 2, 6, NA, 4, NA, 7, 3, 5, 7, NA, 7, NA, 7, 6, 3, 1, 1,
4, 6, NA, 7, NA, NA, NA, 5, 4, NA, 7, 4, 7, NA, 5, NA, NA, 6,
4, 1, 7, 7, 5, 6, NA, 2, 7, NA, 3, NA, NA, 4, NA, 5, 7, 7, 7,
6, 6, NA, 5, NA, NA, 7, 6, NA, NA, NA, NA, NA, 1, 1, 2, 7, 4,
NA, 4, NA, NA, 6, NA, 1, NA, NA, 7, 7, 4, NA, NA, NA, 5, 5, 7,
5, 2, NA, 4, 7, 3, 6, NA, NA, 4, 4, NA, 1, NA, 1, 6, 4, NA, 2,
4, 6, 7, NA, NA, NA, 6, 6, 7, 6, 6, 3, NA, 5, NA, 2, 3, NA, 3,
1, 7, 6, 4, NA, 1, 7, 5, 7, 4, NA, NA, NA, NA, 7, 7, NA, 6, 6,
5, 7, 4, 1), RC_13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 4, 7, 5, 3, 4, 2, 4, 3, 7, 5, 5, 6, 3, 5, 1, 5, 1, 6, 6, 4,
2, 2, 6, 4, 6, 6, 5, 7, 6, 6, 6, 7, 4, 6, 5, 5, 3, 5, 6, 6, 1,
7, 6, 5, 5, 1, 6, 5, 7, 5, 6, 7, 4, NA, 6, 6, 5, 4, 3, 5, 7,
6, 6), RC_15 = c(7, 7, 5, 5, 7, 7, 5, 6, 4, 5, 6, 2, 6, 7, 7,
7, 7, 1, 7, 6, 7, 7, 5, 6, 7, 7, 2, 4, 6, 7, 6, 4, 7, 6, 7, 7,
7, 6, 7, 1, 7, 7, 7, 5, 5, 6, 5, 6, 7, 2, 5, 7, 4, 4, 6, 6, 5,
7, 6, 7, 7, 7, 4, 7, 7, 7, 4, 7, 6, 7, 7, 5, 6, 1, 6, 6, 5, 6,
7, 7, 6, 7, 6, 6, 7, 4, 7, 5, 7, 7, 5, 6, 6, 5, 3, 5, 5, 4, 5,
7, 7, 5, 7, 6, 4, 7, 7, 7, 5, 7, 5, 6, 4, 7, 7, 7, 6, 7, 5, 7,
1, 7, 6, 7, 6, 5, 7, 6, 7, 7, 7, 5, 5, 5, 7, 5, 2, 3, 7, 5, 2,
6, 2, 7, 6, 6, 7, 7, 7, 6, 4, 1, 6, 3, 4, 6, 5, 7, 2, 5, 7, 5,
3, 6, 2, 7, 6, 7, 7, 4, 5, 4, 7, 5, 6, 6, 4, 1, 6, 7, 7, 7, 1,
6, 5, 7, 4, 7, 7, NA, 1, 7, 5, 7, 3, 2, 5, 7, 4, 5)), row.names = c(NA,
-200L), class = c("tbl_df", "tbl", "data.frame"))
Я делаю вменение в мои 7-балльные данные Ликерта, полученные из опроса. Проблема в том, что большинство графических c методов не работают для этого типа данных. Например:
data_s <- as.data.frame(data_s)
data_s[] <- lapply(data_s, as.ordered) # I have to do it to mice apply polr method
names(data_s) <- gsub("_", "", names(data_s))
impute_data <- mice(data_s, m = 5, maxit = 4,
method = "polr", seed = 1212, printFlag = F)
А затем я могу оценить качество вмененных данных plot
, что работает нормально. densityplot
не работает, потому что мои данные не являются непрерывными, что является приемлемым.
, почему функция stripplot
работает только для числовых данных c? Разве это не будет хорошей возможностью, чтобы добавить его и для ordered
данных? Я ожидал панель для каждой переменной, где по оси Y указаны значения, которые может принимать моя переменная, а по оси X - число импутаций.
Более того, как я могу интерпретировать probplot
, который показан в этой виньетке :
источника ("https://gist.githubusercontent.com/NErler/0d00375da460dd33839b98faeee2fdab/raw/c6f537ecf80eddcefd94992ec7926aa57d454536/propplot.R") пропплота (impute_data)
Есть ли еще какие-нибудь графики c, которые я могу сделать, чтобы увидеть образец вмененного и реального графика?
Заранее спасибо!