Answers for "prediction of linear model at a single point in R"

0

prediction of linear model at a single point in R

df <- data.frame(meanValuesHeatingPower = c(1,4,3,7), 
                 meanValuesOutsideTemperature = c(4,3,4,7))

linearModel<-lm(meanValuesHeatingPower ~ meanValuesOutsideTemperature, data = df)

pred<-predict(linearModel, data.frame(meanValuesOutsideTemperature = c(1)))
print(pred)
Posted by: Guest on June-01-2021

Code answers related to "prediction of linear model at a single point in R"

Browse Popular Code Answers by Language