prediction with NAs

Hello!

I'm trying to make a performance check for my regression model.
Unfortunatelly, when I run "prediction"

pred = prediction(pred, data$acceptance)

I get an error
Error: 'predictions' contains NA.

My data had a lot of NAs and I did not want to remove all of them to keep a good sampling size.
And everything was fine with all the analisys and regression.
But now at one of the final steps I'm stuck :slight_smile:

Is there any other one to complete prediction with missing data?
Or shall I start over again?
To remove all NAs from data
To perform regression
To do predictions?

I tried to do it like that:
data.tmp <- data
pred <- predict(model, data.tmp, na.action=na.pass, type="response")
data.tmp <- data.tmp %>% filter(!is.na(pred))

But then when I run
pred = prediction(pred, data.tmp$acceptance)
I get the same error
Error: 'predictions' contains NA.

Thank you!

Start by asking what information contained in an object of type NA provides that adds information useful in making predictions. Then check the help for prediction to see how it addresses NA.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.