Albany College of Pharmacy CH1 Log Polynomial and Interaction Models HW MUST know how to use RIn addition to the Bailey reading (sections 7.1, 7.2 and 12.1) please read this document. It uses the Simpsons data we first saw in Bailey Ch 1 to estimate some of the more advanced models discussed in this week’s assignment. This script carries out the analysis of the Simpsons data described in the document.In your submission, please answer all the questions that appear on the last page of this document. In addition, please try running the script and describe your experience. (What happens? Are you able to recreate the tables or did you have trouble running it? If so, what was the problem?) ???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
???:Gary Mongiovi ??? ?????????? ?????? ??????? ??
?????? ???? ?
Exercises Using The Simpsons Data from Real
Econometrics
Matthew J. Holian?
July 23, 2020
Abstract
This document includes some exercises for introductory econometrics courses Ive
taught at San Jose State University that use Michael Baileys Real Econometrics textbook
Keywords: multiple regression, causal inference.
JEL Codes: TBA
?
Corresponding author: matthew.holian@sjsu.edu. Please email me comments or corrections.
1
Nonlinear Models and Linear Probability Models
This document describes nonlinear models, estimated by transforming variables in one of
three ways: with logarithms, polynomials or interactions. Its ok if you dont know what
these terms mean yet; Ill introduce them below.
We begin by describing the natural logarithm function. Remember log base 10 from
algebra? Well the natural log is log base 2.718 (where 2.718 is the value of the natural
exponent e to three decimal places.) Using software, its very easy take the natural log of
a variable, such as income, and then to use the logged value of the variable as either an
independent or dependent variable. There are two advantages of doing this. First, enables
regression to estimate a specific type of nonlinear relationship. Second, it facilitates easy
interpretation of regression results.
Interpreting models with logs can be confusing. Therefore I suggest you consult the
tables of rules for interpreting different log models. Table 1 reproduces the descriptions from
Baileys textbook, however, I actually prefer the table that appears in Stock and Watsons
textbook, as it does not require us to change the scale of percentages in our interpretation.
I also reproduce Stock and Watsons version of this as Table 2, because my preference is to
always talk about percents on a 0-100 scale.
Table 1: How to interpret logged models, table adapted from Baileys textbook
model
equation
interpretation
Log-linear
ln Yi = ?0 + ?1 Xi + ei
Linear-log
Yi = ?0 + ?1 ln Xi + ei
Log-log
ln Yi = ?0 + ?1 ln Xi + ei
A one-unit increase in X is associated with a ?1
percent change in Y (on a 0-1 scale).
A one percent increase in X is associated with a
?1 /100 change in Y .
A one-percent increase in X is associated with a
?1 percent change in Y (on a 0-100 scale)
Two other types of model that are nonlinear in the variables are a polynomial modes (e.g.
Y = B0 + B1 ? X + B2 ? X 2 ) and interaction models (e.g. Y = B0 + B1 X + B2 Z + B3 (X ? Z)).
1
Table 2: How to interpret logged models, Table adapted from Stock and Watsons textbook
model
equation
interpretation
Log-linear
ln Yi = ?0 + ?1 Xi + ei
Linear-log
Yi = ?0 + ?1 ln Xi + ei
Log-log
ln Yi = ?0 + ?1 ln Xi + ei
A change in X by one unit (?X = 1) is associated
with a 100?1 % change in Y.
A one percent change in X is associated with a
change in Y of 0.01?1
A one-percent increase in X is associated with a
?1 percent change in Y , so ?1 is the elasticity of Y
with respect to X.
These models are straightforward to estimate, but like with log models, interpreting them
can be a challenge. The best way to interpret such models is to evaluate them at two sets
of X values. With the polynomial, find fitted values of the model when X equals 1 and then
when X equals 2, and compare the predictions. It is also possible to take a derivative and
evaluate that, but this requires some familiarity with calculus.
Chapters 6 and 7 of Baileys textbook describe nonlinear (log and polynomial) models
and models with dummy variables. To illustrate these concepts, I use the Simpsons dataset
from Chapter 1. This is kind of a silly example but it can be used to illustrate the types of
models. Table 3 presents data from Baileys Table 1.1, plus an additional variable indicating
gender. Table 4 presents variable descriptions, and Table 5 presents summary statistics.
Table 6 presents estimates of regression models. Column on contains a regression of
WEIGHT on FEMALE. This is a bivariate regression model with continuous dependent and
independent variables. All together Table 6 contains five regression models; models 2-5 are
various nonlinear models:
1. A linear-linear model (regress WEIGHT on DOUGHNUTS)
2. A polynomial model (regress WEIGHT on DOUGHNUTS and DOUGHNUTS2 )
3. A linear-log model (regress WEIGHT on logDOUGHNUTS)
4. A log-linear model (regress logWEIGHT on DOUGHNUTS )
2
Table 3: Simpsons Variable Descriptions
NAME
WEIGHT
DOUGHNTS
FEMALE
275
141
70
75
310
80
160
263
205
185
170
155
145
14
0
0
5
20
0.75
0.25
16
3
2
0.8
5
4
0
1
1
0
0
0
0
0
0
0
0
1
1
Homer
Marge
Lisa
Bart
Comic Book Guy
Mr. Burns
Smithers
Chief Wiggum
Principal Skinner
Rev. Lovejoy
Ned Flanders
Patty
Selma
Table 4: Simpsons Variable Descriptions
Variable
Description
WEIGHT
DOUGHNUTS
FEMALE
logDOUGHNUTS
logWEIGHT
DOUGHNUTS2
INTERACT
Weight in pounds
Weekly doughnut consumption
A dummy equal to one if respondent is female
the natural log of DOUGHNUTS
the natural log of WEIGHT
the square of DOUGHNUTS
the product of WEIGHT and FEMALE
Table 5: Simpsons Summary Statistics
Statistic
N
Mean
St. Dev.
Min
Max
WEIGHT
DOUGHNUTS
FEMALE
INTERACT
logWEIGHT
logDOUGHNUTS
DOUGHNUTS2
13
13
13
13
13
13
13
171.846
5.446
0.308
0.692
5.046
1.356
71.713
76.155
6.750
0.480
1.702
0.485
1.063
128.679
70
0
0
0
4.248
0.000
0
310
20
1
5
5.737
3.045
400
3
5. A log-log model (regress logWEIGHT on logDOUGHNUTS)
Here are the results:
Table 6: Regression of Doughnuts on Weight, Linear and Nonlinear Models
Dependent variable:
WEIGHT
DOUGHNUTS
(1)
(2)
9.224???
(1.105)
5.143
(8.150)
DOUGHNUTS2
logWEIGHT
(3)
(4)
(5)
0.049???
(0.009)
0.221
(0.412)
52.855???
(11.995)
logDOUGHNUTS
0.294???
(0.085)
Constant
121.613???
(17.256)
128.018???
(20.809)
100.150???
(20.515)
4.776???
(0.144)
4.647???
(0.173)
Observations
R2
Adjusted R2
Residual Std. Error
F Statistic
13
0.668
0.638
45.814
22.158???
13
0.676
0.612
47.457
10.451???
13
0.544
0.503
53.700
13.134???
13
0.475
0.428
0.367
9.963???
13
0.415
0.362
0.387
7.810??
?
Note:
p
Purchase answer to see full
attachment
Why should I choose Homework Writings Pro as my essay writing service?
We Follow Instructions and Give Quality Papers
We are strict in following paper instructions. You are welcome to provide directions to your writer, who will follow it as a law in customizing your paper. Quality is guaranteed! Every paper is carefully checked before delivery. Our writers are professionals and always deliver the highest quality work.
Professional and Experienced Academic Writers
We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.
Reasonable Prices and Free Unlimited Revisions
Typical student budget? No problem. Affordable rates, generous discounts - the more you order, the more you save. We reward loyalty and welcome new customers. Furthermore, if you think we missed something, please send your order for a free review. You can do this yourself by logging into your personal account or by contacting our support..
Essay Delivered On Time and 100% Money-Back-Guarantee
Your essay will arrive on time, or even before your deadline – even if you request your paper within hours. You won’t be kept waiting, so relax and work on other tasks.We also guatantee a refund in case you decide to cancel your order.
100% Original Essay and Confidentiality
Anti-plagiarism policy. The authenticity of each essay is carefully checked, resulting in truly unique works. Our collaboration is a secret kept safe with us. We only need your email address to send you a unique username and password. We never share personal customer information.
24/7 Customer Support
We recognize that people around the world use our services in different time zones, so we have a support team that is happy to help you use our service. Our writing service has a 24/7 support policy. Contact us and discover all the details that may interest you!
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
Our Services
Our reputation for excellence in providing professional tailor-made essay writing services to students of different academic levels is the best proof of our reliability and quality of service we offer.
Essays
When using our academic writing services, you can get help with different types of work including college essays, research articles, writing, essay writing, various academic reports, book reports and so on. Whatever your task, homeworkwritingspro.com has experienced specialists qualified enough to handle it professionally.
Admissions
Admission Essays & Business Writing Help
An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.
Reviews
Editing Support
Our professional editor will check your grammar to make sure it is free from errors. You can rest assured that we will do our best to provide you with a piece of dignified academic writing. Homeworkwritingpro experts can manage any assignment in any academic field.
Reviews
Revision Support
If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.