1
$\begingroup$

I have binary vectors, each with a binary outcome: for example:

|A|B|C| outcome
 1 0 0 -> 0
 0 0 1 -> 0
 1 0 1 -> 0
 0 1 0 -> 1
 0 1 1 -> 1

How can I test which of my attributes (A,B and C in this example) have a significant impact on my outcome? Test the summed quadratic difference (in this binary case the same as the absolute difference) between the outcome and each variable over all vectors against 0? If yes, how is this test statistic distributed?

Many attributes will be 1 in less than 1% of all cases including the outcome, but I have ca 1 million of those vectors. How do I deal with this while testing for significance? Do I even need to with this sample size?

To test for covariance I would just add constructed variables like A*B, A*C, B*C and A*B*C. Am I right with this approach?

$\endgroup$

1 Answer 1

0
$\begingroup$

You really want to look up logistic regression. A simple example of how you would do it in R might be the following:

m <- glm( outcome ~ A * B * C, family = 'binomial' )
summary(m)

Note that I'm assuming when you say you have "a million of those vectors" you mean that for the predictor variable you have a million measures. If you really have over a million predictors you likely need to do some reduction first.

There are some other ways to address this problem, like doing analyses of the numbers of 0s and 1s in the various categories. You will run into a problem regardless of what technique you select if you're just looking for what's "significant". You're getting into a number of measures where almost anything will be statistically significant. In that case you really need to focus on what's meaningful in the data.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.