Assignment 4‘Your name and ID hereFall 2022InstructionsPlease read each question and answer where appropriate. The assignment is graded on a scale from 1 to 5. | grade effort as well as...

1 answer below »
please answer the assignment


Assignment 4 ‘Your name and ID here Fall 2022 Instructions Please read each question and answer where appropriate. The assignment is graded on a scale from 1 to 5. | grade effort as well as content. That means to obtain a 5, every question must be attempted, and | am a kind grader if the effort was high, but the result was not quite right. After you answer the questions, knit the document to HTML and submit on eclass | will only grade HTML. If you submit the md file instead, you will receive a zero. You have been warned, so there will be no exceptions. Groups of up to four are allowed, but every student must submit their own assignment. If an interpretation of output is asked for, but only output or code is given, the question will get zero points Question 1: polynomails and interactions This question uses the Wooldridge data set wage! . | have loaded it below to a data frame called waget . The purpose of ths question is to get used to interpreting coefficients with different functional form assumptions. wage! <- wooldridge:wage1="" %="">% filter(complete.cases() Consider the generic regression: 2 Y= Bot Bix + Boxy + Pao + Pas + slip Xo) + U Here, the variable x, is entered into the regression twice — once as a ‘main’ effect and once as a squared term. Consider the partial effect of increasing x, by 1 unit. By+ Boxy This says that the marginal impact on y from a one unit increase in x, is not a constant, but a function. The impact depends on the value of x;. For example, suppose that fy is positive and , is negative. This means that the relationship between y and x, exhibits decreasing marginal returns. » Thats, when x, increases from 0 to 1, the * is higher than going from 20 3 and so on. If we graph this, it would look like an inverted ‘U'. For example, it might look like: fig.data <- data="" frame(x="1:10)" %="">% mutate(y = 100 +20 * x - 1.542) ggplotifig data, aesly =y, x = X)) + geom_line) + labs(ttle = “Typical diminishing marginal returms profile’) Typical diminishing marginal returns profile 160+ 150+ = 140 130- 120- 2s 50 7s 160 x ¥ We can find the the point at which x_1 turns from positive to negative (the inflection point) but setting * = 0 and solving for x;. This yields The variables x, and x; also appear twice; each as an main effect and then as an interaction. Consider the partial effect of x, on y yy a. Ee Bye fie Again, this says that the impact of x, on ys not a constant. It allows the impact to depend on the value of x. The treatment of xy is symmetric. We most often use these types of interactions when one term is a dummy variable. Suppose x, only takes on two values, 1 and 0. Then yy yy 3 3 2 _ p+ fs when x, = 1 and 2 = , when x; = 0 Since dummy variables denote groups (ie, 2 groups), this allows each group to have its own intercept (B,) and slope. Graphically, it looks like: gaplot(wage1 %>% fiter(educs5), aes(y = wage, x = educ, color = factor(west))) + ‘geom_smooth(method = Im’, se = F) ##°geom_smooth()® using formula’y ~ x' 25- 20- ” factor(west) g —o = 45- = 10+ educ Where each line is a regression of log wages on education, with an interaction for living in the west. The return education for workers in the western United States in this data is higher than the return for those in the rest of the country. In R, we can create variables “on the fly" to use in regressions. We use this mostly to create interaction terms and low order polynomial terms. Consider the following code that would estimate the following equation 2 Y= Bot Bix + Boxy + Pao + Pas + Psp Xs) + U Inthe code below, each regression is exactly the same, just different ways of expressing it: mod <-im(y ~="" x_1="" +="" 1(x_1"2)="" +x="" 2"="" x_3,="" data="data" frame)="" mod=""><- im(y="" ~="" poly(x1,2,="" raw="T)" +x="" 2"="" x_3,="" data="data" frame)="" mod=""><-im(y ~="" x_1="" +=""><_1%2) +="" x_2="" +x_3="" +="" x_2x_3,="" data="data" frame)="" mod=""><-im(y ~="" x_1="" +="" i(x_1%2)="" +x="" 2="" +x_3="" +="" iix_2'_3),="" data="data" frame)="" the="" term="" 1)="" is="" an="" “insulator="" function’.="" it="" tells="" r="" to="" evaluate="" the="" expression="" inside="" first,="" then="" run="" the="" regression.="" the="" notation="" for="" x="" 2'x="" 3="" says="" to="" include="" main="" effects="" for="" each="" variable,="" plus="" and="" interaction.="" the="" notation="" x="" 2x="" 3="" just="" includes="" an="" interaction.="" finally,="" poly()="" constructs="" low="" order="" polynomials.="" the="" raw="T" option="" is="" important.="" wage!=""><- wooldridge:wage1="" %="">% filter(complete.cases()) models <- list(="" im(iwage="" ~="" educ="" +="" exper="" +="" iiexper"2)="" +="" nonwhite="" +="" female="" ,="" data="wage1)," im(iwage="" ~="" educ*female="" +="" exper="" +="" i(exper"2)="" +="" nonwhite="" ,="" data="wage1)" )="" #table="" modelsummary(models,="" fmt="5," statistios_overtide="sandwich," stars="T," gof_omit="[" r2iad].="" r2")="" %="">% kable_classic_2() Model 1 Model 2 (intercept) 039540" 0.39384" (0.10322) (0.12419) educ 0.08391" 0.08403" (0.00699) (0.00882) exper 0.03895" 0.03895" (0.00483) (0.00484) Ilexper'2) 0.00069" 0.00069" (0.00011) (0.00011) nonwhite 002131 -0.02122 (0.05970) (0.05989) female 0.33742" -0.33359+ (0.03636) (0.17298) educ x female 0.00031 (0.01352) R2 0400 0.400 R2 Adj. 0.394 0.393 3p<><005><001,><0001 1.="" in="" the="" first="" column,="" interpret="" the="" return="" to="" experience="" (="" exper).="" after="" how="" many="" years="" of="" experience="" does="" the="" relationship="" tum="" negative?="" answer="" here="" 2.="" in="" column="" two,="" what="" is="" the="" return="" to="" education="" for="" men="" and="" women.="" are="" the="" returns="" to="" education="" significantly="" different="" for="" men="" and="" women?="" answer="" here="" question="" 2:="" teaching="" evaluations="" many="" college="" courses="" conclude="" by="" giving="" students="" the="" opportunity="" to="" evaluate="" the="" course="" and="" the="" instructor="" anonymously.="" however,="" the="" use="" of="" these="" student="" evaluations="" as="" an="" indicator="" of="" course="" quality="" and="" teaching="" effectiveness="" is="" often="" criticized="" because="" these="" measures="" may="" reflect="" the="" influence="" of="" non-teaching="" related="" characteristics,="" such="" as="" the="" physical="" appearance="" of="" the="" instructor.="" the="" article="" tiled,="" “beauty="" in="" the="" classroom:="" instructors’="" pulchritude="" and="" putative="" pedagogical="" productivity”="" (hamermesh="" and="" parker,="" 2005)="" found="" that="" instructors="" who="" are="" viewed="" to="" be="" better="" looking="" receive="" higher="" instructional="" ratings.="" daniel="" s.="" hamermesh,="" amy="" parker,="" beauty="" in="" the="" classroom:="" instructors="" pulchritude="" and="" putative="" pedagogical="" productivity,="" economics="" of="" education="" review,="" volume="" 24,="" issue="" 4,="" august="" 2005,="" pages="" 369-="" 376,="" issn="" 0272-7757,="" 10.1016/j.econedurev.2004.07.013.="" paper="" link="" -="" not="" required="" to="" read="" data("teachingratings")="" #="" load="" ratings="" data="" df=""><- teachingratings="" #="" re-name="" as="" df="" for="" convenience="" 1.="" the="" data="" set="" df="" constructed="" in="" the="" above="" code="" chunk="" contains="" different="" types="" of="" variables.="" use="" the="" command="" str()="" or="" glimpse()="" on="" the="" data="" frame="" df="" to="" answer="" below:="" a.="" what="" type="" of="" variable="" is="" credits="" what="" fraction="" of="" the="" data="" are="" single="" credit="" courses?="" what="" type="" of="" variable="" is="" alstudents="" what="" is="" the="" largest="" class="" in="" the="" data="" set?="" c.="" construct="" a="" variable="" called="" frac="" that="" is="" the="" proportion="" of="" students="" in="" the="" class="" that="" filed="" out="" the="" evaluation.="" what="" is="" the="" average="" participation="" rate?="" answer="" here="" 2.="" you="" can="" see="" the="" variable="" definitions="" by="" typing="" *?teachingratings”="" in="" the="" console.="" suppose="" we="" are="" interested="" in="" estimating="" a="" causal="" effect="" of="" beauty="" on="" eval="" .="" that="" is,="" eval="" +="" bubeauty+="" using="" the="" strategy="" discussed="" in="" class="" and="" in="" chapter="" 7.6,="" construct="" a="" regression="" table="" evaluating="" the="" causal="" effect="" of="" beauty="" on="" teaching="" evaluations.="" your="" regression="" table="" should="" consider="" several="" specifications,="" starting="" with="" the="" bivariate="" regression="" above="" and="" then="" adding="" more="" controls,="" possibly="" in="" groups.="" for="" each="" specification,="" state="" why="" you="" think="" its="" important="" to="" include="" for="" the="" controls="" you="" add.="" your="" answer="" should="" relate="" to="" the="" cia="" assumption.="" interpret="" your="" results,="" do="" you="" think="" that="" beauty="" has="" a="" causal="" impact="" on="" evaluations.="" if="" yes,="" defend="" your="" answer.="" if="" not,="" state="" why="" not.="" answer="" here="" #="" regression="" table="" here="" 3.="" run="" a="" regression="" of="" eval="" on="" beauty,="" gender,="" minority="" ,="" credits,="" division,="" tenure="" ,="" native="" .="" consider="" my="" data:="" |="" am="" male,="" non-minority,="" native="" english="" speaker,="" teaching="" muliple="" credit="" courses="" in="" an="" upper-division="" and="" |="" have="" tenure.="" while="" |="" don't="" have="" a="" beauty="" rating,="" according="" to="" ratelyprofessor.com,="" |="" have="" an="" evaluation="" of="" 2.3.="" use="" your="" regression="" and="" my="" information="" to="" infer="" my="" what="" my="" beauty="" rating="" would="" be="" if="" |="" were="" in="" this="" data="" set.="" answer="" here="" #="" regression="" here="" 4.="" in="" your="" regression="" you="" ran="" in="" part="" (3),="" the="" coefficient="" on="" gender="" shows="" that="" women="" have="" on="" average,="" after="" controlling="" for="" other="" characteristics,="" lower="" evaluations="" than="" men.="" this="" has="" lead="" to="" additional="" research="" on="" the="" topic="" —="" evaluations="" are="" important="" for="" promotion="" and="" tenure="" decisions.="" add="" an="" interaction="" term="" between="" beauty="" and="" gender="" .="" interpret="" your="" results:="" is="" the="" marginal="" impact="" of="" beauty="" the="" same="" for="" men="" and="" women?="" are="" good-looking="" men="" treated="" differently="" from="" good-looking="" women="" by="" students="" in="" terms="" of="" their="" evaluations?="" can="" we="" reject="" that="" the="" return="" to="" beauty="" for="" women,="" in="" terms="" of="" evaluations,="" is="" zero?="" answer="" here="" #="" regression="" here="" 5.="" using="" the="" same="" controls="" in="" part="" (3),="" test="" that="" the="" return="" to="" beauty="" depends="" on="" the="" level="" of="" beauty.="" what="" do="" you="" find?="" answer="" here="" #="" regression="" here="" 6.="" using="" your="" regression="" in="" part="" (5),="" allow="" the="" beauty="" profile="" to="" depend="" on="" gender.="" can="" you="" reject="" that="" men="" and="" women="" have="" the="" same="" beauty="" profile?="" using="" the="" margins="" command="" to="" estimate="" the="" effect="" of="" moving="" from="" the="" 25th="" percentile="" to="" the="" 75th="" percentile="" for="" men="" and="" women.="" what="" do="" you="" find?="" answer="" here="" #="" regression="" here="" question="" 3:="" birth="" weight="" smoking="" during="" pregnancy="" has="" been="" shown="" to="" have="" significant="" adverse="" health="" effects="" for="" new="" born="" babies.="" smoking="" is="" thought="" to="" be="" a="" preventable="" cause="" of="" low="" birth="" weight="" of="" infants="" who="" in="" turn,="" need="" more="" resources="" at="" delivery="" and="" are="" more="" likely="" to="" have="" related="" health="" problems="" in="" infancy="" and="" beyond.="" despite="" these="" concerns,="" many="" women="" still="" smoke="" during="" pregnancy.="" in="" this="" section,="" we="" analyze="" the="" relationship="" between="" birth="" weight="" and="" smoking="" behavior,="" with="" the="" emphasis="" on="" identifying="" a="" causalimpact="" of="" smoking="" on="" the="" birth="" weight="" of="" newborns.="" the="" relationship="" we="" examine="" is:="" log(birth="" weight);="f+" bysmoking,+="" n;="" where="" smoking;="" will="" be="" measured="" by="" average="" cigarettes="" per="" day.="" the="" term="" 7="" captures="" all="" of="" the="" other="" things="" that="" determine="" birth="" weight="" aside="" from="" smoking.="" baseline="" analysis.="" investigate="" the="" birth="" weight-smoking="" relationship="" and="" present="" your="" results="" in="" a="" table="" format.="" your="" investigation="" should="" be="" structured="" around="" the="" discussion="" of="" section="" 7.6.="" for="" control="" variables,="" choose="" the="" ones="" you="" see="" fit="" and="" explain="" why="" you="" choose="" them.="" your="" explanation="" should="" be="" centered="" on="" our="" class="" discussion="" of="" the="" conditional="" independence="" assumption.="" you="" can="" see="" the="" help="" file="" for="" the="" data="" set="" by="" typing="" bwght="" in="" the="" console.="" remember,="" good="" controls="" are="" related="" to="" the="" treatment="" or="" target="" variable="" of="" interest="" and="" not="" affected="" by="" the="" treatment="" itseft="" #loading="" birth="" weight="" data="" from="" the="" package="" wooldr="" bw=""><- wooldridge: bwght robustness of your results investigate any potentially non-linearity of your results. first, test whether the relationship between smoking and birth weight is linear by including a polynomial in cigarettes per day. second, examine whether the impact of smoking is the same for girls and boys. your results should be presented in a table format and structured along the lines of the discussion in chapter 8.4 of the text. the average number of cigarettes smoked per day for smokers is about 14. using the margins command, estimate the impact of reducing this by half and compare this effect to quitting al together. # regressions here assessing your results estimating the causal relationship between birth weight and smoking is made difficult by the fact that smoking might be correlated with other behaviors that are harmful to newborn outcomes. in other words, there are threats to internal validity. there are various types of threats to intemal validity. for each one i list below, explain how this might affect the interpretation of your results above and whether or not you can address the concern: 1. omitted variables bias. explain how this would affect the interpretation of the estimated coefficient on smoking. given an example of potential omitted variable you would control for if it were available in the data. 2. model misspecification. for example, the relationship between birth weight and smoking is not linear. should we be worried about this in this particular case? 3. measurement error or errors-in-variables: if mothers in the survey did not accurately report their smoking behavior, how would this affect the interpretation of your results? should we be worried about this in this particular case? 4. simultaneous causality. external validity. your analysis above provides some evidence on the relationship between birth weight and smoking behavior, but no one study is perfect. in this case, there are two looming concerns: (1) omitted variables bias and (2) whether the results are generalizable. in the first case, there are usually additional things we'd like to control for but can't because of data limitations. in the second case, we worry that our results might depend on a particular sample. for these reasons, itis a good idea to examine other possible wooldridge:="" bwght="" robustness="" of="" your="" results="" investigate="" any="" potentially="" non-linearity="" of="" your="" results.="" first,="" test="" whether="" the="" relationship="" between="" smoking="" and="" birth="" weight="" is="" linear="" by="" including="" a="" polynomial="" in="" cigarettes="" per="" day.="" second,="" examine="" whether="" the="" impact="" of="" smoking="" is="" the="" same="" for="" girls="" and="" boys.="" your="" results="" should="" be="" presented="" in="" a="" table="" format="" and="" structured="" along="" the="" lines="" of="" the="" discussion="" in="" chapter="" 8.4="" of="" the="" text.="" the="" average="" number="" of="" cigarettes="" smoked="" per="" day="" for="" smokers="" is="" about="" 14.="" using="" the="" margins="" command,="" estimate="" the="" impact="" of="" reducing="" this="" by="" half="" and="" compare="" this="" effect="" to="" quitting="" al="" together.="" #="" regressions="" here="" assessing="" your="" results="" estimating="" the="" causal="" relationship="" between="" birth="" weight="" and="" smoking="" is="" made="" difficult="" by="" the="" fact="" that="" smoking="" might="" be="" correlated="" with="" other="" behaviors="" that="" are="" harmful="" to="" newborn="" outcomes.="" in="" other="" words,="" there="" are="" threats="" to="" internal="" validity.="" there="" are="" various="" types="" of="" threats="" to="" intemal="" validity.="" for="" each="" one="" i="" list="" below,="" explain="" how="" this="" might="" affect="" the="" interpretation="" of="" your="" results="" above="" and="" whether="" or="" not="" you="" can="" address="" the="" concern:="" 1.="" omitted="" variables="" bias.="" explain="" how="" this="" would="" affect="" the="" interpretation="" of="" the="" estimated="" coefficient="" on="" smoking.="" given="" an="" example="" of="" potential="" omitted="" variable="" you="" would="" control="" for="" if="" it="" were="" available="" in="" the="" data.="" 2.="" model="" misspecification.="" for="" example,="" the="" relationship="" between="" birth="" weight="" and="" smoking="" is="" not="" linear.="" should="" we="" be="" worried="" about="" this="" in="" this="" particular="" case?="" 3.="" measurement="" error="" or="" errors-in-variables:="" if="" mothers="" in="" the="" survey="" did="" not="" accurately="" report="" their="" smoking="" behavior,="" how="" would="" this="" affect="" the="" interpretation="" of="" your="" results?="" should="" we="" be="" worried="" about="" this="" in="" this="" particular="" case?="" 4.="" simultaneous="" causality.="" external="" validity.="" your="" analysis="" above="" provides="" some="" evidence="" on="" the="" relationship="" between="" birth="" weight="" and="" smoking="" behavior,="" but="" no="" one="" study="" is="" perfect.="" in="" this="" case,="" there="" are="" two="" looming="" concerns:="" (1)="" omitted="" variables="" bias="" and="" (2)="" whether="" the="" results="" are="" generalizable.="" in="" the="" first="" case,="" there="" are="" usually="" additional="" things="" we'd="" like="" to="" control="" for="" but="" can't="" because="" of="" data="" limitations.="" in="" the="" second="" case,="" we="" worry="" that="" our="" results="" might="" depend="" on="" a="" particular="" sample.="" for="" these="" reasons,="" itis="" a="" good="" idea="" to="" examine="" other="">
Answered Same DayDec 07, 2022

Answer To: Assignment 4‘Your name and ID hereFall 2022InstructionsPlease read each question and answer...

Mohd answered on Dec 07 2022
36 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here