setwd("D:/Ajaccio shp")
a=read.csv("complete using dataset without buyer profession 2025obs.1.csv",header=TRUE)
head(a)
df=a[complete.cases(a), ]
names(df)
[1] "num.acte" "id.parc" "year" "date"
[5] "real.total.price" "total.surface" "real.unit.price" "nb.pieces"
[9] "nb.sdb" "nb.niv" "nb.iris" "construction.period"
[13] "APPT.type" "usage" "pre.sold" "buyer.dep"
[17] "buyer.dep1" "buyer.dep2" "x" "y"
[21] "participant"
names(df)
[1] "num.acte" "id.parc" "year" "date"
[5] "real.total.price" "total.surface" "real.unit.price" "nb.pieces"
[9] "nb.sdb" "nb.niv" "nb.iris" "construction.period"
[13] "APPT.type" "usage" "pre.sold" "buyer.dep"
[17] "buyer.dep1" "buyer.dep2" "x" "y"
[21] "participant"
T4=subset(df,select=c(real.total.price,total.surface,real.unit.price,
nb.pieces,nb.sdb,nb.niv,construction.period,
APPT.type,usage,pre.sold,buyer.dep1))
summary(T4)
real.total.price total.surface real.unit.price nb.pieces nb.sdb
Min. : 18300 Min. : 13.00 Min. : 194.4 Min. :1.000 Min. :0.000
1st Qu.:118234 1st Qu.: 45.00 1st Qu.:2180.1 1st Qu.:2.000 1st Qu.:1.000
Median :165037 Median : 65.50 Median :2719.3 Median :3.000 Median :1.000
Mean :190675 Mean : 67.64 Mean :2827.9 Mean :2.848 Mean :1.086
3rd Qu.:222054 3rd Qu.: 83.00 3rd Qu.:3362.7 3rd Qu.:4.000 3rd Qu.:1.000
Max. :983760 Max. :249.00 Max. :5591.9 Max. :7.000 Max. :4.000
nb.niv construction.period APPT.type usage pre.sold buyer.dep1
Min. :-1.000 H :575 AS:1597 HA:1761 N:1355 EX : 428
1st Qu.: 1.000 D :467 DU: 43 MI: 3 O: 475 IN :1357
Median : 2.000 E :343 ST: 190 RS: 66 IN1: 45
Mean : 2.742 F :286 TR: 0
3rd Qu.: 4.000 I : 79
Max. :12.000 G : 51
(Other): 29
sd(T4$real.total.price)
[1] 117638.4
sd(T4$total.surface)
[1] 30.47358
sd(T4$real.unit.price)
[1] 908.0441
sd(T4$nb.pieces)
[1] 1.088176
sd(T4$nb.sdb)
[1] 0.3358956
sd(T4$nb.niv)
[1] 2.21145
library(sp)
library(maptools)
Checking rgeos availability: TRUE
library(spdep)
搼㸴搼㸸挼㸸攼㹢搼㸰攼㸸Ҫ戼㸵ij̼愼㹤戼㸰昼㹣愼㸳戼㹡Matrix
搼㸴搼㸸挼㸸攼㹢戼㸳̼愼㹤戼㸰昼㹣愼㸳戼㹡愼㸱愼㹥spdep愼㸱愼㹦
The following object is masked from 愼㸱愼㹥package:fmsb愼㸱愼㹦:
geary.test
library(rgdal)
rgdal: version: 1.2-7, (SVN revision 660)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 2.0.1, released 2015/09/15
Path to GDAL shared files: C:/Users/whoamilyh/Documents/R/win-library/3.4/rgdal/gdal
Loaded PROJ.4 runtime: Rel. 4.9.2, 08 September 2015, [PJ_VERSION: 492]
Path to PROJ.4 shared files: C:/Users/whoamilyh/Documents/R/win-library/3.4/rgdal/proj
Linking to sp version: 1.2-4
library(plyr)
搼㸴搼㸸挼㸸攼㹢戼㸳̼愼㹤戼㸰昼㹣愼㸳戼㹡愼㸱愼㹥plyr愼㸱愼㹦
The following object is masked from 愼㸱愼㹥package:matrixStats愼㸱愼㹦:
count
library(tseries)
愼㸱愼㹥tseries愼㸱愼㹦 version: 0.10-42
愼㸱愼㹥tseries愼㸱愼㹦 is a package for time series analysis and computational finance.
See 愼㸱愼㹥library(help="tseries")愼㸱愼㹦 for details.
library(ggplot2)
Ajaccio.city=readOGR("Ajaccio_city.shp")
OGR data source with driver: ESRI Shapefile
Source: "Ajaccio_city.shp", layer: "Ajaccio_city"
with 1 features
It has 1 fields
Integer64 fields read as strings: ID_RTE500
Z-dimension discarded
load("D:/Ajaccio shp/data manage.RData")
# T2 is the dataframe before spatial transformation process(spdf)
class(spdf)
[1] "SpatialPointsDataFrame"
attr(,"package")
[1] "sp"
proj4string(spdf)
[1] "+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
identical(proj4string(spdf),proj4string(aja_p))
[1] TRUE
# unit price
ggplot() +
geom_polygon(data=Ajaccio.city, aes(x=long, y=lat, group=group), fill="grey40",
colour="grey90", alpha=1)+
labs(x=" longitude", y="latitude", title="AJACCIO Appt real unit price")+ #labels
theme(axis.ticks.y = element_blank(),axis.text.y = element_blank(), # get rid of x ticks/text
axis.ticks.x = element_blank(),axis.text.x = element_blank(), # get rid of y ticks/text
plot.title = element_text(lineheight=.8, face="bold", vjust=1))+ # make title bold and add space
geom_point(aes(x=long, y=lat, color=real.unit.price), data=T2, alpha=1, size=0.9)+
scale_color_distiller("Euro/m^2",palette = "Spectral")+
coord_equal(ratio=1) # square plot to avoid the distortionit
Regions defined for each Polygons
# total price
ggplot() +
geom_polygon(data=Ajaccio.city, aes(x=long, y=lat, group=group), fill="grey40",
colour="grey90", alpha=1)+
labs(x=" longitude", y="latitude", title="AJACCIO Appt real total price")+ #labels
theme(axis.ticks.y = element_blank(),axis.text.y = element_blank(), # get rid of x ticks/text
axis.ticks.x = element_blank(),axis.text.x = element_blank(), # get rid of y ticks/text
plot.title = element_text(lineheight=.8, face="bold", vjust=1))+ # make title bold and add space
geom_point(aes(x=long, y=lat, color=T2$`real total price`), data=T2, alpha=1, size=0.8)+
scale_color_distiller("Euro",palette = "Spectral")+
coord_equal(ratio=1) # square plot to avoid the distortionit
Regions defined for each Polygons
A worker is known by his tools. A shovel for a man who digs. An ax for a woodsman. The econometrician runs regressions —- Mastering Metrics: The Path from Cause to Effect
Model 1
The dependent variable is a logged apartment real unit price. On the right-hand side of the Model 1, we consider merely housing internal variables which mean housing features. So, we do not add any time and space dummy ( We do not control time and space effects). In addition, we report the Newey–West standard errors.
library(base)
db = subset(df , select = - c(num.acte , id.parc , x , y , participant))
names(db)
[1] "year" "date" "real.total.price" "total.surface"
[5] "real.unit.price" "nb.pieces" "nb.sdb" "nb.niv"
[9] "nb.iris" "construction.period" "APPT.type" "usage"
[13] "pre.sold" "buyer.dep" "buyer.dep1" "buyer.dep2"
LN.real.unit.price=log(db$real.unit.price,base = exp(1))
ols1=lm(LN.real.unit.price~nb.pieces+nb.sdb+nb.niv+factor(construction.period)
+factor(APPT.type)+factor(usage)+factor(pre.sold)+factor(buyer.dep1) ,data=db)
summary(ols1)
Call:
lm(formula = LN.real.unit.price ~ nb.pieces + nb.sdb + nb.niv +
factor(construction.period) + factor(APPT.type) + factor(usage) +
factor(pre.sold) + factor(buyer.dep1), data = db)
Residuals:
Min 1Q Median 3Q Max
-2.37127 -0.14869 0.01631 0.18097 0.87646
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 7.924301 0.122273 64.808 < 2e-16 ***
nb.pieces -0.052182 0.008737 -5.973 2.80e-09 ***
nb.sdb 0.149147 0.023441 6.363 2.51e-10 ***
nb.niv 0.014780 0.003189 4.635 3.83e-06 ***
factor(construction.period)B -0.225951 0.206271 -1.095 0.2735
factor(construction.period)C -0.166394 0.135779 -1.225 0.2206
factor(construction.period)D -0.072192 0.120074 -0.601 0.5478
factor(construction.period)E 0.012131 0.120298 0.101 0.9197
factor(construction.period)F 0.044733 0.120370 0.372 0.7102
factor(construction.period)G 0.213971 0.125983 1.698 0.0896 .
factor(construction.period)H 0.267038 0.121086 2.205 0.0276 *
factor(construction.period)I 0.213229 0.125285 1.702 0.0889 .
factor(APPT.type)DU 0.058644 0.047559 1.233 0.2177
factor(APPT.type)ST 0.052121 0.028440 1.833 0.0670 .
factor(usage)MI 0.012247 0.168741 0.073 0.9422
factor(usage)RS -0.382653 0.039655 -9.650 < 2e-16 ***
factor(pre.sold)O -0.032684 0.026012 -1.256 0.2091
factor(buyer.dep1)IN -0.210359 0.017269 -12.181 < 2e-16 ***
factor(buyer.dep1)IN1 -0.112705 0.045984 -2.451 0.0143 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.2911 on 1811 degrees of freedom
Multiple R-squared: 0.3078, Adjusted R-squared: 0.3009
F-statistic: 44.74 on 18 and 1811 DF, p-value: < 2.2e-16
library(fmsb)
VIF(lm(LN.real.unit.price~nb.pieces+nb.sdb+nb.niv+factor(construction.period)
+factor(APPT.type)+factor(usage)+factor(pre.sold)+factor(buyer.dep1) ,data=db))
[1] 1.44465
AIC(ols1)
[1] 698.0035
library(sandwich)
library(lmtest)
coeftest(ols1,df=Inf,vcov=vcovHC(ols1,type = "HC0"))
z test of coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 7.9243009 0.1063419 74.5172 < 2.2e-16 ***
nb.pieces -0.0521821 0.0097973 -5.3262 1.003e-07 ***
nb.sdb 0.1491470 0.0248156 6.0102 1.853e-09 ***
nb.niv 0.0147796 0.0031112 4.7505 2.029e-06 ***
factor(construction.period)B -0.2259507 0.2925482 -0.7724 0.439905
factor(construction.period)C -0.1663942 0.1432581 -1.1615 0.245439
factor(construction.period)D -0.0721923 0.1046036 -0.6902 0.490099
factor(construction.period)E 0.0121306 0.1053269 0.1152 0.908309
factor(construction.period)F 0.0447330 0.1052936 0.4248 0.670953
factor(construction.period)G 0.2139712 0.1111577 1.9249 0.054238 .
factor(construction.period)H 0.2670376 0.1047218 2.5500 0.010773 *
factor(construction.period)I 0.2132294 0.1070692 1.9915 0.046425 *
factor(APPT.type)DU 0.0586437 0.0602377 0.9735 0.330286
factor(APPT.type)ST 0.0521214 0.0314784 1.6558 0.097766 .
factor(usage)MI 0.0122466 0.0730838 0.1676 0.866922
factor(usage)RS -0.3826530 0.0273035 -14.0148 < 2.2e-16 ***
factor(pre.sold)O -0.0326842 0.0209926 -1.5569 0.119485
factor(buyer.dep1)IN -0.2103589 0.0146434 -14.3655 < 2.2e-16 ***
factor(buyer.dep1)IN1 -0.1127052 0.0383356 -2.9400 0.003283 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
where independent variables contain the quantity of rooms, the quantity of bathrooms, the storey of a apartment, the construction period of apartments, the apartment types, the use of apartments, the pre-selling apartment or not, and where are buyers from respectively.
| buyers | explanation |
|---|---|
| EX | external buyers, including mainlanders and foreigners |
| IN | local buyer, from South Corsica province |
| IN1 | local buyers, but from Upper Corsica province |
| Construction period | explanation |
|---|---|
| A | 0000 /1850 |
| B | 1850/1913 |
| C | 1914/1947 |
| D | 1948/1969 |
| E | 1970/1980 |
| F | 1981/1991 |
| G | 1992/2000 |
| H | 2001/2010 |
| I | 2011/2020 |
| Z | non renseigne |
| the use of apartments | explanation |
|---|---|
| HA | Habitation |
| MI | Mixte habitation-professionnel |
| PR | Professionnel |
| RS | Résidence de service |
| Apartment Storey | explanation |
|---|---|
| -1 | Pour un appartement situé en rez de chaussée la valeur saisie est: 0 |
| 0 | à l’entresol : 1,5 |
| 1.5 | au sous-sol : -1 |
| Apartment type | explanation |
|---|---|
| AS | Appartement Standard: deux pièces sur un niveau fût-il avec mezzanine |
| DU | Duplex: appartement sur 2 niveaux communiquant entre eux par un escalier intérieur ou extérieur |
| ST | Studio: appartement une pièce, cuisine, salle de bains |
| TR | Triplex: appartement sur 3 niveaux communiquant entre eux par un escalier intérieurou extérieur |
| SU | Villa: pavillon cossu ; le prix global (généralement élevé) permet de la distinguer du pavillon, l’époque est récente ( à partir de l’époque D) avec des dépendances luxueuses (piscine, tennis, parc…). Peut être situé le long du littoral. |
Model 2
Model2 = Model1 + time dummies (time fixed effects)
ols2=lm(LN.real.unit.price~nb.pieces+nb.sdb+nb.niv+factor(construction.period)
+factor(APPT.type)+factor(usage)+factor(pre.sold)+factor(buyer.dep1)+factor(year) ,data=db)
VIF(lm(LN.real.unit.price~nb.pieces+nb.sdb+nb.niv+factor(construction.period)
+factor(APPT.type)+factor(usage)+factor(pre.sold)+factor(buyer.dep1)+factor(year) ,data=db))
[1] 1.530589
AIC(ols2)
[1] 606.2566
coeftest(ols2,df=Inf,vcov=vcovHC(ols2,type = "HC0"))
z test of coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 7.78821307 0.11873277 65.5945 < 2.2e-16 ***
nb.pieces -0.05228516 0.00977997 -5.3461 8.985e-08 ***
nb.sdb 0.15147362 0.02396871 6.3196 2.622e-10 ***
nb.niv 0.01313036 0.00307314 4.2726 1.932e-05 ***
factor(construction.period)B -0.27439547 0.30202089 -0.9085 0.363598
factor(construction.period)C -0.18227296 0.14433360 -1.2629 0.206640
factor(construction.period)D -0.09195017 0.11545824 -0.7964 0.425803
factor(construction.period)E -0.00654468 0.11597611 -0.0564 0.954998
factor(construction.period)F 0.02993650 0.11591025 0.2583 0.796196
factor(construction.period)G 0.19407857 0.12070545 1.6079 0.107864
factor(construction.period)H 0.21845207 0.11535734 1.8937 0.058265 .
factor(construction.period)I 0.12351449 0.11783390 1.0482 0.294543
factor(APPT.type)DU 0.04820384 0.05979334 0.8062 0.420142
factor(APPT.type)ST 0.05344321 0.03047490 1.7537 0.079485 .
factor(usage)MI -0.03993356 0.08512176 -0.4691 0.638973
factor(usage)RS -0.39009390 0.02824476 -13.8112 < 2.2e-16 ***
factor(pre.sold)O -0.00078173 0.02307088 -0.0339 0.972970
factor(buyer.dep1)IN -0.20398957 0.01426248 -14.3025 < 2.2e-16 ***
factor(buyer.dep1)IN1 -0.11136904 0.03713397 -2.9991 0.002708 **
factor(year)2007 0.17494203 0.02444350 7.1570 8.247e-13 ***
factor(year)2008 0.14836382 0.02858608 5.1901 2.102e-07 ***
factor(year)2009 0.18377952 0.02713556 6.7726 1.264e-11 ***
factor(year)2010 0.22511982 0.02741568 8.2114 < 2.2e-16 ***
factor(year)2011 0.22311191 0.02956448 7.5466 4.467e-14 ***
factor(year)2012 0.17184917 0.02908951 5.9076 3.471e-09 ***
factor(year)2013 0.19659261 0.02995315 6.5633 5.262e-11 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Comparing with Model1, AIC value decreases (698 to 606). In addition, year dummies are all significantly postive. and the magnitude is relatively large.
Model 3
Model3 = Model1 + time dummies (time fixed effects) + location dummies (iris level)
ols3=lm(LN.real.unit.price~nb.pieces+nb.sdb+nb.niv+factor(construction.period)
+factor(APPT.type)+factor(usage)+factor(pre.sold)+factor(buyer.dep1)
+factor(year)+factor(nb.iris) ,data=db)
VIF(lm(LN.real.unit.price~nb.pieces+nb.sdb+nb.niv+factor(construction.period)
+factor(APPT.type)+factor(usage)+factor(pre.sold)+factor(buyer.dep1)
+factor(year)+factor(nb.iris) ,data=db))
[1] 2.085276
AIC(ols3)
[1] 86.33131
coeftest(ols3,df=Inf,vcov=vcovHC(ols3,type = "HC0"))
z test of coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 7.6759402 0.1204581 63.7229 < 2.2e-16 ***
nb.pieces -0.0396663 0.0093318 -4.2506 2.132e-05 ***
nb.sdb 0.0565485 0.0207961 2.7192 0.0065443 **
nb.niv 0.0160734 0.0028762 5.5885 2.290e-08 ***
factor(construction.period)B -0.2927481 0.3036773 -0.9640 0.3350407
factor(construction.period)C -0.2146993 0.1388022 -1.5468 0.1219115
factor(construction.period)D -0.0977482 0.1135845 -0.8606 0.3894713
factor(construction.period)E -0.0591470 0.1144935 -0.5166 0.6054374
factor(construction.period)F -0.0185383 0.1151081 -0.1611 0.8720532
factor(construction.period)G 0.0911369 0.1168287 0.7801 0.4353379
factor(construction.period)H 0.1054658 0.1137718 0.9270 0.3539295
factor(construction.period)I 0.1140151 0.1184226 0.9628 0.3356569
factor(APPT.type)DU 0.0543485 0.0540499 1.0055 0.3146440
factor(APPT.type)ST 0.0211925 0.0283942 0.7464 0.4554466
factor(usage)MI 0.1220288 0.0791682 1.5414 0.1232230
factor(usage)RS -0.4930251 0.0301545 -16.3500 < 2.2e-16 ***
factor(pre.sold)O 0.0085895 0.0195850 0.4386 0.6609679
factor(buyer.dep1)IN -0.1104193 0.0122500 -9.0138 < 2.2e-16 ***
factor(buyer.dep1)IN1 -0.0458727 0.0289018 -1.5872 0.1124700
factor(year)2007 0.1315889 0.0237572 5.5389 3.044e-08 ***
factor(year)2008 0.1178172 0.0273606 4.3061 1.662e-05 ***
factor(year)2009 0.1349412 0.0251617 5.3629 8.187e-08 ***
factor(year)2010 0.1864585 0.0245029 7.6096 2.748e-14 ***
factor(year)2011 0.1973532 0.0264573 7.4593 8.698e-14 ***
factor(year)2012 0.1552320 0.0262193 5.9205 3.209e-09 ***
factor(year)2013 0.1659924 0.0283721 5.8506 4.899e-09 ***
factor(nb.iris)2A0040102 -0.0944130 0.0830830 -1.1364 0.2558019
factor(nb.iris)2A0040103 0.1380254 0.0513568 2.6876 0.0071972 **
factor(nb.iris)2A0040201 0.1160758 0.0633837 1.8313 0.0670527 .
factor(nb.iris)2A0040202 0.1258222 0.0671428 1.8739 0.0609375 .
factor(nb.iris)2A0040203 0.1895006 0.0527496 3.5925 0.0003276 ***
factor(nb.iris)2A0040301 0.2939439 0.0464633 6.3264 2.510e-10 ***
factor(nb.iris)2A0040302 0.4211826 0.0426299 9.8800 < 2.2e-16 ***
factor(nb.iris)2A0040401 0.3561996 0.0361094 9.8645 < 2.2e-16 ***
factor(nb.iris)2A0040402 0.4111161 0.0369978 11.1119 < 2.2e-16 ***
factor(nb.iris)2A0040501 0.0313271 0.0412229 0.7599 0.4472872
factor(nb.iris)2A0040502 -0.0567997 0.0493909 -1.1500 0.2501426
factor(nb.iris)2A0040503 0.0793065 0.0511584 1.5502 0.1210896
factor(nb.iris)2A0040601 -0.0756932 0.0457359 -1.6550 0.0979229 .
factor(nb.iris)2A0040602 0.0559458 0.0378320 1.4788 0.1391954
factor(nb.iris)2A0040701 -0.0441293 0.0398407 -1.1076 0.2680153
factor(nb.iris)2A0040702 -0.0116604 0.0506443 -0.2302 0.8179047
factor(nb.iris)2A0040703 0.0244596 0.0433735 0.5639 0.5728018
factor(nb.iris)2A0040801 0.1925476 0.0388264 4.9592 7.079e-07 ***
factor(nb.iris)2A0040802 0.0351924 0.0540296 0.6514 0.5148180
factor(nb.iris)2A0040803 0.0813445 0.0394550 2.0617 0.0392361 *
factor(nb.iris)2A0040901 0.0369340 0.0431902 0.8551 0.3924688
factor(nb.iris)2A0040902 0.0139872 0.0526943 0.2654 0.7906708
factor(nb.iris)2A0040903 -0.0243788 0.0726077 -0.3358 0.7370520
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Comparing with Model2, AIC value highly decreases (606 to 83). In addition, year dummies are all significantly postive. and the magnitude is relatively large. Some locational dummies are significant. The magnitudes of these significant dummies are all positive.
Conclusion
The significant variables contain the quantity of rooms, the quantity of bathrooms, the dwelling storey, the use of apartment, where buyers come from, year dummies, and location dummies.
The coefficients of dwelling storey is significantly positive via 3 models, however, the magnitudes of the coefficients are small.
Via the results of 3 model, ceteris paribus, the unit price of assisted living facilities is much lower than the unit price of normal residences.
In addition, we confirm the existence of double housing markets in Ajaccio. Ceteris paribus, the internal buyers will pay less than a external buyer, especially the locally departmental buyers. The coefficient of Upper Corsica buyer is not significant in model 3 but in other 2 models, the coefficients are significant. We think that with the observation quantity increasing, the coefficient will be significant.
All year dummies are significantly positive. Additionally, the coefficients of significantly location dummies are entirely positive.
The results of 3 models show that the coefficient of the quantity of rooms are significantly negative. This result is unexpected. We think We think this is due to the facts that dwelling buyers have different sensibilities to unit room surface. E.g., buyers of small dwellings hope that there are less rooms in their dwelling; on the contrary, large house buyers hope that there are more rooms in their dwellings for the purpose of adding dwelling functions.
Model 4
Model 4 = Reformation of Model 3
In order to control interactions between the surface of dweling and the quantity of rooms, we replace the dependent variable, logged unit price by logged total price. On the right-hand side of the Model 4, we add an interaction term of a continuous variable (logged surface) and a categorical variable (quantity of rooms)
LN.total.surface=log(db$total.surface,base = exp(1))
LN.real.total.price=log(db$real.total.price,base = exp(1))
ols4=lm(LN.real.total.price~LN.total.surface+factor(nb.pieces)+LN.total.surface*factor(nb.pieces)+nb.sdb+nb.niv+factor(construction.period)+factor(APPT.type)+factor(usage)+factor(pre.sold)+factor(buyer.dep1)+factor(year)+factor(nb.iris),data=db)
library(lmtest)
coeftest(ols4,df=Inf,vcov=vcovHC(ols4,type = "HC0"))
z test of coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 9.2178913 0.4392565 20.9852 < 2.2e-16 ***
LN.total.surface 0.6037406 0.1068505 5.6503 1.601e-08 ***
factor(nb.pieces)2 -1.1594441 0.4668242 -2.4837 0.0130031 *
factor(nb.pieces)3 -1.2905725 0.4952148 -2.6061 0.0091583 **
factor(nb.pieces)4 -1.6737934 0.5189486 -3.2254 0.0012582 **
factor(nb.pieces)5 -1.8476598 0.6649826 -2.7785 0.0054609 **
factor(nb.pieces)6 -1.5856013 1.4706909 -1.0781 0.2809741
factor(nb.pieces)7 -2.4797405 5.6761767 -0.4369 0.6622070
nb.sdb 0.0586450 0.0239573 2.4479 0.0143691 *
nb.niv 0.0155711 0.0028602 5.4440 5.209e-08 ***
factor(construction.period)B -0.2989861 0.3102020 -0.9638 0.3351245
factor(construction.period)C -0.2174346 0.1402283 -1.5506 0.1210033
factor(construction.period)D -0.0980574 0.1143629 -0.8574 0.3912111
factor(construction.period)E -0.0521677 0.1150689 -0.4534 0.6502890
factor(construction.period)F -0.0189316 0.1158878 -0.1634 0.8702336
factor(construction.period)G 0.0928146 0.1177757 0.7881 0.4306600
factor(construction.period)H 0.1047662 0.1144474 0.9154 0.3599770
factor(construction.period)I 0.1078721 0.1186764 0.9090 0.3633713
factor(APPT.type)DU 0.0522652 0.0573048 0.9121 0.3617386
factor(APPT.type)ST -0.2271774 0.1193143 -1.9040 0.0569069 .
factor(usage)MI 0.1128631 0.0796278 1.4174 0.1563709
factor(usage)RS -0.5610477 0.0347772 -16.1327 < 2.2e-16 ***
factor(pre.sold)O 0.0101030 0.0198196 0.5097 0.6102282
factor(buyer.dep1)IN -0.1111877 0.0121120 -9.1799 < 2.2e-16 ***
factor(buyer.dep1)IN1 -0.0475549 0.0291817 -1.6296 0.1031837
factor(year)2007 0.1337164 0.0231907 5.7659 8.120e-09 ***
factor(year)2008 0.1188732 0.0272936 4.3553 1.329e-05 ***
factor(year)2009 0.1308595 0.0245051 5.3401 9.290e-08 ***
factor(year)2010 0.1842979 0.0239165 7.7059 1.299e-14 ***
factor(year)2011 0.1987524 0.0256365 7.7527 8.995e-15 ***
factor(year)2012 0.1550307 0.0252906 6.1300 8.789e-10 ***
factor(year)2013 0.1709664 0.0279392 6.1192 9.402e-10 ***
factor(nb.iris)2A0040102 -0.0743332 0.0817451 -0.9093 0.3631768
factor(nb.iris)2A0040103 0.1375923 0.0510383 2.6959 0.0070207 **
factor(nb.iris)2A0040201 0.1203526 0.0631558 1.9056 0.0566963 .
factor(nb.iris)2A0040202 0.1130853 0.0673283 1.6796 0.0930334 .
factor(nb.iris)2A0040203 0.2019214 0.0524926 3.8467 0.0001197 ***
factor(nb.iris)2A0040301 0.3097626 0.0460635 6.7247 1.760e-11 ***
factor(nb.iris)2A0040302 0.4245609 0.0425306 9.9825 < 2.2e-16 ***
factor(nb.iris)2A0040401 0.3585089 0.0356492 10.0566 < 2.2e-16 ***
factor(nb.iris)2A0040402 0.4209683 0.0365865 11.5061 < 2.2e-16 ***
factor(nb.iris)2A0040501 0.0464501 0.0408661 1.1366 0.2556884
factor(nb.iris)2A0040502 -0.0501107 0.0497006 -1.0083 0.3133338
factor(nb.iris)2A0040503 0.0896092 0.0503181 1.7809 0.0749359 .
factor(nb.iris)2A0040601 -0.0703529 0.0456383 -1.5415 0.1231874
factor(nb.iris)2A0040602 0.0656090 0.0372509 1.7613 0.0781926 .
factor(nb.iris)2A0040701 -0.0316826 0.0406240 -0.7799 0.4354504
factor(nb.iris)2A0040702 0.0088767 0.0442437 0.2006 0.8409866
factor(nb.iris)2A0040703 0.0312297 0.0431877 0.7231 0.4696084
factor(nb.iris)2A0040801 0.1969233 0.0384737 5.1184 3.082e-07 ***
factor(nb.iris)2A0040802 0.0486137 0.0531569 0.9145 0.3604366
factor(nb.iris)2A0040803 0.0976202 0.0393370 2.4816 0.0130780 *
factor(nb.iris)2A0040901 0.0241412 0.0434469 0.5556 0.5784512
factor(nb.iris)2A0040902 0.0293047 0.0530151 0.5528 0.5804267
factor(nb.iris)2A0040903 -0.0192612 0.0691658 -0.2785 0.7806449
LN.total.surface:factor(nb.pieces)2 0.2743132 0.1185914 2.3131 0.0207174 *
LN.total.surface:factor(nb.pieces)3 0.3057169 0.1230278 2.4849 0.0129573 *
LN.total.surface:factor(nb.pieces)4 0.3903167 0.1262324 3.0920 0.0019878 **
LN.total.surface:factor(nb.pieces)5 0.4082745 0.1526451 2.6747 0.0074804 **
LN.total.surface:factor(nb.pieces)6 0.3593282 0.3155228 1.1388 0.2547723
LN.total.surface:factor(nb.pieces)7 0.5923920 1.2448038 0.4759 0.6341514
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
library(fmsb)
VIF(lm(LN.real.total.price~LN.total.surface+factor(nb.pieces)+LN.total.surface*factor(nb.pieces)+nb.sdb+nb.niv+factor(construction.period)+factor(APPT.type)+factor(usage)+factor(pre.sold)+factor(buyer.dep1)+factor(year)+factor(nb.iris),data=db))
[1] 5.276509
AIC(ols4)
[1] 58.6591
According to the results, we achieve our goal.
loc.amenities=read.csv("loc.amenities.csv",header = TRUE)
summary(subset(loc.amenities,select = -num.acte))
distance.airport distance.beaches distance.cinemas distance.commerce distance.hosptials
Min. : 1632 Min. : 77.21 Min. : 71.3 Min. : 1.694 Min. : 55.3
1st Qu.: 4647 1st Qu.: 658.09 1st Qu.: 857.6 1st Qu.: 232.695 1st Qu.: 624.0
Median : 5065 Median :1188.35 Median : 1487.8 Median : 469.292 Median : 1332.2
Mean : 5446 Mean :1246.78 Mean : 1731.1 Mean : 927.509 Mean : 1745.7
3rd Qu.: 6467 3rd Qu.:1755.90 3rd Qu.: 1928.7 3rd Qu.: 1070.357 3rd Qu.: 2304.5
Max. :16500 Max. :6340.84 Max. :11946.1 Max. :11224.948 Max. :11536.5
distance.junctions distance.midhighschool distance.monument distance.nursery
Min. : 5.328 Min. : 34.19 Min. : 37.23 Min. : 1.821
1st Qu.: 144.836 1st Qu.: 374.31 1st Qu.: 851.09 1st Qu.: 196.002
Median : 272.802 Median : 614.11 Median :1739.98 Median : 288.244
Mean : 426.335 Mean : 1348.84 Mean :1827.81 Mean : 662.760
3rd Qu.: 410.562 3rd Qu.: 1811.40 3rd Qu.:2256.53 3rd Qu.: 509.008
Max. :2788.759 Max. :11374.92 Max. :6746.08 Max. :9738.223
distance.port distance.railway.stations distance.railways distance.roads
Min. : 258.7 Min. : 56.56 Min. : 0.731 Min. : 0.1302
1st Qu.: 1370.1 1st Qu.: 632.89 1st Qu.: 430.601 1st Qu.: 54.5921
Median : 2025.5 Median : 990.89 Median : 916.040 Median : 104.6084
Mean : 2344.2 Mean : 1679.30 Mean : 1566.558 Mean : 154.1840
3rd Qu.: 2693.8 3rd Qu.: 2698.19 3rd Qu.: 2692.077 3rd Qu.: 183.7347
Max. :12443.6 Max. :11835.05 Max. :11786.011 Max. :1518.4929
dis=as.matrix(subset(loc.amenities,select = -num.acte))
library(matrixStats)
SD=print(colSds(dis))
[1] 1940.6506 734.9282 1385.0884 1226.9680 1554.1766 518.2546 1531.1381 1324.0607
[9] 1039.3480 1527.8269 1611.4228 1674.9391 157.6615
names(loc.amenities)
[1] "num.acte" "distance.airport" "distance.beaches"
[4] "distance.cinemas" "distance.commerce" "distance.hosptials"
[7] "distance.junctions" "distance.midhighschool" "distance.monument"
[10] "distance.nursery" "distance.port" "distance.railway.stations"
[13] "distance.railways" "distance.roads"
colna=as.vector(names(loc.amenities))
colna
[1] "num.acte" "distance.airport" "distance.beaches"
[4] "distance.cinemas" "distance.commerce" "distance.hosptials"
[7] "distance.junctions" "distance.midhighschool" "distance.monument"
[10] "distance.nursery" "distance.port" "distance.railway.stations"
[13] "distance.railways" "distance.roads"
colna1=colna[c(2:14)]
distance.amenities=as.data.frame(cbind(colna1,SD))
distance.amenities
Model 5
Model 5 = Model 1 + distances to amenities and public facilities
#merging
includ.dis=merge(df,loc.amenities,by="num.acte")
#write.csv(includ.dis,file = "complete with distances.csv",row.names = F)
includ.dis=read.csv("complete with distances.csv",header = TRUE)
#
names(includ.dis)
[1] "num.acte" "id.parc" "year"
[4] "date" "real.total.price" "total.surface"
[7] "real.unit.price" "nb.pieces" "nb.sdb"
[10] "nb.niv" "nb.iris" "construction.period"
[13] "APPT.type" "usage" "pre.sold"
[16] "buyer.dep" "buyer.dep1" "buyer.dep2"
[19] "x" "y" "participant"
[22] "distance.airport" "distance.beaches" "distance.cinemas"
[25] "distance.commerce" "distance.hosptials" "distance.junctions"
[28] "distance.midhighschool" "distance.monument" "distance.nursery"
[31] "distance.port" "distance.railway.stations" "distance.railways"
[34] "distance.roads"
LN.real.unit.price=log(includ.dis$real.unit.price,base = exp(1))
ols5=lm(LN.real.unit.price~nb.pieces+nb.sdb+nb.niv+factor(construction.period)
+factor(APPT.type)+factor(usage)+factor(pre.sold)+factor(buyer.dep1)+distance.airport
+distance.beaches+distance.cinemas+distance.commerce+distance.hosptials
+distance.junctions+distance.midhighschool+distance.monument
+distance.nursery+distance.port+distance.railway.stations
+distance.railways+distance.roads,data=includ.dis)
summary(ols5)
Call:
lm(formula = LN.real.unit.price ~ nb.pieces + nb.sdb + nb.niv +
factor(construction.period) + factor(APPT.type) + factor(usage) +
factor(pre.sold) + factor(buyer.dep1) + distance.airport +
distance.beaches + distance.cinemas + distance.commerce +
distance.hosptials + distance.junctions + distance.midhighschool +
distance.monument + distance.nursery + distance.port + distance.railway.stations +
distance.railways + distance.roads, data = includ.dis)
Residuals:
Min 1Q Median 3Q Max
-2.27061 -0.10153 0.01735 0.14114 0.77035
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 8.268e+00 1.918e-01 43.100 < 2e-16 ***
nb.pieces -4.827e-02 7.766e-03 -6.216 6.34e-10 ***
nb.sdb 6.017e-02 2.077e-02 2.897 0.00382 **
nb.niv 1.763e-02 2.841e-03 6.206 6.73e-10 ***
factor(construction.period)B -5.951e-01 2.063e-01 -2.884 0.00397 **
factor(construction.period)C -2.507e-01 1.184e-01 -2.118 0.03435 *
factor(construction.period)D -1.300e-01 1.059e-01 -1.227 0.21998
factor(construction.period)E -6.689e-02 1.061e-01 -0.630 0.52853
factor(construction.period)F -4.279e-02 1.057e-01 -0.405 0.68568
factor(construction.period)G 7.133e-02 1.111e-01 0.642 0.52100
factor(construction.period)H 1.029e-01 1.073e-01 0.959 0.33763
factor(construction.period)I 2.085e-01 1.123e-01 1.856 0.06356 .
factor(APPT.type)DU 2.672e-02 4.614e-02 0.579 0.56264
factor(APPT.type)ST -6.915e-03 2.512e-02 -0.275 0.78316
factor(usage)MI 1.143e-01 1.470e-01 0.778 0.43688
factor(usage)RS -6.026e-01 5.744e-02 -10.491 < 2e-16 ***
factor(pre.sold)O -3.066e-02 2.298e-02 -1.335 0.18219
factor(buyer.dep1)IN -1.079e-01 1.601e-02 -6.740 2.13e-11 ***
factor(buyer.dep1)IN1 -5.715e-02 4.017e-02 -1.423 0.15498
distance.airport -7.753e-05 4.363e-05 -1.777 0.07576 .
distance.beaches 5.050e-06 3.409e-05 0.148 0.88226
distance.cinemas -1.285e-04 4.862e-05 -2.644 0.00827 **
distance.commerce 8.643e-05 2.708e-05 3.192 0.00144 **
distance.hosptials -3.217e-04 4.760e-05 -6.757 1.90e-11 ***
distance.junctions -1.804e-05 4.320e-05 -0.418 0.67622
distance.midhighschool 9.508e-05 5.578e-05 1.704 0.08846 .
distance.monument 3.704e-05 3.298e-05 1.123 0.26154
distance.nursery 8.746e-05 2.812e-05 3.110 0.00190 **
distance.port 1.427e-04 5.515e-05 2.587 0.00977 **
distance.railway.stations 3.539e-04 5.767e-05 6.137 1.04e-09 ***
distance.railways -1.950e-04 9.714e-05 -2.007 0.04488 *
distance.roads 2.565e-05 6.970e-05 0.368 0.71296
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.2509 on 1786 degrees of freedom
Multiple R-squared: 0.4897, Adjusted R-squared: 0.4809
F-statistic: 55.29 on 31 and 1786 DF, p-value: < 2.2e-16
library(fmsb)
VIF(lm(LN.real.unit.price~nb.pieces+nb.sdb+nb.niv+factor(construction.period)
+factor(APPT.type)+factor(usage)+factor(pre.sold)+factor(buyer.dep1)+distance.airport
+distance.beaches+distance.cinemas+distance.commerce+distance.hosptials
+distance.junctions+distance.midhighschool+distance.monument
+distance.nursery+distance.port+distance.railway.stations
+distance.railways+distance.roads,data=includ.dis))
[1] 1.959685
AIC(ols5)
[1] 165.7312
library(sandwich)
library(lmtest)
coeftest(ols5,df=Inf,vcov=vcovHC(ols5,type = "HC0"))
z test of coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 8.2678e+00 2.0971e-01 39.4257 < 2.2e-16 ***
nb.pieces -4.8273e-02 9.1569e-03 -5.2718 1.351e-07 ***
nb.sdb 6.0169e-02 2.1451e-02 2.8049 0.005033 **
nb.niv 1.7634e-02 2.8755e-03 6.1324 8.657e-10 ***
factor(construction.period)B -5.9512e-01 2.4636e-01 -2.4157 0.015705 *
factor(construction.period)C -2.5067e-01 1.3446e-01 -1.8643 0.062285 .
factor(construction.period)D -1.3000e-01 9.7869e-02 -1.3283 0.184084
factor(construction.period)E -6.6886e-02 9.8947e-02 -0.6760 0.499054
factor(construction.period)F -4.2790e-02 9.8912e-02 -0.4326 0.665297
factor(construction.period)G 7.1330e-02 1.0157e-01 0.7022 0.482525
factor(construction.period)H 1.0294e-01 9.9392e-02 1.0356 0.300367
factor(construction.period)I 2.0852e-01 1.0175e-01 2.0494 0.040422 *
factor(APPT.type)DU 2.6717e-02 6.2471e-02 0.4277 0.668889
factor(APPT.type)ST -6.9146e-03 2.8802e-02 -0.2401 0.810275
factor(usage)MI 1.1429e-01 9.9708e-02 1.1462 0.251705
factor(usage)RS -6.0258e-01 8.3756e-02 -7.1945 6.267e-13 ***
factor(pre.sold)O -3.0664e-02 1.8022e-02 -1.7015 0.088849 .
factor(buyer.dep1)IN -1.0790e-01 1.4590e-02 -7.3956 1.408e-13 ***
factor(buyer.dep1)IN1 -5.7150e-02 3.3148e-02 -1.7241 0.084697 .
distance.airport -7.7525e-05 5.0843e-05 -1.5248 0.127312
distance.beaches 5.0495e-06 3.9886e-05 0.1266 0.899257
distance.cinemas -1.2853e-04 4.7992e-05 -2.6782 0.007403 **
distance.commerce 8.6432e-05 2.8700e-05 3.0115 0.002599 **
distance.hosptials -3.2166e-04 6.5833e-05 -4.8860 1.029e-06 ***
distance.junctions -1.8043e-05 5.8430e-05 -0.3088 0.757481
distance.midhighschool 9.5084e-05 6.2667e-05 1.5173 0.129194
distance.monument 3.7038e-05 4.6882e-05 0.7900 0.429516
distance.nursery 8.7464e-05 3.0963e-05 2.8248 0.004730 **
distance.port 1.4266e-04 8.1657e-05 1.7471 0.080620 .
distance.railway.stations 3.5388e-04 5.3659e-05 6.5949 4.255e-11 ***
distance.railways -1.9498e-04 1.0153e-04 -1.9204 0.054803 .
distance.roads 2.5646e-05 6.9207e-05 0.3706 0.710953
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Comparing with Model 1, there is a huge reduction of AIC value. Now, we check the significance of the coefficient of covariates. Obviously, the coefficient of quantity of rooms is not significance anymore. On the contrary, the coefficients of quantity of bathrooms and apartment storeys are negative respectively. There are two coefficients of construction period variables are significant. The coefficient of the variable construction period during 1850/1913 is highly negative; on the contrary, The coefficient of construction period during 2011/2020 is postive. Assisted living facilities is highly negative, the magnitude of coefficient in Model 5 is twice as large as the magnitude in Model 1. Now, we focus on covariates about distances to amenities and public facilities. Among 13 covariates, 5 covariates are significant. The coefficients of distance to stores and supermarket, distance to nursery and primary school, distance to railway stations are significantly postive, but the magnitudes of the coefficients are so small. Meanwhile, the coefficients of distance to hospitals and cinemas are significantly negative. The negative coefficient of distance to hospitals might be understandable. Still, the negative coefficient of distance to cinemas and theatres confuse us. We think this is due to the fact that we lose the control variables of time and space.
Additionally, we observe a huge reduction of AIC value (from 698 to 165).
Model 6
Model 6 = Model 3 + distances to amenities and public facilities
ols6=lm(LN.real.unit.price~nb.pieces+nb.sdb+nb.niv+factor(construction.period)
+factor(APPT.type)+factor(usage)+factor(pre.sold)+factor(buyer.dep1)
+factor(year)+factor(nb.iris)+distance.airport
+distance.beaches+distance.cinemas+distance.commerce+distance.hosptials
+distance.junctions+distance.midhighschool+distance.monument
+distance.nursery+distance.port+distance.railway.stations
+distance.railways+distance.roads,data=includ.dis)
summary(ols6)
Call:
lm(formula = LN.real.unit.price ~ nb.pieces + nb.sdb + nb.niv +
factor(construction.period) + factor(APPT.type) + factor(usage) +
factor(pre.sold) + factor(buyer.dep1) + factor(year) + factor(nb.iris) +
distance.airport + distance.beaches + distance.cinemas +
distance.commerce + distance.hosptials + distance.junctions +
distance.midhighschool + distance.monument + distance.nursery +
distance.port + distance.railway.stations + distance.railways +
distance.roads, data = includ.dis)
Residuals:
Min 1Q Median 3Q Max
-2.14767 -0.10004 0.01435 0.13241 0.72015
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 7.896e+00 2.536e-01 31.132 < 2e-16 ***
nb.pieces -4.329e-02 7.645e-03 -5.662 1.74e-08 ***
nb.sdb 5.414e-02 2.024e-02 2.675 0.007540 **
nb.niv 1.721e-02 2.806e-03 6.134 1.06e-09 ***
factor(construction.period)B -5.928e-01 2.021e-01 -2.934 0.003394 **
factor(construction.period)C -2.394e-01 1.155e-01 -2.073 0.038329 *
factor(construction.period)D -1.177e-01 1.031e-01 -1.141 0.253981
factor(construction.period)E -7.253e-02 1.031e-01 -0.703 0.481885
factor(construction.period)F -3.990e-02 1.030e-01 -0.387 0.698486
factor(construction.period)G 7.957e-02 1.082e-01 0.735 0.462184
factor(construction.period)H 8.831e-02 1.047e-01 0.843 0.399215
factor(construction.period)I 1.536e-01 1.131e-01 1.359 0.174356
factor(APPT.type)DU 1.453e-02 4.537e-02 0.320 0.748875
factor(APPT.type)ST 3.562e-03 2.460e-02 0.145 0.884879
factor(usage)MI 1.981e-01 1.484e-01 1.335 0.182180
factor(usage)RS -5.473e-01 6.398e-02 -8.554 < 2e-16 ***
factor(pre.sold)O 5.632e-03 2.417e-02 0.233 0.815750
factor(buyer.dep1)IN -1.018e-01 1.560e-02 -6.526 8.83e-11 ***
factor(buyer.dep1)IN1 -4.747e-02 3.892e-02 -1.220 0.222726
factor(year)2007 1.293e-01 2.193e-02 5.895 4.49e-09 ***
factor(year)2008 1.138e-01 2.350e-02 4.841 1.41e-06 ***
factor(year)2009 1.389e-01 2.384e-02 5.828 6.67e-09 ***
factor(year)2010 1.815e-01 2.406e-02 7.542 7.40e-14 ***
factor(year)2011 1.882e-01 2.592e-02 7.262 5.71e-13 ***
factor(year)2012 1.458e-01 2.313e-02 6.304 3.65e-10 ***
factor(year)2013 1.726e-01 2.549e-02 6.770 1.75e-11 ***
factor(nb.iris)2A0040102 -9.140e-02 5.604e-02 -1.631 0.103077
factor(nb.iris)2A0040103 8.299e-02 5.294e-02 1.568 0.117147
factor(nb.iris)2A0040201 6.319e-02 8.414e-02 0.751 0.452739
factor(nb.iris)2A0040202 9.249e-02 1.019e-01 0.907 0.364338
factor(nb.iris)2A0040203 7.055e-02 7.386e-02 0.955 0.339580
factor(nb.iris)2A0040301 1.931e-01 7.374e-02 2.618 0.008917 **
factor(nb.iris)2A0040302 2.665e-01 9.170e-02 2.906 0.003702 **
factor(nb.iris)2A0040401 3.267e-01 1.042e-01 3.134 0.001754 **
factor(nb.iris)2A0040402 3.766e-01 1.046e-01 3.601 0.000325 ***
factor(nb.iris)2A0040501 9.963e-03 6.137e-02 0.162 0.871058
factor(nb.iris)2A0040502 -9.640e-02 5.773e-02 -1.670 0.095154 .
factor(nb.iris)2A0040503 1.309e-01 6.961e-02 1.881 0.060159 .
factor(nb.iris)2A0040601 -8.838e-02 8.949e-02 -0.988 0.323494
factor(nb.iris)2A0040602 1.610e-02 7.344e-02 0.219 0.826483
factor(nb.iris)2A0040701 4.036e-02 2.520e-01 0.160 0.872810
factor(nb.iris)2A0040702 7.683e-02 9.233e-02 0.832 0.405427
factor(nb.iris)2A0040703 7.161e-02 7.973e-02 0.898 0.369203
factor(nb.iris)2A0040801 2.090e-01 7.876e-02 2.654 0.008034 **
factor(nb.iris)2A0040802 1.733e-01 8.687e-02 1.995 0.046210 *
factor(nb.iris)2A0040803 1.983e-01 1.030e-01 1.925 0.054335 .
factor(nb.iris)2A0040901 1.781e-01 9.424e-02 1.890 0.058979 .
factor(nb.iris)2A0040902 2.720e-01 1.524e-01 1.785 0.074452 .
factor(nb.iris)2A0040903 9.563e-02 1.111e-01 0.861 0.389300
distance.airport -4.117e-05 5.822e-05 -0.707 0.479580
distance.beaches 3.040e-05 4.087e-05 0.744 0.457152
distance.cinemas -3.646e-05 7.229e-05 -0.504 0.614087
distance.commerce 1.639e-06 5.288e-05 0.031 0.975280
distance.hosptials -1.819e-04 9.309e-05 -1.954 0.050843 .
distance.junctions 5.212e-05 5.551e-05 0.939 0.347920
distance.midhighschool -1.091e-05 8.253e-05 -0.132 0.894867
distance.monument -1.766e-05 3.628e-05 -0.487 0.626433
distance.nursery 1.679e-04 4.262e-05 3.940 8.46e-05 ***
distance.port 6.085e-05 1.014e-04 0.600 0.548394
distance.railway.stations 2.095e-04 9.343e-05 2.242 0.025088 *
distance.railways -1.309e-04 1.346e-04 -0.972 0.330965
distance.roads 4.132e-05 7.937e-05 0.521 0.602688
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.241 on 1756 degrees of freedom
Multiple R-squared: 0.537, Adjusted R-squared: 0.5209
F-statistic: 33.39 on 61 and 1756 DF, p-value: < 2.2e-16
library(fmsb)
VIF(lm(LN.real.unit.price~nb.pieces+nb.sdb+nb.niv+factor(construction.period)
+factor(APPT.type)+factor(usage)+factor(pre.sold)+factor(buyer.dep1)
+factor(year)+factor(nb.iris)+distance.airport
+distance.beaches+distance.cinemas+distance.commerce+distance.hosptials
+distance.junctions+distance.midhighschool+distance.monument
+distance.nursery+distance.port+distance.railway.stations
+distance.railways+distance.roads,data=includ.dis))
[1] 2.159923
AIC(ols6)
[1] 48.85945
library(sandwich)
library(lmtest)
coeftest(ols6,df=Inf,vcov=vcovHC(ols6,type = "HC0"))
z test of coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 7.8963e+00 2.7183e-01 29.0491 < 2.2e-16 ***
nb.pieces -4.3289e-02 9.3536e-03 -4.6281 3.690e-06 ***
nb.sdb 5.4136e-02 2.0602e-02 2.6277 0.0085975 **
nb.niv 1.7210e-02 2.8639e-03 6.0092 1.864e-09 ***
factor(construction.period)B -5.9284e-01 2.8261e-01 -2.0977 0.0359310 *
factor(construction.period)C -2.3937e-01 1.3615e-01 -1.7581 0.0787230 .
factor(construction.period)D -1.1770e-01 1.1185e-01 -1.0523 0.2926692
factor(construction.period)E -7.2532e-02 1.1279e-01 -0.6431 0.5201874
factor(construction.period)F -3.9902e-02 1.1355e-01 -0.3514 0.7252968
factor(construction.period)G 7.9572e-02 1.1525e-01 0.6904 0.4899345
factor(construction.period)H 8.8313e-02 1.1274e-01 0.7833 0.4334476
factor(construction.period)I 1.5363e-01 1.1789e-01 1.3032 0.1925195
factor(APPT.type)DU 1.4528e-02 6.3306e-02 0.2295 0.8184916
factor(APPT.type)ST 3.5624e-03 2.8220e-02 0.1262 0.8995434
factor(usage)MI 1.9810e-01 7.7399e-02 2.5594 0.0104851 *
factor(usage)RS -5.4730e-01 9.1814e-02 -5.9610 2.506e-09 ***
factor(pre.sold)O 5.6324e-03 1.9642e-02 0.2867 0.7743052
factor(buyer.dep1)IN -1.0177e-01 1.3917e-02 -7.3127 2.619e-13 ***
factor(buyer.dep1)IN1 -4.7475e-02 2.9838e-02 -1.5911 0.1115937
factor(year)2007 1.2930e-01 2.4084e-02 5.3686 7.935e-08 ***
factor(year)2008 1.1376e-01 2.7407e-02 4.1509 3.312e-05 ***
factor(year)2009 1.3894e-01 2.5430e-02 5.4637 4.662e-08 ***
factor(year)2010 1.8147e-01 2.4810e-02 7.3145 2.584e-13 ***
factor(year)2011 1.8821e-01 2.6312e-02 7.1530 8.492e-13 ***
factor(year)2012 1.4584e-01 2.6636e-02 5.4754 4.366e-08 ***
factor(year)2013 1.7255e-01 2.8969e-02 5.9565 2.577e-09 ***
factor(nb.iris)2A0040102 -9.1397e-02 8.1878e-02 -1.1163 0.2643150
factor(nb.iris)2A0040103 8.2992e-02 5.6827e-02 1.4604 0.1441688
factor(nb.iris)2A0040201 6.3193e-02 9.2028e-02 0.6867 0.4922853
factor(nb.iris)2A0040202 9.2492e-02 1.2824e-01 0.7213 0.4707450
factor(nb.iris)2A0040203 7.0551e-02 7.8858e-02 0.8947 0.3709687
factor(nb.iris)2A0040301 1.9306e-01 7.5604e-02 2.5536 0.0106608 *
factor(nb.iris)2A0040302 2.6651e-01 9.4434e-02 2.8222 0.0047697 **
factor(nb.iris)2A0040401 3.2665e-01 1.1603e-01 2.8153 0.0048738 **
factor(nb.iris)2A0040402 3.7662e-01 1.1343e-01 3.3202 0.0008997 ***
factor(nb.iris)2A0040501 9.9627e-03 5.7448e-02 0.1734 0.8623203
factor(nb.iris)2A0040502 -9.6397e-02 5.9879e-02 -1.6099 0.1074297
factor(nb.iris)2A0040503 1.3093e-01 6.5558e-02 1.9971 0.0458145 *
factor(nb.iris)2A0040601 -8.8380e-02 8.8416e-02 -0.9996 0.3175039
factor(nb.iris)2A0040602 1.6103e-02 7.1992e-02 0.2237 0.8230124
factor(nb.iris)2A0040701 4.0356e-02 7.2678e-02 0.5553 0.5787104
factor(nb.iris)2A0040702 7.6833e-02 9.6073e-02 0.7997 0.4238640
factor(nb.iris)2A0040703 7.1611e-02 7.9047e-02 0.9059 0.3649726
factor(nb.iris)2A0040801 2.0899e-01 8.6522e-02 2.4155 0.0157143 *
factor(nb.iris)2A0040802 1.7329e-01 8.5354e-02 2.0302 0.0423312 *
factor(nb.iris)2A0040803 1.9828e-01 1.0809e-01 1.8344 0.0665962 .
factor(nb.iris)2A0040901 1.7808e-01 7.4935e-02 2.3764 0.0174805 *
factor(nb.iris)2A0040902 2.7204e-01 1.7021e-01 1.5983 0.1099846
factor(nb.iris)2A0040903 9.5627e-02 1.2612e-01 0.7582 0.4483249
distance.airport -4.1167e-05 6.4659e-05 -0.6367 0.5243382
distance.beaches 3.0397e-05 4.2923e-05 0.7082 0.4788381
distance.cinemas -3.6461e-05 7.6479e-05 -0.4767 0.6335419
distance.commerce 1.6388e-06 5.5131e-05 0.0297 0.9762854
distance.hosptials -1.8192e-04 1.1065e-04 -1.6441 0.1001505
distance.junctions 5.2116e-05 7.3202e-05 0.7120 0.4764919
distance.midhighschool -1.0908e-05 8.6230e-05 -0.1265 0.8993339
distance.monument -1.7662e-05 5.0829e-05 -0.3475 0.7282335
distance.nursery 1.6792e-04 4.4647e-05 3.7611 0.0001691 ***
distance.port 6.0846e-05 1.2554e-04 0.4847 0.6278983
distance.railway.stations 2.0947e-04 1.0739e-04 1.9507 0.0510973 .
distance.railways -1.3093e-04 1.4911e-04 -0.8781 0.3798947
distance.roads 4.1322e-05 7.2456e-05 0.5703 0.5684741
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Comparing with Model 3, We observe that AIC value decreases from 83 to 48. Still, the coefficient of quantity of rooms is significantly negative. The coefficients of quantity of bathrooms, apartment storeys, the use of apartment (mix-used apartment, assisted living facilities), where are buyers from, year dummies, some location dummies are significant. Focusing on covariates of distances to amenities and public facilities, we find merely the coefficient of the distance to nursery and primary schools is significant. The coefficient is postive as well.
Model 7
Model 7 = Model 4 + distances to amenities and public facilities
LN.real.total.price=log(includ.dis$real.total.price,exp(1))
LN.total.surface=log(includ.dis$total.surface,exp(1))
ols7=lm(LN.real.total.price~LN.total.surface+factor(nb.pieces)
+LN.total.surface*factor(nb.pieces)+nb.sdb+nb.niv+factor(construction.period)
+factor(APPT.type)+factor(usage)+factor(pre.sold)+factor(buyer.dep1)
+factor(year)+factor(nb.iris)+distance.airport
+distance.beaches+distance.cinemas+distance.commerce+distance.hosptials
+distance.junctions+distance.midhighschool+distance.monument
+distance.nursery+distance.port+distance.railway.stations
+distance.railways+distance.roads,data=includ.dis)
library(lmtest)
coeftest(ols7,df=Inf,vcov=vcovHC(ols7,type = "HC0"))
z test of coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 9.4235e+00 5.1922e-01 18.1492 < 2.2e-16 ***
LN.total.surface 5.9389e-01 1.0655e-01 5.5738 2.492e-08 ***
factor(nb.pieces)2 -1.0838e+00 4.6241e-01 -2.3439 0.019086 *
factor(nb.pieces)3 -1.1347e+00 4.9949e-01 -2.2717 0.023103 *
factor(nb.pieces)4 -1.6552e+00 5.3088e-01 -3.1178 0.001822 **
factor(nb.pieces)5 -2.0273e+00 6.7680e-01 -2.9954 0.002741 **
factor(nb.pieces)6 -1.9590e+00 1.3950e+00 -1.4043 0.160235
factor(nb.pieces)7 8.9068e-01 8.2014e+00 0.1086 0.913519
nb.sdb 5.6013e-02 2.3715e-02 2.3619 0.018183 *
nb.niv 1.6610e-02 2.8466e-03 5.8349 5.382e-09 ***
factor(construction.period)B -6.0534e-01 2.8580e-01 -2.1180 0.034172 *
factor(construction.period)C -2.3723e-01 1.3630e-01 -1.7405 0.081769 .
factor(construction.period)D -1.1092e-01 1.1190e-01 -0.9913 0.321532
factor(construction.period)E -5.7637e-02 1.1253e-01 -0.5122 0.608518
factor(construction.period)F -3.2855e-02 1.1346e-01 -0.2896 0.772149
factor(construction.period)G 9.1796e-02 1.1543e-01 0.7953 0.426463
factor(construction.period)H 9.4628e-02 1.1266e-01 0.8400 0.400928
factor(construction.period)I 1.5238e-01 1.1752e-01 1.2967 0.194747
factor(APPT.type)DU 1.4736e-02 6.5073e-02 0.2264 0.820853
factor(APPT.type)ST -2.1475e-01 1.4429e-01 -1.4883 0.136680
factor(usage)MI 1.9144e-01 7.5383e-02 2.5396 0.011098 *
factor(usage)RS -5.9649e-01 8.5683e-02 -6.9616 3.365e-12 ***
factor(pre.sold)O 7.1114e-03 1.9902e-02 0.3573 0.720854
factor(buyer.dep1)IN -1.0474e-01 1.3642e-02 -7.6775 1.622e-14 ***
factor(buyer.dep1)IN1 -5.1250e-02 2.9774e-02 -1.7213 0.085198 .
factor(year)2007 1.3180e-01 2.3463e-02 5.6172 1.940e-08 ***
factor(year)2008 1.1316e-01 2.7240e-02 4.1544 3.261e-05 ***
factor(year)2009 1.3570e-01 2.4572e-02 5.5228 3.336e-08 ***
factor(year)2010 1.7905e-01 2.4057e-02 7.4426 9.870e-14 ***
factor(year)2011 1.8994e-01 2.5407e-02 7.4760 7.660e-14 ***
factor(year)2012 1.4485e-01 2.5562e-02 5.6668 1.455e-08 ***
factor(year)2013 1.7704e-01 2.8343e-02 6.2463 4.204e-10 ***
factor(nb.iris)2A0040102 -5.7223e-02 7.9949e-02 -0.7157 0.474152
factor(nb.iris)2A0040103 8.7465e-02 5.6539e-02 1.5470 0.121865
factor(nb.iris)2A0040201 8.2228e-02 9.1141e-02 0.9022 0.366951
factor(nb.iris)2A0040202 1.2351e-01 1.2497e-01 0.9883 0.322999
factor(nb.iris)2A0040203 9.9132e-02 7.8644e-02 1.2605 0.207481
factor(nb.iris)2A0040301 2.2303e-01 7.5629e-02 2.9491 0.003187 **
factor(nb.iris)2A0040302 2.7543e-01 9.5372e-02 2.8879 0.003878 **
factor(nb.iris)2A0040401 3.5848e-01 1.1503e-01 3.1165 0.001830 **
factor(nb.iris)2A0040402 4.1788e-01 1.1236e-01 3.7190 0.000200 ***
factor(nb.iris)2A0040501 4.1758e-02 5.6301e-02 0.7417 0.458281
factor(nb.iris)2A0040502 -8.0254e-02 6.0373e-02 -1.3293 0.183750
factor(nb.iris)2A0040503 1.5113e-01 6.4154e-02 2.3558 0.018483 *
factor(nb.iris)2A0040601 -5.1566e-02 8.6355e-02 -0.5971 0.550411
factor(nb.iris)2A0040602 4.4382e-02 7.0303e-02 0.6313 0.527843
factor(nb.iris)2A0040701 6.9477e-02 7.2835e-02 0.9539 0.340137
factor(nb.iris)2A0040702 1.1701e-01 8.7759e-02 1.3333 0.182422
factor(nb.iris)2A0040703 9.6090e-02 7.7284e-02 1.2433 0.213742
factor(nb.iris)2A0040801 2.5147e-01 8.4683e-02 2.9696 0.002982 **
factor(nb.iris)2A0040802 2.2203e-01 8.4165e-02 2.6381 0.008337 **
factor(nb.iris)2A0040803 2.4107e-01 1.0651e-01 2.2635 0.023606 *
factor(nb.iris)2A0040901 1.6462e-01 7.3417e-02 2.2423 0.024940 *
factor(nb.iris)2A0040902 3.0873e-01 1.6796e-01 1.8382 0.066040 .
factor(nb.iris)2A0040903 1.1308e-01 1.2144e-01 0.9312 0.351753
distance.airport -4.5297e-05 6.5293e-05 -0.6937 0.487839
distance.beaches 4.7287e-05 4.3430e-05 1.0888 0.276247
distance.cinemas -6.5984e-05 7.7488e-05 -0.8515 0.394471
distance.commerce -2.1109e-05 5.5283e-05 -0.3818 0.702582
distance.hosptials -2.2634e-04 1.1219e-04 -2.0175 0.043642 *
distance.junctions 8.6193e-05 7.4158e-05 1.1623 0.245116
distance.midhighschool 2.6013e-05 8.9228e-05 0.2915 0.770643
distance.monument -3.6317e-05 5.0662e-05 -0.7169 0.473465
distance.nursery 1.9619e-04 4.6000e-05 4.2649 2.000e-05 ***
distance.port 1.1250e-04 1.2414e-04 0.9062 0.364842
distance.railway.stations 2.1298e-04 1.0552e-04 2.0184 0.043547 *
distance.railways -1.5119e-04 1.5091e-04 -1.0019 0.316394
distance.roads 1.2308e-05 7.2583e-05 0.1696 0.865345
LN.total.surface:factor(nb.pieces)2 2.6297e-01 1.1510e-01 2.2848 0.022325 *
LN.total.surface:factor(nb.pieces)3 2.7603e-01 1.2197e-01 2.2631 0.023628 *
LN.total.surface:factor(nb.pieces)4 3.9287e-01 1.2721e-01 3.0882 0.002013 **
LN.total.surface:factor(nb.pieces)5 4.5089e-01 1.5400e-01 2.9278 0.003413 **
LN.total.surface:factor(nb.pieces)6 4.4188e-01 3.0095e-01 1.4683 0.142025
LN.total.surface:factor(nb.pieces)7 -1.3694e-01 1.7990e+00 -0.0761 0.939324
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
library(fmsb)
VIF(lm(LN.real.total.price~LN.total.surface+factor(nb.pieces)
+LN.total.surface*factor(nb.pieces)+nb.sdb+nb.niv+factor(construction.period)
+factor(APPT.type)+factor(usage)+factor(pre.sold)+factor(buyer.dep1)
+factor(year)+factor(nb.iris)+distance.airport
+distance.beaches+distance.cinemas+distance.commerce+distance.hosptials
+distance.junctions+distance.midhighschool+distance.monument
+distance.nursery+distance.port+distance.railway.stations
+distance.railways+distance.roads,data=includ.dis))
[1] 5.459694
AIC(ols7)
[1] 13.92855
Comparing with Model 6, the AIC value decrease again. However, the magnitudes and the significances of covariates do not change so much.
Comparing with Model 7, we find that the coefficient of the variable mixed use apartment is significantly postive. Concentrating on covariates of distances to amenities and public facilities. There are three variables with significant coefficients, the distance to nursery school, the distance to railway station, the distance to hosptial.
Attention, all previous models pass the multcolinarity test (VIF).
We employ dummy variables to fix the spatial effects. Indeed, using dummy variables may not be a good way to fix the spatial effects since spatial dependence may exist among housing prices.
load("D:/Ajaccio shp/Moran test (unit price & total price).RData")
library(fields)
搼㸴搼㸸挼㸸攼㹢搼㸰攼㸸Ҫ戼㸵ij̼愼㹤戼㸰昼㹣愼㸳戼㹡spam
搼㸴搼㸸挼㸸攼㹢搼㸰攼㸸Ҫ戼㸵ij̼愼㹤戼㸰昼㹣愼㸳戼㹡dotCall64
搼㸴搼㸸挼㸸攼㹢搼㸰攼㸸Ҫ戼㸵ij̼愼㹤戼㸰昼㹣愼㸳戼㹡grid
Spam version 2.1-1 (2017-07-02) is loaded.
Type 'help( Spam)' or 'demo( spam)' for a short introduction
and overview of this package.
Help for individual functions is also obtained by adding the
suffix '.spam' to the function name, e.g. 'help( chol.spam)'.
搼㸴搼㸸挼㸸攼㹢戼㸳̼愼㹤戼㸰昼㹣愼㸳戼㹡愼㸱愼㹥spam愼㸱愼㹦
The following objects are masked from 愼㸱愼㹥package:base愼㸱愼㹦:
backsolve, forwardsolve
搼㸴搼㸸挼㸸攼㹢搼㸰攼㸸Ҫ戼㸵ij̼愼㹤戼㸰昼㹣愼㸳戼㹡maps
搼㸴搼㸸挼㸸攼㹢戼㸳̼愼㹤戼㸰昼㹣愼㸳戼㹡愼㸱愼㹥maps愼㸱愼㹦
The following object is masked from 愼㸱愼㹥package:plyr愼㸱愼㹦:
ozone
mycoords=coordinates(spdf)
mydm=rdist.earth(mycoords,miles = F)
for(i in 1:dim(mydm)[1]) {mydm[i,i] = 0} # renders exactly zero all diagonal elements
mydm <- ifelse(mydm!=0, 1/mydm, mydm) # inverting distances
dimnames(mydm) <- list(T2$num.acte, T2$num.acte)
mydm.lw <- mat2listw(mydm, style="W") # create a (normalized) listw object
#mydmi <- listw2mat(mydm.lw) # change back to 'classic' matrix, if desired
mI_perm999 <-moran.mc(T2$real.unit.price,mydm.lw, zero.policy = F, nsim=999)
mI_perm999
Monte-Carlo simulation of Moran I
data: T2$real.unit.price
weights: mydm.lw
number of simulations + 1: 1000
statistic = 0.14128, observed rank = 1000, p-value = 0.001
alternative hypothesis: greater
graph999 <- hist(mI_perm999$res,freq=FALSE,col="light blue",main="Permutation Test for Moran's I - 999 permutations")
lines(density(mI_perm999$res),col="green",lwd=2)
lines(mI_perm999$statistic,max(graph999$counts),type="h",col="red",lwd=2)
#######moran scatter plot for apartment unit price
moran.plot(T2$real.unit.price,mydm.lw, zero.policy = F,xlab = "Apartment unit price",
ylab = "spatially lagged apartment unit price")
title("Moran Scatterplot of apartment unit price")
#######moran scatter plot for apartment total price
mI_perm999.1 <-moran.mc(T2$`real total price`,mydm.lw, zero.policy = F, nsim=999)
mI_perm999.1
Monte-Carlo simulation of Moran I
data: T2$`real total price`
weights: mydm.lw
number of simulations + 1: 1000
statistic = 0.082626, observed rank = 1000, p-value = 0.001
alternative hypothesis: greater
graph999.1 <- hist(mI_perm999.1$res,freq=FALSE,col="light blue",main="Permutation Test for Moran's I - 999 permutations")
lines(density(mI_perm999.1$res),col="green",lwd=2)
lines(mI_perm999.1$statistic,max(graph999.1$counts),type="h",col="red",lwd=2)
moran.plot(T2$`real total price`,mydm.lw, zero.policy = F,xlab = "Apartment total price",
ylab = "spatially lagged apartment total price")
title("Moran Scatterplot of apartment total price")
We confirm that the existence of spatial dependences on apartment unit prices and total prices. We should take care of these phenomenon.
Computation of Moran’s I for the residuals of an OLS regression
xy1 <- includ.dis[,c(19,20)]
spdf1 <- SpatialPointsDataFrame(coords = xy1, data = includ.dis,
proj4string = CRS("+init=EPSG:2154"))
is.projected(spdf1)
[1] TRUE
proj4string(spdf1)
[1] "+init=EPSG:2154 +proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
ols.dataset=coordinates(spdf1)
mydm1=rdist.earth(ols.dataset,miles = F)
for(i in 1:dim(mydm1)[1]) {mydm1[i,i] = 0} # renders exactly zero all diagonal elements
mydm1 <- ifelse(mydm1!=0, 1/mydm1, mydm1) # inverting distances
dimnames(mydm1) <- list(includ.dis$num.acte, includ.dis$num.acte)
mydm.lw1 <- mat2listw(mydm1, style="W") # create a (normalized) listw object
Warning in doTryCatch(return(expr), name, parentenv, handler) :
restarting interrupted promise evaluation
library(spdep)
Moran.res.ols7=lm.morantest(ols7, mydm.lw1,
zero.policy=TRUE, alternative = "two.sided",
spChk=NULL)
Not all characters in C:/Users/whoamilyh/Documents/ppt markdown for 30-11-17.1.md could be decoded using CP936. To try a different encoding, choose "File | Reopen with Encoding..." from the main menu.
print(Moran.res.ols7)
Global Moran I for regression residuals
data:
model: lm(formula = LN.real.total.price ~ LN.total.surface + factor(nb.pieces) +
LN.total.surface * factor(nb.pieces) + nb.sdb + nb.niv + factor(construction.period)
+ factor(APPT.type) + factor(usage) + factor(pre.sold) + factor(buyer.dep1) +
factor(year) + factor(nb.iris) + distance.airport + distance.beaches +
distance.cinemas + distance.commerce + distance.hosptials + distance.junctions +
distance.midhighschool + distance.monument + distance.nursery + distance.port +
distance.railway.stations + distance.railways + distance.roads, data = includ.dis)
weights: mydm.lw1
Moran I statistic standard deviate = 2.3505, p-value = 0.01875
alternative hypothesis: two.sided
sample estimates:
Observed Moran I Expectation Variance
1.147911e-02 -2.926120e-03 3.756025e-05
Lagrange Multiplier Test
LM7<-lm.LMtests(ols7, mydm.lw1, test="all")
print(LM7)
Lagrange multiplier diagnostics for spatial dependence
data:
model: lm(formula = LN.real.total.price ~ LN.total.surface + factor(nb.pieces) +
LN.total.surface * factor(nb.pieces) + nb.sdb + nb.niv + factor(construction.period)
+ factor(APPT.type) + factor(usage) + factor(pre.sold) + factor(buyer.dep1) +
factor(year) + factor(nb.iris) + distance.airport + distance.beaches +
distance.cinemas + distance.commerce + distance.hosptials + distance.junctions +
distance.midhighschool + distance.monument + distance.nursery + distance.port +
distance.railway.stations + distance.railways + distance.roads, data = includ.dis)
weights: mydm.lw1
LMerr = 3.4424, df = 1, p-value = 0.06354
Lagrange multiplier diagnostics for spatial dependence
data:
model: lm(formula = LN.real.total.price ~ LN.total.surface + factor(nb.pieces) +
LN.total.surface * factor(nb.pieces) + nb.sdb + nb.niv + factor(construction.period)
+ factor(APPT.type) + factor(usage) + factor(pre.sold) + factor(buyer.dep1) +
factor(year) + factor(nb.iris) + distance.airport + distance.beaches +
distance.cinemas + distance.commerce + distance.hosptials + distance.junctions +
distance.midhighschool + distance.monument + distance.nursery + distance.port +
distance.railway.stations + distance.railways + distance.roads, data = includ.dis)
weights: mydm.lw1
LMlag = 9.0996, df = 1, p-value = 0.002557
Lagrange multiplier diagnostics for spatial dependence
data:
model: lm(formula = LN.real.total.price ~ LN.total.surface + factor(nb.pieces) +
LN.total.surface * factor(nb.pieces) + nb.sdb + nb.niv + factor(construction.period)
+ factor(APPT.type) + factor(usage) + factor(pre.sold) + factor(buyer.dep1) +
factor(year) + factor(nb.iris) + distance.airport + distance.beaches +
distance.cinemas + distance.commerce + distance.hosptials + distance.junctions +
distance.midhighschool + distance.monument + distance.nursery + distance.port +
distance.railway.stations + distance.railways + distance.roads, data = includ.dis)
weights: mydm.lw1
RLMerr = 0.023972, df = 1, p-value = 0.877
Lagrange multiplier diagnostics for spatial dependence
data:
model: lm(formula = LN.real.total.price ~ LN.total.surface + factor(nb.pieces) +
LN.total.surface * factor(nb.pieces) + nb.sdb + nb.niv + factor(construction.period)
+ factor(APPT.type) + factor(usage) + factor(pre.sold) + factor(buyer.dep1) +
factor(year) + factor(nb.iris) + distance.airport + distance.beaches +
distance.cinemas + distance.commerce + distance.hosptials + distance.junctions +
distance.midhighschool + distance.monument + distance.nursery + distance.port +
distance.railway.stations + distance.railways + distance.roads, data = includ.dis)
weights: mydm.lw1
RLMlag = 5.6812, df = 1, p-value = 0.01715
Lagrange multiplier diagnostics for spatial dependence
data:
model: lm(formula = LN.real.total.price ~ LN.total.surface + factor(nb.pieces) +
LN.total.surface * factor(nb.pieces) + nb.sdb + nb.niv + factor(construction.period)
+ factor(APPT.type) + factor(usage) + factor(pre.sold) + factor(buyer.dep1) +
factor(year) + factor(nb.iris) + distance.airport + distance.beaches +
distance.cinemas + distance.commerce + distance.hosptials + distance.junctions +
distance.midhighschool + distance.monument + distance.nursery + distance.port +
distance.railway.stations + distance.railways + distance.roads, data = includ.dis)
weights: mydm.lw1
SARMA = 9.1235, df = 2, p-value = 0.01044
Confirming using SAR
sar.OLS7<-lagsarlm(LN.real.total.price~LN.total.surface+factor(nb.pieces)
+LN.total.surface*factor(nb.pieces)+nb.sdb+nb.niv+factor(construction.period)
+factor(APPT.type)+factor(usage)+factor(pre.sold)+factor(buyer.dep1)
+factor(year)+factor(nb.iris)+distance.airport
+distance.beaches+distance.cinemas+distance.commerce+distance.hosptials
+distance.junctions+distance.midhighschool+distance.monument
+distance.nursery+distance.port+distance.railway.stations
+distance.railways+distance.roads, data=spdf1@data, mydm.lw1)
inversion of asymptotic covariance matrix failed for tol.solve = 1e-10
reciprocal condition number = 5.16682e-16 - using numerical Hessian.NaNs produced
summary(sar.OLS7,Nagelkerke=TRUE)
Call:lagsarlm(formula = LN.real.total.price ~ LN.total.surface + factor(nb.pieces) +
LN.total.surface * factor(nb.pieces) + nb.sdb + nb.niv +
factor(construction.period) + factor(APPT.type) + factor(usage) +
factor(pre.sold) + factor(buyer.dep1) + factor(year) + factor(nb.iris) +
distance.airport + distance.beaches + distance.cinemas +
distance.commerce + distance.hosptials + distance.junctions +
distance.midhighschool + distance.monument + distance.nursery +
distance.port + distance.railway.stations + distance.railways +
distance.roads, data = spdf1@data, listw = mydm.lw1)
Residuals:
Min 1Q Median 3Q Max
-2.161965 -0.097190 0.018049 0.132531 0.713339
Type: lag
Coefficients: (numerical Hessian approximate standard errors)
Estimate Std. Error z value Pr(>|z|)
(Intercept) 7.5372e+00 6.2183e-01 12.1209 < 2.2e-16
LN.total.surface 5.8780e-01 6.2745e-02 9.3681 < 2.2e-16
factor(nb.pieces)2 -1.1046e+00 3.1319e-01 -3.5270 0.0004203
factor(nb.pieces)3 -1.1137e+00 3.5596e-01 -3.1288 0.0017552
factor(nb.pieces)4 -1.6575e+00 3.8657e-01 -4.2877 1.805e-05
factor(nb.pieces)5 -2.1158e+00 4.9924e-01 -4.2380 2.255e-05
factor(nb.pieces)6 -1.9135e+00 1.0962e+00 -1.7456 0.0808784
factor(nb.pieces)7 1.0996e+00 3.8597e+00 0.2849 0.7757302
nb.sdb 4.7637e-02 2.1905e-02 2.1748 0.0296477
nb.niv 1.6694e-02 2.7240e-03 6.1284 8.879e-10
factor(construction.period)B -6.1504e-01 1.3460e-01 -4.5695 4.890e-06
factor(construction.period)C -2.4208e-01 NA NA NA
factor(construction.period)D -1.1714e-01 NA NA NA
factor(construction.period)E -6.4651e-02 NA NA NA
factor(construction.period)F -4.1208e-02 NA NA NA
factor(construction.period)G 8.3190e-02 NA NA NA
factor(construction.period)H 8.1283e-02 NA NA NA
factor(construction.period)I 1.4337e-01 NA NA NA
factor(APPT.type)DU 1.2953e-02 3.8685e-02 0.3348 0.7377527
factor(APPT.type)ST -2.2436e-01 1.1097e-01 -2.0217 0.0432029
factor(usage)MI 1.9146e-01 1.4038e-01 1.3638 0.1726198
factor(usage)RS -5.4064e-01 6.3195e-02 -8.5552 < 2.2e-16
factor(pre.sold)O 3.8463e-03 9.1197e-03 0.4218 0.6732049
factor(buyer.dep1)IN -1.0311e-01 1.5084e-02 -6.8358 8.153e-12
factor(buyer.dep1)IN1 -5.0948e-02 3.7696e-02 -1.3515 0.1765215
factor(year)2007 1.2950e-01 2.0930e-02 6.1876 6.109e-10
factor(year)2008 1.0998e-01 2.2428e-02 4.9037 9.403e-07
factor(year)2009 1.3696e-01 2.3119e-02 5.9241 3.140e-09
factor(year)2010 1.7903e-01 2.3226e-02 7.7082 1.266e-14
factor(year)2011 1.8928e-01 2.4780e-02 7.6382 2.198e-14
factor(year)2012 1.4396e-01 2.2044e-02 6.5308 6.541e-11
factor(year)2013 1.7656e-01 2.4643e-02 7.1648 7.792e-13
factor(nb.iris)2A0040102 -5.2888e-02 4.6970e-02 -1.1260 0.2601683
factor(nb.iris)2A0040103 8.5414e-02 4.2255e-02 2.0214 0.0432382
factor(nb.iris)2A0040201 8.0470e-02 7.1920e-02 1.1189 0.2631874
factor(nb.iris)2A0040202 1.1793e-01 7.9736e-02 1.4790 0.1391442
factor(nb.iris)2A0040203 8.7375e-02 6.2541e-02 1.3971 0.1623882
factor(nb.iris)2A0040301 2.1916e-01 5.8257e-02 3.7620 0.0001685
factor(nb.iris)2A0040302 2.7591e-01 7.3910e-02 3.7330 0.0001892
factor(nb.iris)2A0040401 3.4452e-01 9.7535e-02 3.5323 0.0004120
factor(nb.iris)2A0040402 4.2698e-01 9.6546e-02 4.4226 9.754e-06
factor(nb.iris)2A0040501 4.8861e-02 4.7252e-02 1.0341 0.3011115
factor(nb.iris)2A0040502 -6.7684e-02 4.0900e-02 -1.6549 0.0979475
factor(nb.iris)2A0040503 1.5442e-01 4.1835e-02 3.6913 0.0002231
factor(nb.iris)2A0040601 -4.2961e-02 7.7310e-02 -0.5557 0.5784167
factor(nb.iris)2A0040602 5.1673e-02 5.9292e-02 0.8715 0.3834831
factor(nb.iris)2A0040701 6.7516e-02 NA NA NA
factor(nb.iris)2A0040702 1.1429e-01 6.3548e-02 1.7986 0.0720879
factor(nb.iris)2A0040703 1.0127e-01 5.9067e-02 1.7145 0.0864404
factor(nb.iris)2A0040801 2.5769e-01 5.6079e-02 4.5952 4.324e-06
factor(nb.iris)2A0040802 2.2298e-01 6.3236e-02 3.5262 0.0004216
factor(nb.iris)2A0040803 2.3995e-01 8.0535e-02 2.9795 0.0028873
factor(nb.iris)2A0040901 1.8565e-01 7.8115e-02 2.3767 0.0174698
factor(nb.iris)2A0040902 3.1327e-01 1.2888e-01 2.4306 0.0150720
factor(nb.iris)2A0040903 1.1939e-01 8.7951e-02 1.3575 0.1746269
distance.airport -3.7292e-05 2.4868e-05 -1.4996 0.1337272
distance.beaches 4.1045e-05 3.6793e-05 1.1156 0.2646042
distance.cinemas -7.9586e-05 5.9639e-05 -1.3344 0.1820564
distance.commerce -2.4852e-05 4.8547e-05 -0.5119 0.6087060
distance.hosptials -2.1911e-04 9.0225e-05 -2.4285 0.0151628
distance.junctions 8.0648e-05 5.0978e-05 1.5820 0.1136467
distance.midhighschool 3.5354e-05 6.4845e-05 0.5452 0.5856090
distance.monument -3.7733e-05 3.4674e-05 -1.0882 0.2765065
distance.nursery 2.0151e-04 4.0921e-05 4.9244 8.463e-07
distance.port 1.1405e-04 9.5849e-05 1.1899 0.2340791
distance.railway.stations 2.1923e-04 7.9698e-05 2.7508 0.0059448
distance.railways -1.6870e-04 7.6839e-05 -2.1954 0.0281314
distance.roads 2.2163e-05 7.0475e-05 0.3145 0.7531537
LN.total.surface:factor(nb.pieces)2 2.6621e-01 7.6672e-02 3.4721 0.0005163
LN.total.surface:factor(nb.pieces)3 2.6988e-01 8.4155e-02 3.2070 0.0013413
LN.total.surface:factor(nb.pieces)4 3.9265e-01 8.8361e-02 4.4437 8.842e-06
LN.total.surface:factor(nb.pieces)5 4.6919e-01 1.0882e-01 4.3115 1.622e-05
LN.total.surface:factor(nb.pieces)6 4.3198e-01 2.2507e-01 1.9194 0.0549384
LN.total.surface:factor(nb.pieces)7 -1.8218e-01 8.3720e-01 -0.2176 0.8277318
Rho: 0.15905, LR test value: 9.4695, p-value: 0.0020892
Approximate (numerical Hessian) standard error: 0.051425
z-value: 3.0928, p-value: 0.001983
Wald statistic: 9.5652, p-value: 0.001983
Log likelihood: 72.77046 for lag model
ML residual variance (sigma squared): 0.053997, (sigma: 0.23237)
Nagelkerke pseudo-R-squared: 0.81779
Number of observations: 1818
Number of parameters estimated: 76
AIC: 6.4591, (AIC for lm: 13.929)
bptest.sarlm(sar.OLS7)
studentized Breusch-Pagan test
data:
BP = 155.59, df = 73, p-value = 6.446e-08
lm.sar.ols7 <- lm(sar.OLS7$tary~sar.OLS7$tarX - 1)
coeftest(lm.sar.ols7, vcov=vcovHC(lm.sar.ols7,type="HC0"))
t test of coefficients:
Estimate Std. Error t value Pr(>|t|)
sar.OLS7$tarXx(Intercept) 7.5372e+00 5.1820e-01 14.5448 < 2.2e-16
sar.OLS7$tarXxLN.total.surface 5.8780e-01 1.0646e-01 5.5216 3.865e-08
sar.OLS7$tarXxfactor(nb.pieces)2 -1.1046e+00 4.6206e-01 -2.3907 0.0169240
sar.OLS7$tarXxfactor(nb.pieces)3 -1.1137e+00 4.9746e-01 -2.2389 0.0252905
sar.OLS7$tarXxfactor(nb.pieces)4 -1.6575e+00 5.3102e-01 -3.1214 0.0018295
sar.OLS7$tarXxfactor(nb.pieces)5 -2.1158e+00 6.7499e-01 -3.1345 0.0017500
sar.OLS7$tarXxfactor(nb.pieces)6 -1.9135e+00 1.3702e+00 -1.3965 0.1627336
sar.OLS7$tarXxfactor(nb.pieces)7 1.0996e+00 8.2491e+00 0.1333 0.8939737
sar.OLS7$tarXxnb.sdb 4.7637e-02 2.3650e-02 2.0143 0.0441325
sar.OLS7$tarXxnb.niv 1.6694e-02 2.8431e-03 5.8715 5.158e-09
sar.OLS7$tarXxfactor(construction.period)B -6.1504e-01 2.8735e-01 -2.1404 0.0324636
sar.OLS7$tarXxfactor(construction.period)C -2.4208e-01 1.3364e-01 -1.8115 0.0702431
sar.OLS7$tarXxfactor(construction.period)D -1.1714e-01 1.0887e-01 -1.0759 0.2821123
sar.OLS7$tarXxfactor(construction.period)E -6.4651e-02 1.0954e-01 -0.5902 0.5551336
sar.OLS7$tarXxfactor(construction.period)F -4.1208e-02 1.1049e-01 -0.3730 0.7092153
sar.OLS7$tarXxfactor(construction.period)G 8.3190e-02 1.1249e-01 0.7395 0.4596841
sar.OLS7$tarXxfactor(construction.period)H 8.1283e-02 1.0963e-01 0.7414 0.4585487
sar.OLS7$tarXxfactor(construction.period)I 1.4337e-01 1.1460e-01 1.2511 0.2110584
sar.OLS7$tarXxfactor(APPT.type)DU 1.2953e-02 6.4503e-02 0.2008 0.8408673
sar.OLS7$tarXxfactor(APPT.type)ST -2.2436e-01 1.4463e-01 -1.5512 0.1210305
sar.OLS7$tarXxfactor(usage)MI 1.9146e-01 7.3698e-02 2.5979 0.0094584
sar.OLS7$tarXxfactor(usage)RS -5.4064e-01 8.3339e-02 -6.4872 1.136e-10
sar.OLS7$tarXxfactor(pre.sold)O 3.8463e-03 1.9729e-02 0.1950 0.8454493
sar.OLS7$tarXxfactor(buyer.dep1)IN -1.0311e-01 1.3645e-02 -7.5567 6.639e-14
sar.OLS7$tarXxfactor(buyer.dep1)IN1 -5.0948e-02 2.9347e-02 -1.7361 0.0827312
sar.OLS7$tarXxfactor(year)2007 1.2950e-01 2.3468e-02 5.5184 3.935e-08
sar.OLS7$tarXxfactor(year)2008 1.0998e-01 2.7169e-02 4.0480 5.391e-05
sar.OLS7$tarXxfactor(year)2009 1.3696e-01 2.4460e-02 5.5993 2.495e-08
sar.OLS7$tarXxfactor(year)2010 1.7903e-01 2.4013e-02 7.4556 1.403e-13
sar.OLS7$tarXxfactor(year)2011 1.8928e-01 2.5379e-02 7.4581 1.377e-13
sar.OLS7$tarXxfactor(year)2012 1.4396e-01 2.5462e-02 5.6539 1.829e-08
sar.OLS7$tarXxfactor(year)2013 1.7656e-01 2.8389e-02 6.2192 6.239e-10
sar.OLS7$tarXxfactor(nb.iris)2A0040102 -5.2888e-02 7.9747e-02 -0.6632 0.5072906
sar.OLS7$tarXxfactor(nb.iris)2A0040103 8.5414e-02 5.6583e-02 1.5095 0.1313468
sar.OLS7$tarXxfactor(nb.iris)2A0040201 8.0470e-02 9.0458e-02 0.8896 0.3738095
sar.OLS7$tarXxfactor(nb.iris)2A0040202 1.1793e-01 1.2400e-01 0.9510 0.3417243
sar.OLS7$tarXxfactor(nb.iris)2A0040203 8.7375e-02 7.7529e-02 1.1270 0.2599005
sar.OLS7$tarXxfactor(nb.iris)2A0040301 2.1916e-01 7.5033e-02 2.9209 0.0035349
sar.OLS7$tarXxfactor(nb.iris)2A0040302 2.7591e-01 9.4504e-02 2.9196 0.0035502
sar.OLS7$tarXxfactor(nb.iris)2A0040401 3.4452e-01 1.1416e-01 3.0178 0.0025828
sar.OLS7$tarXxfactor(nb.iris)2A0040402 4.2698e-01 1.1171e-01 3.8224 0.0001368
sar.OLS7$tarXxfactor(nb.iris)2A0040501 4.8861e-02 5.6317e-02 0.8676 0.3857263
sar.OLS7$tarXxfactor(nb.iris)2A0040502 -6.7684e-02 6.0341e-02 -1.1217 0.2621483
sar.OLS7$tarXxfactor(nb.iris)2A0040503 1.5442e-01 6.4005e-02 2.4127 0.0159373
sar.OLS7$tarXxfactor(nb.iris)2A0040601 -4.2961e-02 8.6157e-02 -0.4986 0.6181007
sar.OLS7$tarXxfactor(nb.iris)2A0040602 5.1673e-02 7.0099e-02 0.7371 0.4611322
sar.OLS7$tarXxfactor(nb.iris)2A0040701 6.7516e-02 7.2346e-02 0.9332 0.3508257
sar.OLS7$tarXxfactor(nb.iris)2A0040702 1.1429e-01 8.7686e-02 1.3035 0.1925899
sar.OLS7$tarXxfactor(nb.iris)2A0040703 1.0127e-01 7.7013e-02 1.3150 0.1886962
sar.OLS7$tarXxfactor(nb.iris)2A0040801 2.5769e-01 8.3980e-02 3.0685 0.0021846
sar.OLS7$tarXxfactor(nb.iris)2A0040802 2.2298e-01 8.3806e-02 2.6607 0.0078694
sar.OLS7$tarXxfactor(nb.iris)2A0040803 2.3995e-01 1.0627e-01 2.2580 0.0240700
sar.OLS7$tarXxfactor(nb.iris)2A0040901 1.8565e-01 7.3489e-02 2.5263 0.0116155
sar.OLS7$tarXxfactor(nb.iris)2A0040902 3.1327e-01 1.6824e-01 1.8621 0.0627628
sar.OLS7$tarXxfactor(nb.iris)2A0040903 1.1939e-01 1.2117e-01 0.9853 0.3246096
sar.OLS7$tarXxdistance.airport -3.7292e-05 6.4562e-05 -0.5776 0.5636027
sar.OLS7$tarXxdistance.beaches 4.1045e-05 4.2792e-05 0.9592 0.3376014
sar.OLS7$tarXxdistance.cinemas -7.9586e-05 7.7200e-05 -1.0309 0.3027307
sar.OLS7$tarXxdistance.commerce -2.4852e-05 5.5160e-05 -0.4505 0.6523713
sar.OLS7$tarXxdistance.hosptials -2.1911e-04 1.1137e-04 -1.9675 0.0492893
sar.OLS7$tarXxdistance.junctions 8.0648e-05 7.2804e-05 1.1077 0.2681257
sar.OLS7$tarXxdistance.midhighschool 3.5354e-05 8.9123e-05 0.3967 0.6916433
sar.OLS7$tarXxdistance.monument -3.7733e-05 4.9921e-05 -0.7558 0.4498428
sar.OLS7$tarXxdistance.nursery 2.0151e-04 4.5771e-05 4.4026 1.135e-05
sar.OLS7$tarXxdistance.port 1.1405e-04 1.2314e-04 0.9262 0.3544642
sar.OLS7$tarXxdistance.railway.stations 2.1923e-04 1.0466e-04 2.0948 0.0363356
sar.OLS7$tarXxdistance.railways -1.6870e-04 1.4975e-04 -1.1265 0.2601031
sar.OLS7$tarXxdistance.roads 2.2163e-05 7.2073e-05 0.3075 0.7584900
sar.OLS7$tarXxLN.total.surface:factor(nb.pieces)2 2.6621e-01 1.1492e-01 2.3165 0.0206466
sar.OLS7$tarXxLN.total.surface:factor(nb.pieces)3 2.6988e-01 1.2145e-01 2.2221 0.0264035
sar.OLS7$tarXxLN.total.surface:factor(nb.pieces)4 3.9265e-01 1.2718e-01 3.0873 0.0020517
sar.OLS7$tarXxLN.total.surface:factor(nb.pieces)5 4.6919e-01 1.5349e-01 3.0569 0.0022706
sar.OLS7$tarXxLN.total.surface:factor(nb.pieces)6 4.3198e-01 2.9601e-01 1.4594 0.1446464
sar.OLS7$tarXxLN.total.surface:factor(nb.pieces)7 -1.8218e-01 1.8095e+00 -0.1007 0.9198133
sar.OLS7$tarXx(Intercept) ***
sar.OLS7$tarXxLN.total.surface ***
sar.OLS7$tarXxfactor(nb.pieces)2 *
sar.OLS7$tarXxfactor(nb.pieces)3 *
sar.OLS7$tarXxfactor(nb.pieces)4 **
sar.OLS7$tarXxfactor(nb.pieces)5 **
sar.OLS7$tarXxfactor(nb.pieces)6
sar.OLS7$tarXxfactor(nb.pieces)7
sar.OLS7$tarXxnb.sdb *
sar.OLS7$tarXxnb.niv ***
sar.OLS7$tarXxfactor(construction.period)B *
sar.OLS7$tarXxfactor(construction.period)C .
sar.OLS7$tarXxfactor(construction.period)D
sar.OLS7$tarXxfactor(construction.period)E
sar.OLS7$tarXxfactor(construction.period)F
sar.OLS7$tarXxfactor(construction.period)G
sar.OLS7$tarXxfactor(construction.period)H
sar.OLS7$tarXxfactor(construction.period)I
sar.OLS7$tarXxfactor(APPT.type)DU
sar.OLS7$tarXxfactor(APPT.type)ST
sar.OLS7$tarXxfactor(usage)MI **
sar.OLS7$tarXxfactor(usage)RS ***
sar.OLS7$tarXxfactor(pre.sold)O
sar.OLS7$tarXxfactor(buyer.dep1)IN ***
sar.OLS7$tarXxfactor(buyer.dep1)IN1 .
sar.OLS7$tarXxfactor(year)2007 ***
sar.OLS7$tarXxfactor(year)2008 ***
sar.OLS7$tarXxfactor(year)2009 ***
sar.OLS7$tarXxfactor(year)2010 ***
sar.OLS7$tarXxfactor(year)2011 ***
sar.OLS7$tarXxfactor(year)2012 ***
sar.OLS7$tarXxfactor(year)2013 ***
sar.OLS7$tarXxfactor(nb.iris)2A0040102
sar.OLS7$tarXxfactor(nb.iris)2A0040103
sar.OLS7$tarXxfactor(nb.iris)2A0040201
sar.OLS7$tarXxfactor(nb.iris)2A0040202
sar.OLS7$tarXxfactor(nb.iris)2A0040203
sar.OLS7$tarXxfactor(nb.iris)2A0040301 **
sar.OLS7$tarXxfactor(nb.iris)2A0040302 **
sar.OLS7$tarXxfactor(nb.iris)2A0040401 **
sar.OLS7$tarXxfactor(nb.iris)2A0040402 ***
sar.OLS7$tarXxfactor(nb.iris)2A0040501
sar.OLS7$tarXxfactor(nb.iris)2A0040502
sar.OLS7$tarXxfactor(nb.iris)2A0040503 *
sar.OLS7$tarXxfactor(nb.iris)2A0040601
sar.OLS7$tarXxfactor(nb.iris)2A0040602
sar.OLS7$tarXxfactor(nb.iris)2A0040701
sar.OLS7$tarXxfactor(nb.iris)2A0040702
sar.OLS7$tarXxfactor(nb.iris)2A0040703
sar.OLS7$tarXxfactor(nb.iris)2A0040801 **
sar.OLS7$tarXxfactor(nb.iris)2A0040802 **
sar.OLS7$tarXxfactor(nb.iris)2A0040803 *
sar.OLS7$tarXxfactor(nb.iris)2A0040901 *
sar.OLS7$tarXxfactor(nb.iris)2A0040902 .
sar.OLS7$tarXxfactor(nb.iris)2A0040903
sar.OLS7$tarXxdistance.airport
sar.OLS7$tarXxdistance.beaches
sar.OLS7$tarXxdistance.cinemas
sar.OLS7$tarXxdistance.commerce
sar.OLS7$tarXxdistance.hosptials *
sar.OLS7$tarXxdistance.junctions
sar.OLS7$tarXxdistance.midhighschool
sar.OLS7$tarXxdistance.monument
sar.OLS7$tarXxdistance.nursery ***
sar.OLS7$tarXxdistance.port
sar.OLS7$tarXxdistance.railway.stations *
sar.OLS7$tarXxdistance.railways
sar.OLS7$tarXxdistance.roads
sar.OLS7$tarXxLN.total.surface:factor(nb.pieces)2 *
sar.OLS7$tarXxLN.total.surface:factor(nb.pieces)3 *
sar.OLS7$tarXxLN.total.surface:factor(nb.pieces)4 **
sar.OLS7$tarXxLN.total.surface:factor(nb.pieces)5 **
sar.OLS7$tarXxLN.total.surface:factor(nb.pieces)6
sar.OLS7$tarXxLN.total.surface:factor(nb.pieces)7
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
impacts(sar.OLS7, listw=mydm.lw1)
Impact measures (lag, exact):
Direct Indirect Total
LN.total.surface 5.883409e-01 1.106326e-01 6.989735e-01
factor(nb.pieces)2 -1.105625e+00 -2.079035e-01 -1.313528e+00
factor(nb.pieces)3 -1.114759e+00 -2.096211e-01 -1.324380e+00
factor(nb.pieces)4 -1.659032e+00 -3.119670e-01 -1.970999e+00
factor(nb.pieces)5 -2.117714e+00 -3.982184e-01 -2.515933e+00
factor(nb.pieces)6 -1.915242e+00 -3.601452e-01 -2.275387e+00
factor(nb.pieces)7 1.100590e+00 2.069567e-01 1.307547e+00
nb.sdb 4.768077e-02 8.965968e-03 5.664674e-02
nb.niv 1.670879e-02 3.141947e-03 1.985073e-02
factor(construction.period)B -6.156024e-01 -1.157589e-01 -7.313613e-01
factor(construction.period)C -2.423040e-01 -4.556323e-02 -2.878672e-01
factor(construction.period)D -1.172439e-01 -2.204674e-02 -1.392907e-01
factor(construction.period)E -6.470986e-02 -1.216815e-02 -7.687800e-02
factor(construction.period)F -4.124535e-02 -7.755842e-03 -4.900119e-02
factor(construction.period)G 8.326573e-02 1.565742e-02 9.892315e-02
factor(construction.period)H 8.135745e-02 1.529859e-02 9.665604e-02
factor(construction.period)I 1.435041e-01 2.698474e-02 1.704889e-01
factor(APPT.type)DU 1.296491e-02 2.437943e-03 1.540286e-02
factor(APPT.type)ST -2.245650e-01 -4.222756e-02 -2.667926e-01
factor(usage)MI 1.916347e-01 3.603530e-02 2.276700e-01
factor(usage)RS -5.411352e-01 -1.017559e-01 -6.428912e-01
factor(pre.sold)O 3.849783e-03 7.239193e-04 4.573702e-03
factor(buyer.dep1)IN -1.032036e-01 -1.940658e-02 -1.226102e-01
factor(buyer.dep1)IN1 -5.099493e-02 -9.589169e-03 -6.058410e-02
factor(year)2007 1.296229e-01 2.437451e-02 1.539974e-01
factor(year)2008 1.100817e-01 2.069994e-02 1.307816e-01
factor(year)2009 1.370838e-01 2.577745e-02 1.628612e-01
factor(year)2010 1.791934e-01 3.369582e-02 2.128893e-01
factor(year)2011 1.894478e-01 3.562407e-02 2.250719e-01
factor(year)2012 1.440941e-01 2.709569e-02 1.711898e-01
factor(year)2013 1.767207e-01 3.323084e-02 2.099515e-01
factor(nb.iris)2A0040102 -5.293656e-02 -9.954276e-03 -6.289083e-02
factor(nb.iris)2A0040103 8.549173e-02 1.607600e-02 1.015677e-01
factor(nb.iris)2A0040201 8.054359e-02 1.514555e-02 9.568913e-02
factor(nb.iris)2A0040202 1.180365e-01 2.219577e-02 1.402323e-01
factor(nb.iris)2A0040203 8.745495e-02 1.644517e-02 1.039001e-01
factor(nb.iris)2A0040301 2.193637e-01 4.124951e-02 2.606132e-01
factor(nb.iris)2A0040302 2.761614e-01 5.192984e-02 3.280912e-01
factor(nb.iris)2A0040401 3.448316e-01 6.484269e-02 4.096743e-01
factor(nb.iris)2A0040402 4.273723e-01 8.036378e-02 5.077361e-01
factor(nb.iris)2A0040501 4.890605e-02 9.196372e-03 5.810242e-02
factor(nb.iris)2A0040502 -6.774593e-02 -1.273905e-02 -8.048498e-02
factor(nb.iris)2A0040503 1.545656e-01 2.906476e-02 1.836303e-01
factor(nb.iris)2A0040601 -4.300018e-02 -8.085823e-03 -5.108600e-02
factor(nb.iris)2A0040602 5.172014e-02 9.725538e-03 6.144567e-02
factor(nb.iris)2A0040701 6.757772e-02 1.270742e-02 8.028514e-02
factor(nb.iris)2A0040702 1.143990e-01 2.151178e-02 1.359108e-01
factor(nb.iris)2A0040703 1.013613e-01 1.906013e-02 1.204214e-01
factor(nb.iris)2A0040801 2.579257e-01 4.850076e-02 3.064265e-01
factor(nb.iris)2A0040802 2.231868e-01 4.196841e-02 2.651552e-01
factor(nb.iris)2A0040803 2.401707e-01 4.516209e-02 2.853328e-01
factor(nb.iris)2A0040901 1.858228e-01 3.494241e-02 2.207652e-01
factor(nb.iris)2A0040902 3.135540e-01 5.896119e-02 3.725151e-01
factor(nb.iris)2A0040903 1.195014e-01 2.247124e-02 1.419727e-01
distance.airport -3.732590e-05 -7.018822e-06 -4.434472e-05
distance.beaches 4.108280e-05 7.725276e-06 4.880808e-05
distance.cinemas -7.965848e-05 -1.497911e-05 -9.463759e-05
distance.commerce -2.487507e-05 -4.677548e-06 -2.955262e-05
distance.hosptials -2.193079e-04 -4.123901e-05 -2.605469e-04
distance.junctions 8.072138e-05 1.517898e-05 9.590036e-05
distance.midhighschool 3.538648e-05 6.654130e-06 4.204061e-05
distance.monument -3.776701e-05 -7.101769e-06 -4.486878e-05
distance.nursery 2.016957e-04 3.792719e-05 2.396229e-04
distance.port 1.141565e-04 2.146618e-05 1.356227e-04
distance.railway.stations 2.194352e-04 4.126294e-05 2.606981e-04
distance.railways -1.688505e-04 -3.175093e-05 -2.006015e-04
distance.roads 2.218362e-05 4.171444e-06 2.635507e-05
LN.total.surface:factor(nb.pieces)2 2.664573e-01 5.010505e-02 3.165623e-01
LN.total.surface:factor(nb.pieces)3 2.701301e-01 5.079569e-02 3.209258e-01
LN.total.surface:factor(nb.pieces)4 3.930082e-01 7.390190e-02 4.669101e-01
LN.total.surface:factor(nb.pieces)5 4.696153e-01 8.830721e-02 5.579225e-01
LN.total.surface:factor(nb.pieces)6 4.323787e-01 8.130518e-02 5.136839e-01
LN.total.surface:factor(nb.pieces)7 -1.823502e-01 -3.428942e-02 -2.166396e-01