0% found this document useful (0 votes)
7 views18 pages

Regression Analysis Project Guidelines

The document outlines the requirements and guidelines for Project 2: Regression Analysis in an Econometrics and Research Methods course. Students will work in groups on one of five datasets, performing data cleaning, exploratory analysis, and regression modeling, with specific deliverables including a written report and presentation. Important technical notes and success tips are provided, along with detailed descriptions of each dataset and their respective analysis goals.

Uploaded by

Velmontos
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views18 pages

Regression Analysis Project Guidelines

The document outlines the requirements and guidelines for Project 2: Regression Analysis in an Econometrics and Research Methods course. Students will work in groups on one of five datasets, performing data cleaning, exploratory analysis, and regression modeling, with specific deliverables including a written report and presentation. Important technical notes and success tips are provided, along with detailed descriptions of each dataset and their respective analysis goals.

Uploaded by

Velmontos
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Table of Contents

Project 2: Regression analysis ..................................................................................................1


Group formation ...............................................................................................................2
Project requirements ........................................................................................................3
Deliverables .....................................................................................................................3
Timeline ...........................................................................................................................3
Important technical notes: ...............................................................................................3
General Tips for Success: .................................................................................................4
Dataset 1: Bank Marketing Campaign .......................................................................................5
Source: ............................................................................................................................5
Type: ................................................................................................................................5
Size:.................................................................................................................................5
Citation Request: .............................................................................................................5
Analysis Goal. ..................................................................................................................5
Attribute information: .......................................................................................................5
Data Preparation Tasks: ....................................................................................................6
Required Data Transformations:........................................................................................6
Blueprint: .........................................................................................................................7
Dataset 2: Insurance Premiums ...............................................................................................7
Source: ............................................................................................................................7
Type: ................................................................................................................................7
Size:.................................................................................................................................7
Analysis Goal: ..................................................................................................................7
Attribute information: .......................................................................................................7
Data Preparation Tasks: ....................................................................................................8
Required Data Transformations:........................................................................................8
Blueprint: .........................................................................................................................9
Dataset 3: Loan Approval .........................................................................................................9
Source: ............................................................................................................................9
Type: ................................................................................................................................9
Size:.................................................................................................................................9
Analysis goal ....................................................................................................................9
Attribute information: .......................................................................................................9
Data Preparation Tasks: .................................................................................................. 10
Required Data Transformations:...................................................................................... 10
Dataset 4: House Prices ........................................................................................................ 10
Source: .......................................................................................................................... 10
Type: .............................................................................................................................. 11
Size:............................................................................................................................... 11
Analysis Goal ................................................................................................................. 11
Attribute Information: ..................................................................................................... 11
Data Preparation Tasks: .................................................................................................. 11
Required Data Transformations:...................................................................................... 11
Blueprint: ....................................................................................................................... 12
Dataset 5: Wages .................................................................................................................. 12
Source: .......................................................................................................................... 12
Type: .............................................................................................................................. 12
Size:............................................................................................................................... 12
Analysis Goal ................................................................................................................. 12
Attributes ....................................................................................................................... 12
Required Data Transformations ....................................................................................... 13
Blueprint ........................................................................................................................ 13
Project 2 Grading Logic .......................................................................................................... 14
Grading rubric ................................................................................................................ 14
Bonus Points (up to 5 points)........................................................................................... 17
Specific Elements to Look For by Dataset Type: ............................................................... 17

Project 2: Regression analysis


Dear Students,

I'm pleased to share the final project assignments for our Econometrics and Research Methods
course. Each group will work with one of the datasets I've selected, each requiring different data
manipulation techniques and regression approaches.

Group formation
The groups for this project don't have to be the same as for your previous assignment and you’re
free to form new groups. Ideally, groups should consist of 5 students.

Groups larger than 5 students are permitted but will be held to higher standards during grading
to account for the additional resources.

Each group should choose a different dataset. Duplicate selections (where two groups choose
the same dataset) will only be permitted after each of the 5 datasets has been chosen by at least
one group.
Project requirements
Each group is expected to:

