我相信我的问题与this post非常相似。唯一的区别是我的填充是一个多层次的因素。这就是我所追求的
这就是我已经走了多远
set.seed(123)
n = 100
LoanStatus = sample(c('Chargedoff', 'Completed', 'Current', 'Defaulted', 'PastDue'), n, replace = T, prob = NULL)
ProsperScore = sample(1:11, n, replace = T, prob = NULL)
df = data.frame(ProsperScore,factor(LoanStatus))
df = data.frame(ProsperScore,LoanStatus)
probs = data.frame(prop.table(table(df),1))