From: eyeballjunk junk on
Hello,

I'm running a binary (2 groups), multivariate (multiple predictors) logistic regression analysis, and would like to test the classification rate.

In the case of a single predictor, calculating the classification rate of a logistic regression is fairly straight forward. But, the addition of another predictor is equivalent to introducing another logistic function, right?

For example, see this pairwise plot of a 4 predictor regression:
http://alumni.media.mit.edu/~tpminka...iris-plot1.png

In this case, the "threshold" for predicted group membership is more difficult to calculate. It seems that group membership should be calculated as some weighted sum of the individual logits. Where do I get the weightings? How do I calculate predicted group membership? More information is available upon request.


my thanks in advance,
ebj
From: Tom Lane on
> In the case of a single predictor, calculating the classification rate of
> a logistic regression is fairly straight forward. But, the addition of
> another predictor is equivalent to introducing another logistic function,
> right?
>
> For example, see this pairwise plot of a 4 predictor regression:
> http://alumni.media.mit.edu/~tpminka...iris-plot1.png

I couldn't get the link to work.

But unless I misunderstand, you just want to done one logistic regression.
The result will be a set of coefficients to compute a single predicted
probability based on all predictors. This is the typical thing; combining
separate univariate regressions may be possible but I haven't seen it.

Based on the link name, maybe you're using the iris data. Try running this
example if you have the Statistics Toolbox:

load fisheriris
g = species(51:end,:);
x = meas(51:end,3:4);
gscatter(x(:,1),x(:,2),g)

y = strcmp(g,'virginica');
b = glmfit(x,y,'binomial')

The contours are for the predicted probabilities from a single
multi-variable logistic function.

-- Tom


From: Greg on
On Sep 28, 10:23 am, "eyeballjunk junk" <eyeballj...(a)gmail.com> wrote:
> Hello,
>
> I'm running a binary (2 groups), multivariate (multiple predictors) logistic
> regression analysis

Terminology:

Multiple regression multiple predictors, single response
Multivariate regression multiple predictors, multiple responses

> and would like to test the classification rate.
>
> In the case of a single predictor, calculating the classification rate of a logistic
>regression is fairly straight forward. But, the addition of another predictor is
>equivalent to introducing another logistic function, right?

Wrong.

[N p ] = size(X) % N cases, p predictors
Xa = [ ones(N,1) X]; % augment X to include a bias
% size(B) = [ p+1 1] % Size of multiple logistic
regression coefficient vector
y = logsig( Xa * B); % Real-valued logistic output
in (0,1)
% T = Classification threshold in (0,1)
predclass = hardlim(y-T); % Binary index of predicted class
{0,1};
error = abs(trueclass-predclass);
errrate = (100/N)*sum(error)

> For example, see this pairwise plot of a 4 predictor regression:
>
>http://alumni.media.mit.edu/~tpminka...iris-plot1.png

Unable to access

> In this case, the "threshold" for predicted group membership is more difficult to
>calculate. It seems that group membership should be calculated as some weighted
> sum of the individual logits.

No, the logit (LOGSIG in NN Toolbox) of the weighted predictor sum.

>Where do I get the weightings?

help glmfit

>How do I calculate predicted group membership?

See above

Hope this help.

Greg

P.S. If you have the NN Toolbox you may want to compare
results obtained with NEWFFand a MSE error function.
From: eyeballjunk junk on
My thanks to everyone who replied. Following a few tweaks, the regression runs fantastically.


Greg <heath(a)alumni.brown.edu> wrote in message <1d97760b-47db-4e0b-9ad6-04b51cae83a1(a)p23g2000vbl.googlegroups.com>...
> On Sep 28, 10:23 am, "eyeballjunk junk" <eyeballj...(a)gmail.com> wrote:
> > Hello,
> >
> > I'm running a binary (2 groups), multivariate (multiple predictors) logistic
> > regression analysis
>
> Terminology:
>
> Multiple regression multiple predictors, single response
> Multivariate regression multiple predictors, multiple responses
>
> > and would like to test the classification rate.
> >
> > In the case of a single predictor, calculating the classification rate of a logistic
> >regression is fairly straight forward. But, the addition of another predictor is
> >equivalent to introducing another logistic function, right?
>
> Wrong.
>
> [N p ] = size(X) % N cases, p predictors
> Xa = [ ones(N,1) X]; % augment X to include a bias
> % size(B) = [ p+1 1] % Size of multiple logistic
> regression coefficient vector
> y = logsig( Xa * B); % Real-valued logistic output
> in (0,1)
> % T = Classification threshold in (0,1)
> predclass = hardlim(y-T); % Binary index of predicted class
> {0,1};
> error = abs(trueclass-predclass);
> errrate = (100/N)*sum(error)
>
> > For example, see this pairwise plot of a 4 predictor regression:
> >
> >http://alumni.media.mit.edu/~tpminka...iris-plot1.png
>
> Unable to access
>
> > In this case, the "threshold" for predicted group membership is more difficult to
> >calculate. It seems that group membership should be calculated as some weighted
> > sum of the individual logits.
>
> No, the logit (LOGSIG in NN Toolbox) of the weighted predictor sum.
>
> >Where do I get the weightings?
>
> help glmfit
>
> >How do I calculate predicted group membership?
>
> See above
>
> Hope this help.
>
> Greg
>
> P.S. If you have the NN Toolbox you may want to compare
> results obtained with NEWFFand a MSE error function.