Description Usage Format Source References Examples
'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.
1 |
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.
The Polish real estate web-site https://www.oferty.net.
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.
1 2 3 4 5 6 7 8 9 10 11 | 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")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.