Does anyone knows why model1 is working but model2 and model3 give this error:
Error: wrong model type for regression
model1 <- ld