Introductie tot regressie in R
Richie Cotton
Data Evangelist at DataCamp
De y-waarde bij x = 0.
Zoveel neemt y toe als x met 1 stijgt.
$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$
Introductie tot regressie in R