เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

Different levels of interaction

Once you have three explanatory variables, the number of options for specifying interactions increases. You can specify no interactions. You can specify 2-way interactions, which gives you model coefficients for each pair of variables. The third option is to specify all the interactions, which means the three 2-way interactions and and interaction between all three explanatory variables.

As the number of explanatory variables increases further, the number of interaction possibilities rapidly increases.

taiwan_real_estate is available.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Intermediate Regression in R

ดูคอร์ส

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Model price vs. no. of conv. stores, sqrt dist. to MRT station & house age, no global intercept, no interactions
mdl_price_vs_all_no_inter <- ___




# See the result
mdl_price_vs_all_no_inter
แก้ไขและรันโค้ด