Я внес некоторые изменения в ваш код, которые, как мне кажется, должны помочь!
#First initialize the output vector as an empty object outside the loop.
fitted_value <- NULL
for(i in 1:53){
#you did this part right
validation<-ironslag[i,]
training<-ironslag[-i,]
model1<-lm(magnetic ~ chemical, data = training)
#when you fit the model, use the newdata argument to predict on a new row
#also, fitted_value needs the index [i], so the each loop doesn't overwrite the previous
fitted_value[i] <- predict(model1, newdata = validation)}