Question: Use the statistical software R/R-Studio. For each question, copy and paste your R codes (if used) and outputs from your R-studio console to MS word


Use the statistical software R/R-Studio. For each question, copy and paste your R codes (if used) and outputs from your R-studio console to MS word (or similar editing program). Show your work as much as possible by adding your annotation, if any. Please answer with information given do not comment not enough information please thanks.
lsalary = Bo + Byears + Bagamesyr + Bzhrunsyr + u. (A) (1) Click 'desc' in the Environment' tab for the variable description in the environment tab in R. Choose two more variables to explain the MLB players' salary (rather than baug and rbisyr in our previous class example) and add the variables to the model (A). Write down your new econometrics model (let's say model (B)). (2) Run the OLS regressions for the model (A) and your updated model (B). Use stargazer function to make a formal estimation result table to show the regression results for both models (A) and (B). variable 1 salary 2 teamsal 3 nl 4 years 5 games 6 atbats 7 runs 8 hits 9 doubles 10 triples 11 hruns 12 rbis 13 bavg label 1993 season salary team payroll =1 if national league years in major leagues career games played career at bats career runs scored career hits career doubles career triples career home runs career runs batted in career batting average career walks career strike outs career stolen bases career fielding perc = 1 if first base =1 if second base =1 if shortstop =1 if third base =1 if outfield =1 if catcher years as all-star = 1 if hispanic =1 if black white pop. in city 14 bb 15 SO 16 sbases 17 fldperc 27 whitepop 28 blackpop 29 hisppop 30 pcinc 31 gamesyr 32 hrunsyr 33 atbatsyr 34 allstar 35 slugavg 36 rbisyr 37 sbasesyr 38 runsyr 39 percwhte 40 percblck 41 perchisp 42 blckpb 43 hispph 44 whtepw 45 blckph 46 hisppb 47 Isalary white pop. in city black pop. in city hispanic pop. in city city per capita income games per year in league home runs per year at bats per year perc. of years an all-star career slugging average rbis per year stolen bases per year runs scored per year percent white in city percent black in city percent hispanic in city black*percblck hispan*perchisp white*percwhte black*perchisp hispan percblck log(salary) 18 frstbase 19 scndbase 20 shrtstop 21 thrdbase 22 outfield 23 catcher 24 yrsallst 25 hispan 26 black 27 whitepop lsalary = Bo + Byears + Bagamesyr + Bzhrunsyr + u. (A) (1) Click 'desc' in the Environment' tab for the variable description in the environment tab in R. Choose two more variables to explain the MLB players' salary (rather than baug and rbisyr in our previous class example) and add the variables to the model (A). Write down your new econometrics model (let's say model (B)). (2) Run the OLS regressions for the model (A) and your updated model (B). Use stargazer function to make a formal estimation result table to show the regression results for both models (A) and (B). variable 1 salary 2 teamsal 3 nl 4 years 5 games 6 atbats 7 runs 8 hits 9 doubles 10 triples 11 hruns 12 rbis 13 bavg label 1993 season salary team payroll =1 if national league years in major leagues career games played career at bats career runs scored career hits career doubles career triples career home runs career runs batted in career batting average career walks career strike outs career stolen bases career fielding perc = 1 if first base =1 if second base =1 if shortstop =1 if third base =1 if outfield =1 if catcher years as all-star = 1 if hispanic =1 if black white pop. in city 14 bb 15 SO 16 sbases 17 fldperc 27 whitepop 28 blackpop 29 hisppop 30 pcinc 31 gamesyr 32 hrunsyr 33 atbatsyr 34 allstar 35 slugavg 36 rbisyr 37 sbasesyr 38 runsyr 39 percwhte 40 percblck 41 perchisp 42 blckpb 43 hispph 44 whtepw 45 blckph 46 hisppb 47 Isalary white pop. in city black pop. in city hispanic pop. in city city per capita income games per year in league home runs per year at bats per year perc. of years an all-star career slugging average rbis per year stolen bases per year runs scored per year percent white in city percent black in city percent hispanic in city black*percblck hispan*perchisp white*percwhte black*perchisp hispan percblck log(salary) 18 frstbase 19 scndbase 20 shrtstop 21 thrdbase 22 outfield 23 catcher 24 yrsallst 25 hispan 26 black 27 whitepop
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
