3
$\begingroup$

I'm trying to do logistic regression, but I can't seem to get the results I want. I have 6 columns of data (one dependent and 5 independent binary variables) and about 100 rows. The problem with my dataset is that I have a lot of missing ness in the data (NA's) which I think is the reason why I can't do the regression. Is there any way to tackle the situation? I think removing the rows with NA's in them not a good idea because ill have very less data left.

$\endgroup$
2
2
$\begingroup$

Without much more information we can't give you guaranteed advice here.

  1. You can remove rows of data. However, this will cause problems if they are not randomly missing. For instance, the fact that they are missing may indicate something about them (such as they are not an engaged customer).
  2. You can impute values if you have a means to do so.
  3. You can remove columns of data with missing values.
  4. You can bin your data. Example: Answer1, Answer2, MissingValue.
  5. Other.
  6. You can determine that you do not have enough data in the sample to adequately represent the population you are trying to estimate and you can go get more data.
$\endgroup$
1
$\begingroup$

Even with only 100 observations, then assuming that the data are missing at random or missing completely at random, it is likely that a pricipled approach to missing data such as multiple imputation will provide much better resuts that removing rows/columns or any kind of single value imputation. The general approach to multiple imputation is:

  • create several complete datasets, let's say $m$, using whatever multiple imputation alogorithm you choose. A common rule of thumb is that you set $m$ to be the average percentage of missing values in the dataset.

  • perform the glm model on each complete dataset. That is, you would run $m$ models.

  • pool the results of the analyses. With a glm regression model you would simply average all the estimates of interest to find the pooled estimate and use Rubin's rules, which incorporate uncertainty both within, and between, imputations to compute standard errors.

$\endgroup$
0
$\begingroup$

You could replace the NA's with the mean feature value of the corresponding class. That way you can still use those features and don't have to replace them with default values that might distort results.

$\endgroup$
2
  • 1
    $\begingroup$ What would be a default value? Unless we override how glm() handles missingness, R will completely disregard observations containing NA values. $\endgroup$ – Thomas Bilach Oct 15 '20 at 20:27
  • $\begingroup$ You could replace the NAs with a default value of -1, that way the observation gets used. However that is a bad idea, that's why I suggested to use the mean. $\endgroup$ – Tom Dörr Oct 15 '20 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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