bnowok / synthpop

Generating Synthetic Versions of Sensitive Microdata for Statistical Disclosure Control
40 stars 8 forks source link

logical/numeric #5

Closed rubenarslan closed 7 years ago

rubenarslan commented 7 years ago

For boolean/logical variables without missings I get the following error. It works if I transform the variables to factor beforehand, or if they have missings.

data("iris")
iris$Sepal.Width = sample(c(F, T), replace = T, size = nrow(iris))
library(synthpop)
#> Loading required package: lattice
#> Loading required package: MASS
#> Loading required package: nnet
#> Loading required package: ggplot2
x = syn(iris)
#> syn  variables
#> 1    Sepal.Length Sepal.Width Petal.Length
#> Error: variable 'Sepal.Width' was fitted with type "logical" but type "numeric" was supplied
bnowok commented 7 years ago

A bug in the default CART method has been fixed.