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

HAP 671 Final Exam 2025 Sample Questions and Detailed Answers

Rating
-
Sold
1
Pages
21
Grade
A+
Uploaded on
26-04-2025
Written in
2022/2023

Complete sample answers for HAP 671 Final Exam covering data cleaning, indexing, SQL queries, statistical analysis, and case-control study setup. Includes step-by-step SQL code and detailed explanations. Perfect for exam practice and mastering concepts.

Show more Read less
Institution
Module









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

Written for

Institution
Module

Document information

Uploaded on
April 26, 2025
Number of pages
21
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Final Exam HAP 671



Please use this document to provide your answers to the questions. Copy
and paste any graphs, results or your code into this document and upload
this document. Format your responses to look good (to the extent possible
same font size and type, no colors unless needed to make a point, etc.). I
grade both the accuracy of response and the clarity of the presentation.

In all questions provide all code which you used to compute your
results.

PART ONE:
USING DATA FROM final.bak, ANSWER THE QUESTIONS:

1. Download the file final.bak and restore the file to your MS SQL
Management Studio. Clean your data. Explain the logic you used for
data cleaning. Which errors did you find while cleaning the data?

I started by removing any rows with an icd9 value of null. This excludes
records that do not include a diagnosis. The following step removes
rows that do not have a date of diagnosis. This deletes records that do
not have a diagnosis date. The following step removes rows with a
death date earlier than the date of diagnosis. That scenario should not
be possible in the real world. These procedures would ensure that the
data is clean.
use final

-- Cleaning data --

--1.Removing nulls

select *from dbo.Admission where icd9 is null

---- transfering the data to another table

select * into #clean1 from dbo.Admission where icd9 is not null

--2.Check nulls in AgeatDX

select * into #clean2 from #clean1 where AgeAtDX is not null

---3. Removing Zombies

select distinct id into #cleaneddata from #clean2 where AgeAtDeath < AgeAtDX

, select * into dbo.datacleanAdmissions from #clean2 where id not in (select * from #cleaneddata)

select top 10 * from dbo.datacleanAdmissions
£5.74
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
shivanireddy

Get to know the seller

Seller avatar
shivanireddy George Mason University
Follow You need to be logged in order to follow users or courses
Sold
1
Member since
8 months
Number of followers
0
Documents
6
Last sold
7 months ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

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