การถดถอยใน R เบื้องต้น
Richie Cotton
Data Evangelist at DataCamp
ค่า $y$ เมื่อ $x$ เท่ากับศูนย์
ค่า $y$ เพิ่มขึ้นเท่าใดเมื่อ $x$ เพิ่มขึ้น 1 หน่วย
$y = intercept + slope * x$







lm(total_payment_sek ~ n_claims, data = swedish_motor_insurance)
Call:
lm(formula = total_payment_sek ~ n_claims, data = swedish_motor_insurance)
Coefficients:
(Intercept) n_claims
19.994 3.414
Call:
lm(formula = total_payment_sek ~ n_claims, data = swedish_motor_insurance)
Coefficients:
(Intercept) n_claims
19.994 3.414
$total\_payment\_sek = 19.994 + 3.414 * n\_claims$
การถดถอยใน R เบื้องต้น