statistikat / simPop

Simulation of Synthetic Populations for Survey Data Considering Auxiliary Information
30 stars 7 forks source link

address issue 22 by @Kyoshido #29

Closed Kyoshido closed 1 year ago

Kyoshido commented 1 year ago

Hello,

I described my problem in issue https://github.com/statistikat/simPop/issues/22

When I was at Statistic Austria I think that we repaired only package party to partykit, but we forgot to repair this issue.

I got this error

Error in do.call("rbind", probs) : second argument must be a list

So this is in simCategorical() specifically in row 67 probs <- predict(mod, newdata=data.table(newdata), type="prob")

And the reason for this error is that party package output is list and partykit package output is dataframe.

This makes it works :)

probs <- split(probs, seq(nrow(probs)))

bernhard-da commented 1 year ago

@Kyoshido thx a lot Jiří :+1: