Main effects
Price, surface, and living artist
Very few paintings withs Surface >= 5000
:
Price, surface, and living artist
For simplicity let’s focus on the paintings with Surface < 5000
:
Price vs. surface and living artist
ggplot(data = pp_Surf_lt_5000,
aes(y = log(price), x = Surface, color = factor(artistliving))) +
geom_point(alpha = 0.3) +
stat_smooth(method = "lm", fullrange = TRUE)
Modeling with main effects
(m_main <- lm(log(price) ~ Surface + factor(artistliving), data = pp_Surf_lt_5000))
##
## Call:
## lm(formula = log(price) ~ Surface + factor(artistliving), data = pp_Surf_lt_5000)
##
## Coefficients:
## (Intercept) Surface factor(artistliving)1
## 4.8800835 0.0002653 0.1372103
\[\widehat{log(price)} = 4.88 + 0.00027~surface + 1.14~artistliving \]
Plug in 0 for
artistliving
to get the linear model for paintings by non-living artists.Plug in 1 for
artistliving
to get the linear model for paintings by living artists.
Interpretation of main effects
Non-living artist: \(\widehat{log(price)} = 4.88 + 0.00027~surface + 1.14 \times 0\) \(= 4.88 + 0.00027~surface\)
- Living artist: \(\widehat{log(price)} = 4.88 + 0.00027~surface + 1.14 \times 1\) \(= 6.02 + 0.00027~surface\)
Rate of change in price as the surface area of the painting increases does not vary between paintings by living and non-living artists (same slope),
Paintings by living artists are consistently more expensive than paintings by non-living artists (different intercept).