[R] Practical work with logistic regression

Claus O'Rourke claus.orourke at gmail.com
Fri Apr 23 03:29:40 CEST 2010


Dear all,

I have a couple of short noob questions for whoever can take them. I'm
from a very non-stats background so sorry for offending anybody with
stupid questions ! :-)

I have been using logistic regression care of glm to analyse a binary
dependent variable against a couple of independent variables. All has
gone well so far. In my work I have to compare the accuracy of
analysis to a C4.5 machine learning approach. With the machine
learning, a straight-forward measure of the quality of the classifier
is simply the percentage of correctly classified instances. I can
calculate this for the resultant model by comparing predictions to
original values 'manually'. My question: is this not automatically -
or easily - calculated in the produced model or the summary of that
model?

I want to use my model in real time to produce results for new inputs.
Basically this model is to be used as a classifier for a robot in real
time. Can anyone suggest the best way that a produced model can be
used directly in external code once the model has been developed in R?
If my external code is in Java, then using jri is one option. A more
efficient method would be to take the intercept and coefficients and
actually code up the function in the appropriate programming language.
Has anyone ever tried doing this?

Apologies again for the stupid questions, but the sooner I get some of
these things straight, the better.

Claus



More information about the R-help mailing list