Displaying 1 result from an estimated 1 matches for "dbs3".
Did you mean:
dbs
2010 Aug 03
4
REmove level with zero observations
If I have a column with 2 levels, but one level has no remaining
observations. Can I remove the level?
Had intended to do it as listed below, but soon realized that even though
there are no observations, the level is still there.
For instance
summary(dbs3.train.sans.influential.obs$HAC)
yields
0 ,1
4685,0
nlevels(dbs3.train.sans.influential.obs$HAC)
yields
[1] 2
drop.list <- NULL
for (i in 1:ncol(dbs3.train.sans.influential.obs)) {
if (nlevels(dbs3.train.sans.influential.obs[,i]) < 2) {drop.list <-
cbind(drop.list,i)}}...