Learn R Programming

HRW (version 1.0-5)

WarsawApts: Apartment prices in Warsaw, Poland

Description

'WarsawApts' is a subset of the data set 'apartments' in the R package PBImisc. This dataset contains the prices of the apartments which were sold in Warsaw, Poland, during the calendar years 2007 to 2009.

Usage

data(WarsawApts)

Arguments

Format

A data frame with 409 observations on the following 6 variables:

surface

area of the apartment in square meters.

district

a factor corresponding to the district of Warsaw with levels Mokotow, Srodmiescie, Wola and Zoliborz.

n.rooms

number of rooms in the apartment.

floor

floor on which the apartment is located.

construction.date

year that the apartment was constructed.

areaPerMzloty

area in square meters per million zloty.

References

Biecek, P. (2016). PBImisc: A set of datasets in My Classes or in the Book 'Modele Liniowe i Mieszane w R, Wraz z Przykladami w Analizie Danych' 1.0.

Examples

Run this code
# NOT RUN {
library(HRW) ; data(WarsawApts)
x <- WarsawApts$construction.date
y <- WarsawApts$areaPerMzloty
plot(x,y,bty = "l",col = "dodgerblue")
if (require("mgcv"))
{
   fitGAMcr <- gam(y ~ s(x,bs = "cr",k = 30))
   xg <- seq(min(x),max(x),length = 1001)
   fHatgGAMcr <- predict(fitGAMcr,newdata = data.frame(x = xg))
   lines(xg,fHatgGAMcr,col = "darkgreen")
}
# }

Run the code above in your browser using DataLab