100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Case

Assignment 3: Empirical Paper

Rating
-
Sold
-
Pages
12
Grade
9-10
Uploaded on
15-10-2024
Written in
2022/2023

In this assignment (25% of Final Grade) you construct, estimate and evaluate a linear hedonic price model, using Stata software. We assigned you to groups of 3 in which you will complete the assignment. The assignment can be found here Assignment_HedonicPrices_2020.pdf. Data can be downloaded here hedonicprices2020.dta.

Show more Read less
Institution
Module








Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Study
Module

Document information

Uploaded on
October 15, 2024
Number of pages
12
Written in
2022/2023
Type
Case
Professor(s)
Hans koster
Grade
9-10

Subjects

Content preview

UERE Assignment 3
2022-11-30



Exercise 1.1
Inspecting Data:
library(haven)
Data1.1 <- read_dta("C:/Users/bassp/Downloads/hedonicprices2020-
1.dta")
summary(Data1.1)

Using the “summary()” function, we found that the data contains negative prices and
missing values.
Exclude missing and wrong observations:
library(stats)
Data1.2 <- Data1.1[complete.cases(Data1.1$price),]
Data1.2 <- Data1.2[complete.cases(Data1.2$size),]
Data1.2 <- Data1.2[complete.cases(Data1.2$pricesqm),]
Data1.2 <- Data1.2[Data1.2$price >= 0, ]

The function ‘complete.cases()’ creates a logical vector in which the cases are complete,
i.e. have no missing values. We made use of this function to exclude missing observations in
terms of prices, house size and price per m2.
We made use of indexing to exclude negative (wrong) prices. All price values in ‘Data1.2’
must be higher or equal to zero.
Drop outliers:
lower_bound_pricesqm <- quantile(Data1.2$pricesqm, 0.025)
upper_bound_pricesqm <- quantile(Data1.2$pricesqm, 0.975)

To detect the outliers in terms of prices, house size and price per m2, we made use of the
percentiles method. With this method, all observations that lie outside the interval formed
by the 2.5 and 97.5 percentiles will be considered as potential outliers.
The values of the lower and upper percentiles (and thus the lower and upper limits of the
interval) can be computed with the ‘quantile()’ function (Soetewey, 2020).
outlier_ind_pricesqm <- which(Data1.2$pricesqm < lower_bound_pricesqm
| Data1.2$pricesqm > upper_bound_pricesqm)
Data1.3 <- Data1.2[-outlier_ind_pricesqm,]

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
JelleSierkstra Vrije Universiteit Amsterdam
Follow You need to be logged in order to follow users or courses
Sold
43
Member since
5 year
Number of followers
37
Documents
17
Last sold
10 months ago
Effectief Studeren

Op dit account verkoop ik participatie-opdrachten, samenvattingen, papers, etc. Deze moeten uitsluitend als hulpmiddel gebruikt worden door 1e jaars bedrijfskunde studenten. Overname van mijn gemaakte werk zal ertoe leiden dat je als fraudeur bestempeld wordt, met tot gevolg een 1 als cijfer. Kijk dus goed uit en gebruik dit als hulpmiddel wanneer je er niet uitkomt bij de opdrachten!

4.0

13 reviews

5
4
4
5
3
4
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions