GAM Model Report

Dataset & Model

Property Value
Response sale_price
Predictors area, sq_ft_total, lot_size, age, baths_total, beds_total, garage_spaces, hoa_fee, latitude, view_hills, view_other, view_golf_course, view_water, view_panoramic, view_city_lights, view_valley, view_greenbelt, view_canyon
Observations 781
Family gaussian
Smoothing method REML
Smooth terms 16

Results Summary

Metric Value
R-squared (adj) 0.7349
Deviance explained 75.2%
CV R-squared 0.5073
AIC 19178.1
BIC 19428.6

Model Equation

\begin{aligned} \widehat{\text{sale\_price}} ={}& 390261.6038 \\ & + f_{1}(\text{sq\_ft\_total}) \\ & + f_{2}(\text{lot\_size}) \\ & + f_{3}(\text{age}) \\ & + f_{4}(\text{baths\_total}) \\ & + f_{5}(\text{beds\_total}) \\ & + f_{6}(\text{garage\_spaces}) \\ & + f_{7}(\text{hoa\_fee}) \\ & + f_{8}(\text{latitude}) \\ & + f_{9}(\text{age, sq\_ft\_total}) \\ & + f_{10}(\text{baths\_total, sq\_ft\_total}) \\ & + f_{11}(\text{garage\_spaces, sq\_ft\_total}) \\ & + f_{12}(\text{latitude, sq\_ft\_total}) \\ & + f_{13}(\text{age, baths\_total}) \\ & + f_{14}(\text{age, garage\_spaces}) \\ & + f_{15}(\text{baths\_total, beds\_total}) \\ & + f_{16}(\text{baths\_total, garage\_spaces}) \\ & + \beta_{\text{area}} \text{ (2 levels)} \\ & + \beta_{\text{view\_hills}} \text{ (2 levels)} \\ & + \beta_{\text{view\_other}} \text{ (2 levels)} \\ & + \beta_{\text{view\_golf\_course}} \text{ (2 levels)} \\ & + \beta_{\text{view\_water}} \text{ (2 levels)} \\ & + \beta_{\text{view\_panoramic}} \text{ (2 levels)} \\ & + \beta_{\text{view\_city\_lights}} \text{ (2 levels)} \\ & + \beta_{\text{view\_valley}} \text{ (2 levels)} \\ & + \beta_{\text{view\_greenbelt}} \text{ (2 levels)} \\ & + \beta_{\text{view\_canyon}} \text{ (2 levels)} \end{aligned}

Smooth function definitions:

  • f_1s(sq_ft_total) — cubic regression spline, k = 3
  • f_2s(lot_size) — cubic regression spline, k = 10
  • f_3s(age) — cubic regression spline, k = 4
  • f_4s(baths_total) — thin plate regression spline, k = 5
  • f_5s(beds_total) — cubic regression spline, k = 5
  • f_6s(garage_spaces) — cubic regression spline, k = 3
  • f_7s(hoa_fee) — cubic regression spline, k = 10
  • f_8s(latitude) — thin plate regression spline, k = 10
  • f_9ti(age,sq_ft_total) — tensor product smooth, k =
  • f_10ti(baths_total,sq_ft_total) — tensor product smooth, k =
  • f_11ti(garage_spaces,sq_ft_total) — tensor product smooth, k =
  • f_12ti(latitude,sq_ft_total) — tensor product smooth, k =
  • f_13ti(age,baths_total) — tensor product smooth, k =
  • f_14ti(age,garage_spaces) — tensor product smooth, k =
  • f_15ti(baths_total,beds_total) — tensor product smooth, k =
  • f_16ti(baths_total,garage_spaces) — tensor product smooth, k =

Smooth Terms

Term EDF Ref.df F p_value
s(sq_ft_total) 1.000 1.000 174.230 < 1e-04
s(lot_size) 1.912 1.985 7.380 0.000885
s(age) 2.599 2.859 9.568 < 1e-04
s(baths_total) 3.705 3.848 10.433 < 1e-04
s(beds_total) 1.000 1.000 0.691 0.406118
s(garage_spaces) 1.831 1.952 3.862 0.024498
s(hoa_fee) 5.492 6.042 15.491 < 1e-04
s(latitude) 2.585 3.244 1.515 0.239890
ti(age,sq_ft_total) 2.618 3.366 0.960 0.597731
ti(baths_total,sq_ft_total) 2.741 3.349 3.677 0.009115
ti(garage_spaces,sq_ft_total) 5.769 6.894 2.253 0.035132
ti(latitude,sq_ft_total) 1.230 1.386 1.706 0.157135
ti(age,baths_total) 1.000 1.000 7.173 0.007567
ti(age,garage_spaces) 1.806 2.161 0.788 0.429055
ti(baths_total,beds_total) 3.659 4.355 7.283 < 1e-04
ti(baths_total,garage_spaces) 2.810 3.537 1.079 0.371307

