1

Can we predict multiple values at the same time

Test_Data <- data.frame(X1, X2, X3, Y1, Y2)
Pred_Data <- (1,700, 300)
ML <- lm(Y1+Y2 ~ . , Test_Data) 
lr_pred <- predict(ML, Pred_Data)

When I try this I get no errors but only one set of predictions in get and I don't know to which variable it belongs Y1 or Y2.

How to resolve this?

Stéphane Laurent
  • 59,551
  • 14
  • 99
  • 196
asmgx
  • 6,348
  • 12
  • 63
  • 109

0 Answers0