d <- read.csv('https://stats.dip.jp/01_ds/data/real_estate_price.csv')[, -1]

library(DT)
datatable(round(d, 1))
COL <- c(rgb(255,   0,   0,  255, max = 255),
         rgb(  0,   0, 255,  255, max = 255),
         rgb(  0, 155,   0,  255, max = 255))
library(psych)
pairs.panels(d)

library(ggcorrplot)
##  要求されたパッケージ ggplot2 をロード中です
## 
##  次のパッケージを付け加えます: 'ggplot2'
##  以下のオブジェクトは 'package:psych' からマスクされています:
## 
##     %+%, alpha
library(plotly)
## 
##  次のパッケージを付け加えます: 'plotly'
##  以下のオブジェクトは 'package:ggplot2' からマスクされています:
## 
##     last_plot
##  以下のオブジェクトは 'package:stats' からマスクされています:
## 
##     filter
##  以下のオブジェクトは 'package:graphics' からマスクされています:
## 
##     layout
cor(d) |> ggcorrplot(lab = T, hc.order = T, outline.color = "white", p.mat = cor_pmat(d)) |> ggplotly() |>
layout(font  = list(size = 11, color = 'blue', family = 'UD Digi Kyokasho NK-R'),
       title = '坪単価',
       xaxis = list(title = 'x軸カテゴリラベル'),
       yaxis = list(title = 'y軸カテゴリラベル'))
       fit <- lm(price ~ yr + yrs_old + m_sta + nstores + lat + lon, data = d)
library(sjPlot)
tab_model(fit, show.stat = T, show.aic = T)
  price
Predictors Estimates CI Statistic p
(Intercept) -9859.50 -22341.02 – 2622.02 -1.55 0.121
yr 2.94 1.07 – 4.81 3.09 0.002
yrs old -0.27 -0.35 – -0.20 -7.11 <0.001
m sta -0.00 -0.01 – -0.00 -6.10 <0.001
nstores 1.16 0.79 – 1.53 6.17 <0.001
lat 234.47 147.00 – 321.94 5.27 <0.001
lon -15.34 -111.08 – 80.40 -0.31 0.753
Observations 414
R2 / R2 adjusted 0.581 / 0.575
AIC 2991.283
plot_model(fit, show.values = T, show.intercept = T, width = 0.1)

plot(fit)