library(mlbench)
data(Soybean)
Soybean
library(caret)
head(Soybean)
Soybean$sever
sum(is.na(Soybean$sever))
na.omit(Soybean$sever)
sever = Soybean$sever
plot(sever,main="Sever Frequency Distribution", xlab="Sever", ylab="Frenquency")
sum(is.na(Soybean))
x=2337/683/35
x
summary(Soybean)
pmiss=function(sever){sum(is.na(sever))/length(sever)*100}
apply(Soybean, 2, pmiss)
library(mice)
library(VIM)
aggr_plot=aggr(Soybean, col=c('navyblue','red'), numbers=TRUE, sortVars=TRUE, labels=names(Soybean), cex.axis=0.7, gap=2.5, ylab=c("Histogram of missing data","Pattern"))
tempSoybean=mice(Soybean,m=35,maxit=50,meth='pmm',seed=500)
Next week, I will continue to practise exercises in the book.
No comments:
Post a Comment