• Perform necessary data cleaning and transformation

• Conduct exploratory data analysis

• Develop appropriate regression models

• Test model assumptions (heteroskedasticity, functional form, multicollinearity)

• Interpret your findings

Deliverables
This project requires two outputs:

1. Written report including:


• Your data analysis process,
• cleaning steps,
• modeling process,
• testing assumptions,
• interpretations.
• Appendix: please include your R/VBA/Python code for data cleaning steps and
prompts you used if you worked with a chatbot. You can paste-in your code (for VBA
users) or send me a jupyternotebook (.ipynb file)
2. Presentation:
• Present your key findings in class
• Include the most important elements from your report

Timeline
Final deadline: Our last class (28.05/29.05, depending on your group)

Preferred submission: 1-2 days before the presentation (not mandatory)

You can submit both deliverables on the presentation day.

Important technical notes:


1. Software options:

• Modeling can be done in either R or Gretl.

• You can switch between tools as needed - for example, use R functions to find
the best interaction terms, and then implement them in Gretl.

• For data preparation, any software you are comfortable with is fine (Excel with
VBA; R; Python), just document the process.

2. Special note about Wages dataset (project 5): this dataset is already clean and
analysis, requiring minimal processing. Because of this, it is specifically reserved for
groups with fewer than 5 students. Larger groups should select one of the other
datasets that require more comprehensive data work. The grading structure for this
particular project differs from the standard rubric:

• Model Specification and Estimation: 50 points (increased from the standard 25)

• Data Preparation and Cleaning: 0 points (reduced from 25 points)

• All other rubric categories remain unchanged

General Tips for Success:


1. Start with EDA: Always begin with exploratory data analysis – plots (barplot, histograms,
scatterplots, boxplots), summary statistic (general, per group, with and without outliers)
help us understand our data.

2. Document cleaning steps: Keep track of all data preparation decisions (which
observations were dropped, how missing values were handled, thresholds for
winsorization, variable transformations and why)

3. Test assumptions: Check all OLS assumptions (linearity, homoskedasticity, normality of


residuals)

4. Compare models: Try different specifications and compare results: a model table is
required

5. Interpret coefficients: Focus on economic significance, not just statistical significance


- interpretations are required only for your final model(s) unless stated otherwise in
project details.

Please let me know the index numbers of your group mates and which dataset you would like to
work with in the comments to this post. I'm available during office hours if you have any
questions about the project requirements. We can schedule appointments outside my office
hours if needed.

The project grading rubric (towards the end of this file) details how you'll be evaluated.

Below you can find table of contents with all available datasets, analyses’ goals, requirements
and “blueprints”.

Good luck with your projects!


Dataset 1: Bank Marketing Campaign
Source: UCI Machine Learning Repository
Type: Binary classification with mixed variables
Size: ~4,119 observations
Citation Request:
This dataset is publicly available for research. The details are described in [Moro et al., 2014].

Please include this citation if you plan to use this database:

[Moro et al., 2014] S. Moro, P. Cortez and P. Rita. A Data-Driven Approach to Predict the Success
of Bank Telemarketing. Decision Support Systems, In press,
[Link]

Available at: [pdf] [Link]

Analysis Goal: Explain what factors make a client more likely to subscribe to a term deposit
(binary outcome) based on demographic and economic factors. Use binary response model
and/or linear probability model.

Attribute information:
For more information, read [Moro et al., 2014].

# bank client data:

1 - age (numeric)

