MulaiMulai sekarang secara gratis

Intercepts

In the previous exercise, you saw how to code multiple slopes. During this exercise, you will get to explore intercepts with model.matrix() using a simple vectors of colors. First, build a matrix including a reference intercept. This input only has the intercept variable's name (e.g. ~x1). Second, build a matrix including an intercept for each color. This input has the intercept variable's name and -1 (e.g. ~x1 - 1).

Latihan ini adalah bagian dari kursus

Generalized Linear Models in R

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Create a matrix that includes a reference intercept
___
Edit dan Jalankan Kode