rent.RdCross-sectional data on apartment rents in Munich from the rent survey
(Mietspiegel) 1999 and an updated survey wave (2001), together with an
administrative district map of Munich provided as an "sf" object.
The file contains (i) the 1999 data set rent99, (ii) a pooled data set
rent combining 1999 and 2001, and (iii) district polygons Munich.
data("rent")The file rent.rda contains three objects:
rent99A data frame with observations on apartment rents in Munich in 1999, including dwelling characteristics and district information:
rentNumeric. Monthly rent in EUR.
rentsqmNumeric. Monthly rent per square meter (EUR/m\(^2\)).
areaNumeric. Apartment size in square meters.
yearcNumeric. Year of construction of the building.
bathFactor with levels "normal" and "upscale",
describing bathroom quality.
kitchenFactor with levels "normal" and "upscale",
describing kitchen quality (1999 coding).
cheatingFactor with levels "no" and "yes",
indicating whether the landlord violated rent regulations.
locationFactor with levels "normal", "good",
and "best", describing residential location quality.
districtInteger. Munich district identifier.
rentA pooled data frame combining 1999 and 2001 observations,
intended for analyzing changes between survey waves (e.g., via interactions
with time):
rentNumeric. Monthly rent in EUR.
rentsqmNumeric. Monthly rent per square meter (EUR/m\(^2\)),
computed as rent/area and rounded to two decimals.
areaNumeric. Apartment size in square meters.
yearcNumeric. Year of construction of the building.
bathFactor with levels "normal" and "upscale".
Available for the 1999 part; NA for observations coming only from
the 2001 wave.
kitchenFactor with levels "lowlevel", "normal",
and "upscale", describing kitchen quality.
cheatingFactor with levels "no" and "yes".
Available for the 1999 part; NA for observations coming only from
the 2001 wave.
locationFactor with levels "normal", "good",
and "best", describing residential location quality.
districtInteger. Munich district identifier. Available for the
1999 part; NA for observations coming only from the 2001 wave.
timeInteger indicator of the survey wave (typically
0 for 1999 and 1 for 2001).
MunichAn object of class "sf" with polygon geometry giving
the administrative districts of Munich, in WGS84 geographic coordinates
(EPSG:4326). The attribute district identifies districts and can be
used to join summaries computed from rent99 or rent.
The 1999 rent survey data rent99 provide apartment rents and housing
characteristics including district identifiers. The pooled data set rent
combines observations from 1999 and 2001 and includes a wave indicator
time, enabling analyses of changes over time (e.g., testing whether
effects of characteristics such as kitchen quality differ between 1999 and 2001
by including interaction terms with time).
The map object Munich was imported from a BayesX boundary file and
converted to an "sf" object, then transformed to WGS84 (EPSG:4326).
Rent data: Munich rent survey (Mietspiegel) 1999 and update wave 2001.
Boundary file munich.bnd shipped with the package (BayesX format) and
converted to "sf".
Fahrmeir L., Kneib T., Lang S., and Marx B. D. (2021). Regression: Models, Methods and Applications. 2nd Edition. Springer, Berlin, Heidelberg. doi:10.1007/978-3-662-63882-8 .
if (FALSE) { # \dontrun{
data("rent")
## 1999-only data
summary(rent99$rent)
## pooled data: check wave sizes
table(rent$time, useNA = "ifany")
## average rent per sqm by district (1999)
tapply(rent99$rentsqm, rent99$district, mean, na.rm = TRUE)
## example: interaction of kitchen quality with time (pooled)
m <- bamlss(rentsqm ~ I(1/area) + poly(yearc,3) + kitchen*time, data = rent)
summary(m)
## plot Munich districts
if(requireNamespace("sf", quietly = TRUE)) {
plot(sf::st_geometry(Munich), main = "Munich districts")
}
} # }