@@ -216,7 +216,9 @@ Probabilities.Regression <- function(object, newdata = NULL, ...)
216216 StopForUserError(sQuote(" Probabilities" ), " is not applicable to linear regression models." )
217217 if (isTRUE(object $ stacked ) && IsRServer())
218218 StopForUserError(" Saving probabilitiles is currently not supported for stacked data." )
219- newdata <- ValidateNewData(object , newdata )
219+ na.action <- if (" na.action" %in% ... names()) list (... )[[" na.action" ]] else na.pass
220+ newdata <- ValidateNewData(object , newdata ) | >
221+ structure(na.action = na.action ) # Ensure NA rows are preserved, survey models may drop them otherwise
220222 if (object $ type %in% c(" Ordered Logit" , " Multinomial Logit" ))
221223 {
222224 probs <- suppressWarnings(predict(object $ original , newdata = newdata ,
@@ -230,7 +232,7 @@ Probabilities.Regression <- function(object, newdata = NULL, ...)
230232
231233 if (object $ type == " Binary Logit" )
232234 {
233- probs <- suppressWarnings(predict(object $ original , newdata = newdata , na.action = na.pass , type = " response" ))
235+ probs <- suppressWarnings(predict(object $ original , newdata = newdata , na.action = na.action , type = " response" ))
234236 outcome.levels <- levels(Observed(object ))
235237 if (length(outcome.levels ) == 1L )
236238 {
0 commit comments