Parametric Terms

Term Estimate Std_Error t_value p_value
(Intercept) 390300 8202 47.584 < 1e-04
area30925 -15630 6931 -2.255 0.024423
view_hillsTRUE 1509 4111 0.367 0.713595
view_otherTRUE -16900 4476 -3.776 0.000173
view_golf_courseTRUE -5442 6211 -0.876 0.381200
view_waterTRUE 42680 4843 8.811 < 1e-04
view_panoramicTRUE 39470 12700 3.107 0.001962
view_city_lightsTRUE 9981 14560 0.685 0.493360
view_valleyTRUE 805 17490 0.046 0.963309
view_greenbeltTRUE -7670 14300 -0.536 0.591873
view_canyonTRUE -11890 24980 -0.476 0.634142

Variable Importance

Smooth Effects

sq_ft_total

lot_size

age

baths_total

beds_total

garage_spaces

hoa_fee

latitude

age × sq_ft_total

baths_total × sq_ft_total

garage_spaces × sq_ft_total

latitude × sq_ft_total

age × baths_total

age × garage_spaces

baths_total × beds_total

baths_total × garage_spaces

Predictor Correlations

Diagnostics

Actual vs Predicted

mgcv Summary


Family: gaussian 
Link function: identity 

Formula:
sale_price ~ area + s(sq_ft_total, bs = "cr", k = 3) + s(lot_size, 
    bs = "cr") + s(age, bs = "cr", k = 4) + s(baths_total, bs = "tp", 
    k = 5) + s(beds_total, bs = "cr", k = 5) + s(garage_spaces, 
    bs = "cr", k = 3) + s(hoa_fee, bs = "cr") + s(latitude, bs = "tp") + 
    view_hills + view_other + view_golf_course + view_water + 
    view_panoramic + view_city_lights + view_valley + view_greenbelt + 
    view_canyon + ti(age, sq_ft_total, bs = c("tp", "tp")) + 
    ti(baths_total, sq_ft_total, bs = c("tp", "tp")) + ti(garage_spaces, 
    sq_ft_total, bs = c("tp", "tp")) + ti(latitude, sq_ft_total, 
    bs = c("tp", "tp")) + ti(age, baths_total, bs = c("tp", "tp")) + 
    ti(age, garage_spaces, bs = c("tp", "tp")) + ti(baths_total, 
    beds_total, bs = c("tp", "tp")) + ti(baths_total, garage_spaces, 
    bs = c("tp", "tp"))

Parametric coefficients:
                     Estimate Std. Error t value Pr(>|t|)    
(Intercept)            390262       8202  47.584  < 2e-16 ***
area30925              -15629       6930  -2.255 0.024423 *  
view_hillsTRUE           1509       4111   0.367 0.713595    
view_otherTRUE         -16898       4476  -3.776 0.000173 ***
view_golf_courseTRUE    -5442       6211  -0.876 0.381200    
view_waterTRUE          42676       4843   8.811  < 2e-16 ***
view_panoramicTRUE      39466      12701   3.107 0.001962 ** 
view_city_lightsTRUE     9981      14564   0.685 0.493360    
view_valleyTRUE           805      17493   0.046 0.963309    
view_greenbeltTRUE      -7670      14300  -0.536 0.591873    
view_canyonTRUE        -11892      24978  -0.476 0.634142    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Approximate significance of smooth terms:
                                edf Ref.df       F  p-value    
s(sq_ft_total)                1.000  1.000 174.230  < 2e-16 ***
s(lot_size)                   1.912  1.985   7.380 0.000885 ***
s(age)                        2.599  2.859   9.568 6.67e-06 ***
s(baths_total)                3.705  3.848  10.433  < 2e-16 ***
s(beds_total)                 1.000  1.000   0.691 0.406118    
s(garage_spaces)              1.831  1.952   3.862 0.024498 *  
s(hoa_fee)                    5.492  6.042  15.491  < 2e-16 ***
s(latitude)                   2.585  3.244   1.515 0.239890    
ti(age,sq_ft_total)           2.618  3.366   0.960 0.597731    
ti(baths_total,sq_ft_total)   2.741  3.349   3.677 0.009115 ** 
ti(garage_spaces,sq_ft_total) 5.769  6.894   2.253 0.035132 *  
ti(latitude,sq_ft_total)      1.230  1.386   1.706 0.157135    
ti(age,baths_total)           1.000  1.000   7.173 0.007567 ** 
ti(age,garage_spaces)         1.806  2.161   0.788 0.429055    
ti(baths_total,beds_total)    3.659  4.355   7.283 4.52e-06 ***
ti(baths_total,garage_spaces) 2.810  3.537   1.079 0.371307    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

R-sq.(adj) =  0.735   Deviance explained = 75.2%
-REML = 9292.9  Scale est. = 2.5267e+09  n = 781

Report generated by mgcvUI on 2026-06-21 00:23:20.