econ - Economics
for the stata assignment just do the first question
Problem Set 3, Econ 120B
Prof. Yixiao Sun
1. Consider the simple linear regression model with one explanatory variable,
Y = β0 + β1X + u.
Suppose we estimate the coeffi cients using OLS on a sample of observations (Xi,Yi), i =
1, · · · ,n. Recall the following definitions of the sample covariance, sample variances, and
sample correlation:
ĉov (X,Y ) =
1
n
n∑
i=1
(Xi − X̄)(Yi − Ȳ ),
v̂ar (X) =
1
n
n∑
i=1
(Xi − X̄)2,
v̂ar (Y ) =
1
n
n∑
i=1
(Yi − Ȳ )2,
ρ̂XY =
ĉov (Y,Y )√
v̂ar (X)
√
v̂ar (Y )
.
(a) Using the facts that β̂0 = Ȳ − β̂1X̄ and β̂1 = ĉov (X,Y ) /v̂ar (X), show that
1
n
SSE =
[ĉov (X,Y )]
2
v̂ar (X)
.
(b) Show that R2 = ρ̂2XY .
2. Consider the following causal model
y ← bx + v,
x ← cy + u,
where b 6= 0,c 6= 0 and bc 6= 1. Suppose that the values of (u,v) are generated from
(U,V ) ∼ N
[
0,
(
σuu σuv
σuv σvv
)]
.
We do not observe (U,V ) but we could observe the equilibrium solution (X,Y ).
1
(a) Consider the special case with σuu = 0 but σvv 6= 0 so that the model becomes
y ← bx + v,
x ← cy.
What is best linear prediction of Y given X (i.e., suppose I give you the value of X
but withhold the value of Y, what would be your best guess of Y according to the
MSE criterion?). What is best linear prediction of X given Y ?
(b) Consider the special case with σvv = 0 but σuu 6= 0 so that the model becomes
y ← bx,
x ← cy + u
What is best linear prediction of Y given X? What is best linear prediction of X given
Y ?
(c) Now suppose σuu 6= 0 and σvv 6= 0. Under what condition(s) is X useless as a predictor
of Y ? Under what condition(s) is Y useless as a predictor of X? Explain.
3. Consider the following model
Yi = Xiβ1 + ui, i = 1, ...,n
withoutan intercept. Thismodel isusedonlyunder theassumption that E(Y ) = E(X) = 0.
We maintain this assumption here.
(a) Derive the OLS estimator β̂1 for β1. Show your steps.
(b) Given a dataset, suppose we know that the sample correlation coeffi cient between X
and Y is 0.5, the sample variance of X is 4 and that of Y is 60. Compute β̂1.
(c) Now suppose we regress X on Y without an intercept. Given the information in (b),
can you find the OLS estimate for the coeffi cient on Y ?
4. Suppose a researcher, using wage data on 250 randomly selected male workers and 280
female workers, obtained the OLS regression estimates (standard errors are given in paren-
theses).
ŵage = 12.52
(0.23)
+ 2.12
(0.36)
male, R2 = 0.06. (1)
Here wage is measured in dollars/hour and male is a binary variable which equals 1 if the
person is male. Define the gender wage gap as the difference in earnings between males and
females.
(a) What is the estimated gender wage gap?
(b) In the sample, what is the mean wage for men and women?
(c) Another researcher uses the same data but regresses wage on female, a variable that
equals 1 if the person is female. what are the regression estimates in this new regres-
sion? Also compute the R2 for this new regression.
2
5. In your sample, all individuals have received a stimulus check of $1,200/month. Let Y be
the monthly income (measured in dollars) and X be the total hours worked in a month.
You decide to run a regression of Y net, the monthly income on hours worked, net of the
$1,200 stimulus check (Y net = Y − 1200). The estimated coeffi cients are reported below:
Ŷ net = 1256 + 30 X.
(a) What would happen to the estimates if instead you ran the regression using gross
income (hence including the $1,200 for all individuals) on hours worked? Explain.
(b) Suppose you construct a new variable, the total hours worked in a week Xweek = X/4.
What would be the corresponding slope estimate from a regression of Y net on Xweek?
6. Work on the the Stata Assignment.
3
Stata Questions
Econ 120B, UCSD
Prof. Yixiao Sun
• clear all // clear the environment/memory
set more off
sysuse nlsw88 // load the built-in dataset nlsw88
Please make sure your do-file is clearly documented to help us understand your
code.
• nlsw88 is a built-in dataset that comes with Stata. It is an extract from the
1988 round of the National Longitudinal Survey of Mature and Young Women.
Following is a summary of the variables in this dataset.
idcode survey id
age age
race race, can take three values, white, black or other
married = 1 if is currently marries, = 0 otherwise
never married = 1 if never married, = 0 otherwise
grade current grade completed
collgrad = 1 if graduated from college, = 0 otherwise
south = 1 if lives in southern states, = 0 otherwise
smsa = 1 if lives in standard metropolitan statistical area, = 0 otherwise
c city = 1 if lives in central city, = 0 otherwise
industry industry, use tab industry to see the categories
occupation occupation, use tab occupation to see the categories
union = 1 if is in a union, , = 0 otherwise
wage hourly wage, measured in $
hours hours worked per week
ttl exp total work experience, measured in years
tenure current job tenure, measured in years
More information on the original data can be found here:
https://www.bls.gov/nls/orginal-cohorts/mature-and-young-women.htm
1
https://www.bls.gov/nls/orginal-cohorts/mature-and-young-women.htm
1. In this exercise you will re-label variables and create some new variables which
will be used later.
(a) Re-label the variable smsa to “lives in urban area”so that it is more in-
formative. Note that SMSA stands for “standard metropolitan statistical
area.”
(b) Re-name the variable smsa to urban.
(c) Generate a new variable called wageofc taking the same values as the
variable wage, so that we can modify the wage data without loosing the
original variable.
(d) The minimum wage in 1988 was $3.35 an hour. Let’s say our fictional
bosses at the Bureau of Labor Statistics will be mad if they see evidence
of minimum wage law violations in the dataset. Re-classify those earning
below minimum wage as “volunteers.” To be more specific, In wageofc,
replace wageofc with 0 for workers that earned strictly less than $3.35 an
hour. Note that we often find evidence of statutes not being followed in
datasets.
(e) How many observations are in this dataset?
(f) How many non-missing observations are in wageofc?
(g) Generate a variable called lnwageofc which is the natural logarithm of
wageofc.
(h) How many non-missing observations are in lnwageofc? Why does this
make sense?
2. In this exercise, you are asked to compute some simple summary statistics using
the binary variable collgrad, contained in the dataset.
(a) Use thecommandtabulate to showthecategoriesof thevariablecollgrad
and their frequencies. What is the relative frequency of the category col-
lege grad? Please report a number between 0 and 1.
(b) Use the same command, this time specifying the option nolabel, to vi-
sualize the numeric values corresponding to the different categories of
collgrad. Which numeric value corresponds to the label college grad?
(c) Use the command summarize to compute the sample mean of collgrad.
After executing summarize, Stata stores temporarily the sample mean in
the object r(mean). To see this, generate a scalar variable collgrad mean
equal to r(mean), by typing scalar collgrad mean = r(mean) in the
line just after the command summarize. Finally, display the variable value
by typing display collgrad mean, and verify that the value displayed is
the same as the one returned by the command summarize. What is the
sample mean of collgrad? What is its relation to your answer in 2(a)?
2
(d) Repeat the stepsof2(c), this timetocreatea scalarvariable, collgrad var,
containing the sample variance of collgrad. What is the sample variance
of collgrad?
(e) Compute the sample variance of collgrad without the summarize com-
mand, using only the variable collgrad mean. (Hint: you can think of
collgrad as drawn from a Bernoulli distribution with parameter p, where
p is the probability of having graduated from college. The (population)
variance of a Bernoulli is p(1−p). What is the relation between p and the
sample mean collgrad_mean? Finally, remember that the sample vari-
ance can be obtained starting from the formula of the population variance
by replacing the population mean with the sample mean.)
3. The following problems provide more practice using conditional statements to
tabulate and summarize variables.
(a) How many unmarried people in the dataset were married before? (Hint:
use the variables, married and never married.)
(b) What is the difference in average hours worked for married and unmar-
ried workers? Please report a positive number. (Hint: use the variables
married and hours.)
(c) What is the average hours worked for married college graduates with
strictlymore than10yearsof experience? (Hint: use thevariablesmarried,
collgrad, ttl_exp, and hours.)
(d) What fraction of laborers or craftsman that live in urban areas are black?
Please reportanumberbetween0and1. (Hint: use thevariablesoccupation
= 8 and 5, urban, and race.)
(e) Using the variable wageofc, what fraction of workers that earn strictly
more than $7 an hour are in a union? Please report a number between 0
and 1. (Be careful about missing values.)
(f) Using the variable lnwageofc, what fraction of workers that earn strictly
more than $7 an hour are in a union? Please report a number between 0
and 1. (That is, you should compare the variable, lnwageofc, to ln7. Be
even more careful about missing values.)
4. This exercise refers to the following model:
wagei = β0 + β1gradei + ui,
3
where the wage of individual i is regressed on his/her highest grade completed
and a constant term. You are asked to compute the intercept and slope esti-
mates in a variety of ways, and compare your results in each case. First, use
the command
keep if !missing(wage, grade)
to drop people with missing wage or grade from the dataset. How many ob-
servations were dropped?
(a) Use the regress command to estimate the OLS coeffi cients β̂0 and β̂1.
What is the value of β̂0? What is the value of β̂1? (Hint: type regress
wage grade, the constant term will be added automatically to the regres-
sion.)
(b) You are now asked to compute the same estimates using the formulas we
derived in the lecture. Adopt the following procedure:
• Compute the sample covariance between wage and grade, and the
sample variance of grade, and save them in two scalars, cov wg and
var g. (Hint: you can compute the variance-covariance matrix us-
ing the corr command, with the option covariance. For instance, if
you type corr wage grade, covariance, the output will be a ma-
trix containing the variance of wage, the variance of grade and the
covariance between wage and grade; the three values will be stored in
r(Var 1), r(Var 2) and r(cov 12), respectively. You can check the
list of stored objects by typing return list just after running the
corr command.)
• Generate the scalar beta 1 equal to cov wg/var g and display it by
typing display beta 1. What is the relation between this estimate
for β1 and the one in 4(a)?
• Create two scalars, grade mean and wage mean, equal to the sample
means of grade and wage.
• compute your estimate for β0 by typing scalar beta 0 = wage mean
- beta 1 * grade mean, and then display beta 0. What is the re-
lation between this estimate for β0 and the one in 4(a)?
(c) Finally, you can compute β̂1 using a “centered”regression. For this part,
Adopt the following procedure:
• Define a new variable, wage 0 as wage - wage mean, so that this new
variable has a sample mean of 0. Similarly, define grade 0 as grade
- grade mean. This is called “demeaning”or “centering”a variable.
• Regress the centered variable, wage 0, on the other centered variable,
grade 0. What are the intercept and slope estimates in this new
regression?
4
CATEGORIES
Economics
Nursing
Applied Sciences
Psychology
Science
Management
Computer Science
Human Resource Management
Accounting
Information Systems
English
Anatomy
Operations Management
Sociology
Literature
Education
Business & Finance
Marketing
Engineering
Statistics
Biology
Political Science
Reading
History
Financial markets
Philosophy
Mathematics
Law
Criminal
Architecture and Design
Government
Social Science
World history
Chemistry
Humanities
Business Finance
Writing
Programming
Telecommunications Engineering
Geography
Physics
Spanish
ach
e. Embedded Entrepreneurship
f. Three Social Entrepreneurship Models
g. Social-Founder Identity
h. Micros-enterprise Development
Outcomes
Subset 2. Indigenous Entrepreneurship Approaches (Outside of Canada)
a. Indigenous Australian Entrepreneurs Exami
Calculus
(people influence of
others) processes that you perceived occurs in this specific Institution Select one of the forms of stratification highlighted (focus on inter the intersectionalities
of these three) to reflect and analyze the potential ways these (
American history
Pharmacology
Ancient history
. Also
Numerical analysis
Environmental science
Electrical Engineering
Precalculus
Physiology
Civil Engineering
Electronic Engineering
ness Horizons
Algebra
Geology
Physical chemistry
nt
When considering both O
lassrooms
Civil
Probability
ions
Identify a specific consumer product that you or your family have used for quite some time. This might be a branded smartphone (if you have used several versions over the years)
or the court to consider in its deliberations. Locard’s exchange principle argues that during the commission of a crime
Chemical Engineering
Ecology
aragraphs (meaning 25 sentences or more). Your assignment may be more than 5 paragraphs but not less.
INSTRUCTIONS:
To access the FNU Online Library for journals and articles you can go the FNU library link here:
https://www.fnu.edu/library/
In order to
n that draws upon the theoretical reading to explain and contextualize the design choices. Be sure to directly quote or paraphrase the reading
ce to the vaccine. Your campaign must educate and inform the audience on the benefits but also create for safe and open dialogue. A key metric of your campaign will be the direct increase in numbers.
Key outcomes: The approach that you take must be clear
Mechanical Engineering
Organic chemistry
Geometry
nment
Topic
You will need to pick one topic for your project (5 pts)
Literature search
You will need to perform a literature search for your topic
Geophysics
you been involved with a company doing a redesign of business processes
Communication on Customer Relations. Discuss how two-way communication on social media channels impacts businesses both positively and negatively. Provide any personal examples from your experience
od pressure and hypertension via a community-wide intervention that targets the problem across the lifespan (i.e. includes all ages).
Develop a community-wide intervention to reduce elevated blood pressure and hypertension in the State of Alabama that in
in body of the report
Conclusions
References (8 References Minimum)
*** Words count = 2000 words.
*** In-Text Citations and References using Harvard style.
*** In Task section I’ve chose (Economic issues in overseas contracting)"
Electromagnetism
w or quality improvement; it was just all part of good nursing care. The goal for quality improvement is to monitor patient outcomes using statistics for comparison to standards of care for different diseases
e a 1 to 2 slide Microsoft PowerPoint presentation on the different models of case management. Include speaker notes... .....Describe three different models of case management.
visual representations of information. They can include numbers
SSAY
ame workbook for all 3 milestones. You do not need to download a new copy for Milestones 2 or 3. When you submit Milestone 3
pages):
Provide a description of an existing intervention in Canada
making the appropriate buying decisions in an ethical and professional manner.
Topic: Purchasing and Technology
You read about blockchain ledger technology. Now do some additional research out on the Internet and share your URL with the rest of the class
be aware of which features their competitors are opting to include so the product development teams can design similar or enhanced features to attract more of the market. The more unique
low (The Top Health Industry Trends to Watch in 2015) to assist you with this discussion.
https://youtu.be/fRym_jyuBc0
Next year the $2.8 trillion U.S. healthcare industry will finally begin to look and feel more like the rest of the business wo
evidence-based primary care curriculum. Throughout your nurse practitioner program
Vignette
Understanding Gender Fluidity
Providing Inclusive Quality Care
Affirming Clinical Encounters
Conclusion
References
Nurse Practitioner Knowledge
Mechanics
and word limit is unit as a guide only.
The assessment may be re-attempted on two further occasions (maximum three attempts in total). All assessments must be resubmitted 3 days within receiving your unsatisfactory grade. You must clearly indicate “Re-su
Trigonometry
Article writing
Other
5. June 29
After the components sending to the manufacturing house
1. In 1972 the Furman v. Georgia case resulted in a decision that would put action into motion. Furman was originally sentenced to death because of a murder he committed in Georgia but the court debated whether or not this was a violation of his 8th amend
One of the first conflicts that would need to be investigated would be whether the human service professional followed the responsibility to client ethical standard. While developing a relationship with client it is important to clarify that if danger or
Ethical behavior is a critical topic in the workplace because the impact of it can make or break a business
No matter which type of health care organization
With a direct sale
During the pandemic
Computers are being used to monitor the spread of outbreaks in different areas of the world and with this record
3. Furman v. Georgia is a U.S Supreme Court case that resolves around the Eighth Amendments ban on cruel and unsual punishment in death penalty cases. The Furman v. Georgia case was based on Furman being convicted of murder in Georgia. Furman was caught i
One major ethical conflict that may arise in my investigation is the Responsibility to Client in both Standard 3 and Standard 4 of the Ethical Standards for Human Service Professionals (2015). Making sure we do not disclose information without consent ev
4. Identify two examples of real world problems that you have observed in your personal
Summary & Evaluation: Reference & 188. Academic Search Ultimate
Ethics
We can mention at least one example of how the violation of ethical standards can be prevented. Many organizations promote ethical self-regulation by creating moral codes to help direct their business activities
*DDB is used for the first three years
For example
The inbound logistics for William Instrument refer to purchase components from various electronic firms. During the purchase process William need to consider the quality and price of the components. In this case
4. A U.S. Supreme Court case known as Furman v. Georgia (1972) is a landmark case that involved Eighth Amendment’s ban of unusual and cruel punishment in death penalty cases (Furman v. Georgia (1972)
With covid coming into place
In my opinion
with
Not necessarily all home buyers are the same! When you choose to work with we buy ugly houses Baltimore & nationwide USA
The ability to view ourselves from an unbiased perspective allows us to critically assess our personal strengths and weaknesses. This is an important step in the process of finding the right resources for our personal learning style. Ego and pride can be
· By Day 1 of this week
While you must form your answers to the questions below from our assigned reading material
CliftonLarsonAllen LLP (2013)
5 The family dynamic is awkward at first since the most outgoing and straight forward person in the family in Linda
Urien
The most important benefit of my statistical analysis would be the accuracy with which I interpret the data. The greatest obstacle
From a similar but larger point of view
4 In order to get the entire family to come back for another session I would suggest coming in on a day the restaurant is not open
When seeking to identify a patient’s health condition
After viewing the you tube videos on prayer
Your paper must be at least two pages in length (not counting the title and reference pages)
The word assimilate is negative to me. I believe everyone should learn about a country that they are going to live in. It doesnt mean that they have to believe that everything in America is better than where they came from. It means that they care enough
Data collection
Single Subject Chris is a social worker in a geriatric case management program located in a midsize Northeastern town. She has an MSW and is part of a team of case managers that likes to continuously improve on its practice. The team is currently using an
I would start off with Linda on repeating her options for the child and going over what she is feeling with each option. I would want to find out what she is afraid of. I would avoid asking her any “why” questions because I want her to be in the here an
Summarize the advantages and disadvantages of using an Internet site as means of collecting data for psychological research (Comp 2.1) 25.0\% Summarization of the advantages and disadvantages of using an Internet site as means of collecting data for psych
Identify the type of research used in a chosen study
Compose a 1
Optics
effect relationship becomes more difficult—as the researcher cannot enact total control of another person even in an experimental environment. Social workers serve clients in highly complex real-world environments. Clients often implement recommended inte
I think knowing more about you will allow you to be able to choose the right resources
Be 4 pages in length
soft MB-920 dumps review and documentation and high-quality listing pdf MB-920 braindumps also recommended and approved by Microsoft experts. The practical test
g
One thing you will need to do in college is learn how to find and use references. References support your ideas. College-level work must be supported by research. You are expected to do that for this paper. You will research
Elaborate on any potential confounds or ethical concerns while participating in the psychological study 20.0\% Elaboration on any potential confounds or ethical concerns while participating in the psychological study is missing. Elaboration on any potenti
3 The first thing I would do in the family’s first session is develop a genogram of the family to get an idea of all the individuals who play a major role in Linda’s life. After establishing where each member is in relation to the family
A Health in All Policies approach
Note: The requirements outlined below correspond to the grading criteria in the scoring guide. At a minimum
Chen
Read Connecting Communities and Complexity: A Case Study in Creating the Conditions for Transformational Change
Read Reflections on Cultural Humility
Read A Basic Guide to ABCD Community Organizing
Use the bolded black section and sub-section titles below to organize your paper. For each section
Losinski forwarded the article on a priority basis to Mary Scott
Losinksi wanted details on use of the ED at CGH. He asked the administrative resident