MulaiMulai sekarang secara gratis

Predicting with linear models

The skill of prediction is necessary if you apply for positions such as a magician, a clairvoyant, or a data scientist.

Regression models can be used to predict an independent variable for new data points. You can easily predict with R functions, but it's worth knowing how the results are computed.

The following variables are available in the environment:

  • cats - the dataset from the MASS package,
  • model - the linear regression model that you've fitted in the last exercise,
  • new_cat - the value of bodyweight for a new cat.

Latihan ini adalah bagian dari kursus

Practicing Statistics Interview Questions in R

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Print the new cat's data
___(___)

# Print the linear model
___(___)
Edit dan Jalankan Kode