2 - job : type of job (categorical: "admin.","blue-


collar","entrepreneur","housemaid","management","retired","self-
employed","services","student","technician","unemployed","unknown")

3 - marital : marital status (categorical: "divorced","married","single","unknown"; note:


"divorced" means divorced or widowed)

4 - education (categorical:
"basic.4y","basic.6y","basic.9y","[Link]","illiterate","[Link]","[Link]","
unknown")

5 - default: has credit in default? (categorical: "no","yes","unknown")

6 - housing: has housing loan? (categorical: "no","yes","unknown")

7 - loan: has personal loan? (categorical: "no","yes","unknown")

# related with the last contact of the current campaign:

8 - contact: contact communication type (categorical: "cellular","telephone")


9 - month: last contact month of year (categorical: "jan", "feb", "mar", ..., "nov", "dec")

10 - day_of_week: last contact day of the week (categorical: "mon","tue","wed","thu","fri")

11 - duration: last contact duration, in seconds (numeric). Important note: this attribute highly
affects the output target (e.g., if duration=0 then y="no"). Yet, the duration is not known before a
call is performed. Also, after the end of the call y is obviously known. Thus, this input should only
be included for benchmark purposes and should be discarded if the intention is to have a
realistic model.

# other attributes:

12 - campaign: number of contacts performed during this campaign and for this client
(numeric, includes last contact)

13 - pdays: number of days that passed by after the client was last contacted from a previous
campaign (numeric; 999 means client was not previously contacted)

14 - previous: number of contacts performed before this campaign and for this client (numeric)

15 - poutcome: outcome of the previous marketing campaign (categorical:


"failure","nonexistent","success")

# social and economic context attributes

16 - [Link]: employment variation rate - quarterly indicator (numeric)

17 - [Link]: consumer price index - monthly indicator (numeric)

18 - [Link]: consumer confidence index - monthly indicator (numeric)

19 - euribor3m: euribor 3 month rate - daily indicator (numeric)

20 - [Link]: number of employees - quarterly indicator (numeric)

Output variable (desired target):

21 - y - has the client subscribed a term deposit? (binary: "yes","no")

Data Preparation Tasks:


• Handle categorical variables (create dummy variables – gretl; or convert them to factors
- R)

• Check for multicollinearity, especially between economic variables

• Normalize continuous variables if needed

• Handle missing values

Required Data Transformations:


1. Binning Age Variable: Create age groups (18-30, 31-45, 46-60, 61+)
2. Create Contact Efficiency: Calculate days since last contact/campaign duration

3. Impute Missing Values: Substitute missing values in categorical variables with mode.

4. Create Interaction Terms: Run the R function for finding the best interaction term and
include it in the model.

5. Feature Engineering: Create binary flag (dummy) for clients contacted in previous
campaigns

6. Outlier Handling: Winsorize numeric variables at 1% and 99% percentiles

7. Categorical Recoding: Reduce levels in education and job variables by combining


similar categories

Blueprint:
1. Start with exploratory data analysis: analyze the dataset and make informed choices
about which variables to include in the model. Please remember that
correlations/scatterplots/histograms should be done again after
cleaning/normalizing/imputing missing values/handling outliers.

2. Clean categorical variables; normalize continuous variables; handle missing values and
outliers. Show summary statistics/relevant plots before and after clean up.

3. Use logistic regression/probit model for the binary outcome

4. Compare with OLS using a linear probability model

5. Test for significance of different variable groups (model including campaign data + bank
client data demographic vs. model including campaign + socioeconomic data)

6. Evaluate models’ performance using confusion matrix, calculate sensitivity and


specificity.

Dataset 2: Insurance Premiums


Source: Kaggle Medical Cost Personal
Type: Regression
Size: ~1,300 observations
Analysis Goal: Predict medical insurance charges based on personal characteristics.
Attribute information:
Age – age of the client,

Sex – sex of the client,

Bmi – bmi of the client,


Children – number of children the client has,

Smoker – whether the client is a smoker,

Region – client’s region,

Charges – client’s insurance charges

Data Preparation Tasks:


• Transform skewed charge variable

• Create BMI categories

• Handle regional differences

• Create interaction terms (smoker × age)

Required Data Transformations:


1. Variable Transformation:

o Log-transform charges variable

o Square root transform BMI variable

o Create log-log model specification

2. Categorical Creation:

o Create BMI categories (underweight, normal, overweight, obese)

o Create age groups (18-25, 26-40, 41-55, 56+)

o Create family size variable (dependents + 1)

3. Feature Engineering:

o Create risk score (combining age, BMI, smoking)

o Create smoker × BMI interaction

o Create smoker × age interaction

o Create region × BMI interaction

4. Regional Analysis:

o Create regional dummy variables

o Calculate region-specific averages

o Create regional risk scores

5. Outlier Detection:

o Identify unusual charge amounts

o Create separate models with/without outliers

6. Variable Creation:
o Health risk index (combination of risk factors)

o Premium-to-risk ratio

Blueprint:
1. Explore distribution of charges

2. Apply log transformation if needed

3. Build OLS model with interactions

4. Test for heteroskedasticity

5. Compare linear vs. log-linear specifications

Dataset 3: Loan Approval


Source: Kaggle Loan Prediction
Type: Binary classification
Size: ~600 observations
Analysis Goal: Understand how applicant’s characteristic impact the loan approval.
Attribute information:
Loan_ID – id column,

Gender – Applicant’s gender, categorical with levels Male/Female,

Married – Applicant's marital status (Yes/No dummy),

Dependents – Number of dependents in applicant’s household,

Education – Applicant's education, categorical with levels Graduated/Not graduated,

Self_Employed – Whether Applicant’s self-employed (Yes/No dummy),

ApplicantIncome – Applicant’s income,

CoapplicantIncome – Co-applicant’s income,

LoanAmount – Amount the Applicant applied for,

Loan_Amount_Term – term of Applicant’s loan,

Credit_History – whether Applicant has a credit history (0/1 dummy),

Property_Area – From what kind of area Applicant comes from, categorical with levels
Rural/Semirural and Urban,

Loan_Status – whether Applicant was granted the loan (Y/N dummy)


Data Preparation Tasks:
• Handle missing values

• Create debt-to-income ratios

• Transform income variables

• Deal with categorical variables

Required Data Transformations:


1. Missing Value Treatment:

o Use mode imputation for categorical variables

2. Financial Ratio Creation:

o Calculate loan amount to income ratio

o Create total income variable (applicant + co-applicant)

o Calculate monthly payment estimates

o Create debt-to-income ratio

3. Income Transformations:

o Log-transform income variables

o Create income categories (low, medium, high)

o Adjust for household size

o Create per-capita income

4. Categorical Variable Handling:

o Create dummy variables for categorical predictors

o Combine low-frequency categories

o Create binary credit history indicator

o Implement one-hot encoding

5. Feature Engineering:

o Create loan term indicators (consider term categories, like short-term, mid-term
and long-term loans or term-to-amount)

o Create interaction terms (income × education)

Dataset 4: House Prices


Source: Kaggle House Prices Competition
Type: Regression
Size: ~1,460 observations
Analysis Goal:
Predict house prices using various property characteristics.

Attribute Information:
Please refer to “housing_data_description.txt”

Data Preparation Tasks:


• You are welcome to delete variables that are not highly correlated with SalePrice variable
to reduce the number of attributes.

• Handle missing values

• Transform skewed variables (log transformation)

• Create interaction terms (e.g., quality × size)

• Deal with categorical variables with many levels (bin together similar categories; create
dummies and use only some of them in the modeling, etc.)

Required Data Transformations:


1. Missing Value Treatment:

o Implement different imputation methods for different variables (mean/median


for continuous; mode for discrete & categorical)

o Use neighborhood medians for structural features (we can assume that houses
built within a particular neighborhood are structurally similar due to being built
around similar time, in a fitting architectural style, etc), i.e. number of bedrooms,
garage size, basement square footage, etc.

2. Variable Transformations:

o Log-transform price and highly skewed variables

o Create polynomial terms for lot area and living area

3. Feature Engineering:

o Create total bathroom count (full + half bathrooms)

o Calculate house age and remodel age at the time of selling (YrSold – YearBuilt;
YrSold - YearRemodAdd)

o Create living area per bedroom ratio

o Create total area variable (basement + above ground)


4. Categorical Variable Reduction:

o Use clustering to reduce neighborhood levels

o Create ordinal variables from quality measures

5. Interaction Terms:

o Quality × living area

o Neighborhood × age

o Garage size × car capacity

6. Outlier Detection and Handling:

o Use Cook's distance to identify influential observations

o Create separate models with and without outliers

7. Multicollinearity Check:

o Calculate VIF and address high-correlation features

Blueprint:
1. Extensive data cleaning for missing values

2. Feature engineering (create area ratios, age of house)

3. Build OLS regression model

4. Test for heteroskedasticity

5. Compare with robust standard errors

6. Perform model diagnostics

Dataset 5: Wages
Source: Greene's Econometric Analysis textbook
Type: Cross-sectional
Size: 4165 observations
Analysis Goal
Estimate a Mincer earnings equation1 to analyze returns to education and experience, while
testing for evidence of wage discrimination.

Attribute Information
EXP =Work experience,

WKS =Weeks worked,

1
model that explains wage income as a function of schooling and experience.
OCC =Occupation, 1 if blue collar,

IND =1 if manufacturing industry,

SOUTH =1 if resides in south,

SMSA =1 if resides in a city (Standard Metropolitan Statistical Area),

MS =1 if married,

FEM =1 if female,

UNION =1 if wage set by union contract,

ED =Years of education,

BLK =1 if individual is black,

LWAGE=Log of wage.

Required Data Transformations


• Create experience-squared term to capture diminishing returns

• Create experience categories (0-5, 6-10, 11-20, 20+ years)

• Generate education-experience interaction (ED*EX)

• Create intersection variables: FEM*BLK, FEM*MS, BLK*SOUTH

• Create union premium by occupation (UNION*OCC)

• Create public/private sector indicator

Blueprint
1. Base Specification:

• Estimate Mincer earnings equation: log(wage) = β₀ + β₁education + β₂experience


+ β₃*experience² + ε

• Interpret coefficients as percentage returns

2. Extended Models:

• Add demographic controls (gender, race, marital status)


• Add location controls (SMSA, south)
• Add job characteristic variables (OCC, IND, UNION, WKS)
• Add created interaction terms. You can also look for the best ones using the
function built in class.
3. Outliers:
• Check outliers on model level on each step. Incorporate them in models.

4. Check whether your models meet assumptions:


• Test for heteroskedasticity (Breusch-Pagan test)

• Implement robust standard errors

• Check functional form (RESET test)

Project 2 Grading Logic


The assessment is divided into five key components, each with specific criteria and point
allocations.

Grading rubric
Total Points: 100

1. Data Preparation and Cleaning (25 points)

Needs
Satisfactory
Criterion Excellent (5) Good (4) Improvement Poor (1)
(3)
(2)

Comprehensive
strategy with
Basic Minimal
multiple Appropriate
imputation treatment;
Missing Value appropriate methods used No missing
performed; significant
Treatment methods; with basic value treatment
limited missing values
justification for explanation
justification remain
chosen
approach

Thorough
identification
Outliers Basic outlier Limited outlier
with
Outlier identified and detection with detection; No outlier
visualizations;
Handling appropriately simple inappropriate detection
multiple
handled treatment treatment
treatment
methods tested

Multiple Basic Limited


Appropriate
transformations transformations transformations No
Variable transformations
tested; strong applied without and/or transformations
Transformations with basic
justification with thorough inappropriate when needed
diagnostics
diagnostic plots testing choices

Creative,
theoretically Few new
Useful new
Feature justified new Basic feature variables with No feature
variables with
Engineering variables with creation unclear engineering
clear purpose
demonstrated purpose
value
Needs
Satisfactory
Criterion Excellent (5) Good (4) Improvement Poor (1)
(3)
(2)

Comprehensive, Well- Limited


Basic
Documentation reproducible documented documentation; No
documentation
of Process workflow with process with difficult to documentation
of major steps
clear comments sufficient detail follow

2. Exploratory Data Analysis (20 points)

Needs
Satisfactory
Criterion Excellent (5) Good (4) Improvement Poor (1)
(3)
(2)

Comprehensive Good summary


summary with of key variables Basic summary Limited Minimal or no
Descriptive
appropriate with statistics for descriptive descriptive
Statistics
measures for all appropriate main variables analysis statistics
variables measures

Multiple
informative Good Basic Limited
Data visualizations with visualizations visualizations visualizations Few or no
Visualization proper formatting with proper covering key with formatting visualizations
and insightful formatting relationships issues
interpretation

Insightful
Recognition of Basic
identification of No discussion
Pattern major patterns identification of Limited pattern
patterns, of data
Identification and obvious recognition
anomalies, and patterns
relationships patterns
relationships

Thorough
Good
correlation
correlation Basic No analysis of
Variable analysis with Limited analysis
analysis with correlation variable
Relationships visualization and of relationships
basic analysis relationships
discussion of
discussion
implications

3. Model Specification and Estimation (25 points)


Needs
Satisfactory
Criterion Excellent (5) Good (4) Improvement Poor (1)
(3)
(2)

Multiple competing
models with Appropriate Basic model No justification
Model Inappropriate
theoretical model with with limited for model
Selection model choice
justification; clear justification justification choice
comparison

Theoretically-driven Appropriate Poor variable


Arbitrary
Variable variable selection variable Basic variable selection with
variable
Selection with statistical selection with selection obvious
selection
validation basic testing omissions

Thorough testing of Appropriate No


Basic
Functional alternative functional form Limited attention consideration
functional form
Form functional forms with basic to functional form of functional
consideration
with diagnostics testing form

Appropriate
Appropriate Basic Problematic Inappropriate
Estimation estimation method
estimation estimation estimation estimation
Method with discussion of
method method approach method
alternatives

Comprehensive
Good testing of Basic Limited
Assumption diagnostic tests with No assumption
key assumption assumption
Testing visual and statistical testing
assumptions testing testing
confirmation

4. Results Interpretation and Discussion (20 points)

Needs
Criterion Excellent (5) Good (4) Satisfactory (3) Improvement Poor (1)
(2)

Precise Correct
interpretation interpretation Some Major
Coefficient Basic correct
with economic with misinterpretation misinterpretation
Interpretation interpretation
significance and consideration of coefficients of results
units of significance

Clear hypothesis
Appropriate Limited No formal
Hypothesis testing with Basic hypothesis
hypothesis hypothesis hypothesis
Testing appropriate testing
testing testing testing
statistical tests

Comprehensive
Good Basic
Model Fit assessment Limited No discussion of
assessment of assessment of
Assessment using multiple assessment of fit model fit
model fit model fit
metrics
Needs
Criterion Excellent (5) Good (4) Satisfactory (3) Improvement Poor (1)
(2)

Thorough
discussion of Good Basic
Limitations Limited mention No discussion of
limitations with discussion of acknowledgment
Discussion of limitations limitations
potential limitations of limitations
improvements

5. Presentation and Communication (10 points)

Needs
Criterion Excellent (5) Good (4) Satisfactory (3) Improvement Poor (1)
(2)

Professional, well- Good


Report Basic structure Confusing Poor or no
organized structure organization
Structure present organization structure
with clear sections with logical flow

Professional Well-presented
Tables presentation with tables and Basic tables and Poor Inadequate
and proper formatting, figures with figures with some presentation of presentation
Figures numbering, and proper formatting issues results of results
informative captions formatting

Bonus Points (up to 5 points)


Bonus points may be awarded for:

• Exceptional creativity in analysis approach

• Advanced econometric techniques beyond course requirements

• Particularly insightful economic interpretation

• Outstanding data visualization

• Exceptionally thorough robustness checks

Specific Elements to Look For by Dataset Type:


For Cross-Sectional Regression Datasets:

• Proper testing for heteroskedasticity

• Robustness to outliers

• Careful attention to functional form

• Testing for nonlinearities


• Proper standard error calculation

For Binary Outcome Datasets:

• Comparison of logit vs. probit specifications

• Calculation and interpretation of marginal effects

• Use of classification metrics (beyond just R²)

• Proper probability threshold selection

• Sensitivity and Specificity analysis

For Financial/Economic Datasets:

• Economic significance vs. statistical significance

• Consideration of policy implications

• Contextualizing results within economic theory

• Testing of established economic hypotheses

You might also like