## From UCI Machine Learning Repository.
data(spambase);
## A subset of the data.
sbase = spambase[seq(1,nrow(spambase),10),];
X = model.matrix(is.spam ~ word.freq.free + word.freq.1999, data=sbase);
y = sbase$is.spam;
## Actually unnecessary as logit.EM automatically tries to compress.
new.data = logit.combine(y, X)
mode.spam = logit.EM(new.data$y, new.data$X, new.data$n)
mode.spam
Run the code above in your browser using DataLab