代写Assignment 6代做Statistics统计

Assignment 6


Due date:  25 March 2025, 23h59

Directives

You must submit your assignmemnt in a pdf file using RMarkdown .  Only submit the pdf file, NOT the RMarkdown file.  To submit your pdf file, use the following format FamilyName__StudentNo,for  example Nadeau__123456.pdf

To compile your pdf file, you can either knitr your file directly in pdf format.  However, if you encounter difficulties generating a pdf file directly, you can also knitr your file in word first, then save as a pdf file.

Question 1 - Interprovincial trade

The file provtrade.txt contains data for interprovincial and international trade for Canada as a whole and for each of its province/territory, for the years 2010 to 2021.  The data are in 000’s of dollars, ie you need to multiply the data by 1000 to get the actual number. For this question, ignore the line international re-exports.

a) For the years 2010 to 2021, calculate Canada’s average international trade balance (international exports - international imports).  Was Canada a net importer or a net exporter of goods and services, on average, during this period? (2pts)

Hint: you will most likely need the function as.numeric() to force R to treat the data as numbers! For example, if x is  a vector of data and you want to  calculate its average, you might need to do mean(as.numeric(x)) to do the calculations.

b) From  the  data,  you  should  have  noticed  that  when  considering  Canada  as  a  whole interprovincial exports and interprovincial imports are equal every year. Why, when considering Canada as a whole, is the interprovincial trade balance always equal to zero? (2pts)

c) Identify the provinces and territories that, on average over the period 2010-2021, were net international exporters and those that were net international importers. (13pts)

d) Identify the provinces and territories that, on average over the period 2010-2019, were net interprovincial exporters and those that were net interprovincial importers. (13pts)

For the following question, use the database provgdp.txt which contains the provincial and territorial GDP for the years 2019 to 2021.  The data are in millions of dollars, ie you need to multiply the data by 1,000,000 to obtain the actual number.

e) In the model of the Canadian federation seen in class, we modeled a region’s imports as a share μ of its GDP. For the year 2019 and 2021, calculate for each province and territory the ratio of interprovincial imports relative to the provincial/territorial GDP. Keep only 4 decimals. Which are the 4 most import intensive provinces/territories, as a % of their GDP in 2019 and 2021?.   Can you intuitively rationalize why?(15pts)

Question 2 - Model of interprovincial trade

Assume the following model of the Canadian federation, with AB representing Alberta, ON representing Ontario and QC representing Quebec.


reg_eqs <- sfcr_set( Y_AB ~ C_AB + G_AB + X_AB - M_AB, Y_ON ~ C_ON + G_ON + X_ON - M_ON, Y_QC ~ C_QC + G_QC + X_QC - M_QC, Y ~ Y_AB + Y_ON + Y_QC, M_AB_ON ~ mu_AB_ON * Y_AB, M_AB_QC ~ mu_AB_QC * Y_AB, M_AB ~ M_AB_ON + M_AB_QC, M_ON_AB ~ mu_ON_AB * Y_ON, M_ON_QC ~ mu_ON_QC * Y_ON, M_ON ~ M_ON_AB + M_ON_QC, M_QC_AB ~ mu_QC_AB * Y_QC, M_QC_ON ~ mu_QC_ON * Y_QC, M_QC ~ M_QC_ON + M_QC_AB, X_AB_ON ~ M_ON_AB, X_AB_QC ~ M_QC_AB, X_AB ~ X_AB_ON + X_AB_QC, X_ON_AB ~ M_AB_ON, X_ON_QC ~ M_QC_ON, X_ON ~ X_ON_AB + X_ON_QC, X_QC_AB ~ M_AB_QC, X_QC_ON ~ M_ON_QC, X_QC ~ X_QC_AB + X_QC_ON, YD_AB ~ Y_AB - TX_AB + r[-1] * Bh_AB[-1], YD_ON ~ Y_ON - TX_ON + r[-1] * Bh_ON[-1], YD_QC ~ Y_QC - TX_QC + r[-1] * Bh_QC[-1], TX_AB ~ theta * ( Y_AB + r[-1] * Bh_AB[-1] ), TX_ON ~ theta * ( Y_ON + r[-1] * Bh_ON[-1] ), TX_QC ~ theta * ( Y_QC + r[-1] * Bh_QC[-1] ), V_AB ~ V_AB[-1] + ( YD_AB - C_AB ), V_ON ~ V_ON[-1] + ( YD_ON - C_ON ), V_QC ~ V_QC[-1] + ( YD_QC - C_QC ), C_AB ~ alpha1_AB * YD_AB + alpha2_AB * V_AB[-1], C_ON ~ alpha1_ON * YD_ON + alpha2_ON * V_ON[-1], C_QC ~ alpha1_QC * YD_QC + alpha2_QC * V_QC[-1], Hh_AB ~ V_AB - Bh_AB, Hh_ON ~ V_ON - Bh_ON, Hh_QC ~ V_QC - Bh_QC, Bh_AB ~ V_AB * ( lambda0_AB + lambda1_AB * r - lambda2_AB * ( YD_AB/V_AB ) ), Bh_ON ~ V_ON * ( lambda0_ON + lambda1_ON * r - lambda2_ON * ( YD_ON/V_ON ) ), Bh_QC ~ V_QC * ( lambda0_QC + lambda1_QC * r - lambda2_QC * ( YD_QC/V_QC ) ), TX ~ TX_AB + TX_ON + TX_QC, G ~ G_AB + G_ON + G_QC, Bh ~ Bh_AB + Bh_ON + Bh_QC, Hh ~ Hh_AB + Hh_ON + Hh_QC, Bs ~ Bs[-1] + ( G + r[-1] * Bs[-1] ) - ( TX + r[-1] * Bcb[-1] ), Hs ~ Hs[-1] + Bcb - Bcb[-1], Bcb ~ Bs - Bh, redondant ~ Hs - Hh )

The calibration of the parameters and of the exogenous variables is as follow

reg_ext <- sfcr_set( r ~ 0.035, G_AB ~ 25, G_ON ~ 25, G_QC ~ 25, mu_AB_ON ~ 0.15, mu_AB_QC ~ 0.15, mu_ON_AB ~ 0.15, mu_ON_QC ~ 0.15, mu_QC_AB ~ 0.15, mu_QC_ON ~ 0.15, alpha1_AB ~ 0.8, alpha1_ON ~ 0.7, alpha1_QC ~ 0.6, alpha2_AB ~ 0.2, alpha2_ON ~ 0.3, alpha2_QC ~ 0.4, lambda0_AB ~ 0.67, lambda0_ON ~ 0.67, lambda0_QC ~ 0.67, lambda1_AB ~ 0.05, lambda1_ON ~ 0.05, lambda1_QC ~ 0.05, lambda2_AB ~ 0.01, lambda2_ON ~ 0.01, lambda2_QC ~ 0.01, theta ~ 0.25 )

Simulate the model for 200 périods, starting from zero. If you have done this right, you should find that at the initial steady state,

##  Y_AB  état  stationnaire  =  105 .6004

##  Y_ON  état  stationnaire  =  105 .6004

##  Y_QC  état  stationnaire  =  105 .6004

a) In the initial calibration, we have that α1(a)b  = 0.8, α2(ab) = 0.2,α1(o)n  = 0.7, α2(on) = 0.3 and α1(q)c  = 0.6, α2(qc) = 0.4.

Despite these  differences,  you  should find that  at the  initial  steady  state,  all  3 provinces  are perfectly identical/symmetrical.  How do you explain this? (2 pts)

Let us call µi(j)  the proposensity of province i to import from province j.

b) We now assume that µab(on) = 0.2, µab(qc) = 0.1, µon(ab) = µon(qc) = 0.15 and µqc(on) = 0.175, µqc(ab) = 0.125.  Find Yab , Yon

and Y qc  at the new steady state.  Use the functions sfcr_set() and sfcr_shock() with start = 3, end = 100, to simulate the shock. Which province(s) experience an increase in GDP? Which province(s) see its GDP  fall?  How do you explain this result?(2 pts)

c) At the new steady state, calculate the bi-lateral trade balance of each province against all the other provinces. Also calculate the aggregate provincial trade balance.  Report your results. (9 pts)

d) You should find in c) that at the new steady state, Québec has a trade surplus with Ontario.  How do you explain this finding, given that Quebec’s propensity to import from Ontario is higher than Ontario’s

propensity to import from Québec, ie µqc(on)  > µon(qc)?(2 pts)

e) At the new steady state, is the aggregate trade balance of Canada as a whole in equilibrium (ie = 0)? How do you explain this result?(2 pts)

f) At the new steady state, calculate the surplus/deficit of the Federal government in each province.  Do we observe «twin surplus/deficit» in each province?(5 pts)

g) Start again from the steady state obtained with the initial calibration of the model.  Assume now that

µab(on) = 0.1, µab(qc) = 0.2, µqc(on) = 0.2, µqc(ab) = 0.1, µon(ab) = 0.2 and µon(qc) = 0.1.  Find Yab , Yon  and Y qc  at the new

steady state. Use the functions sfcr_set() and sfcr_shock() with start = 3, end = 100, to simulate this shock. Which province(s) observe an increase in its GDP? Which province(s) see its GDP fall? Is this result different  from what you found in b)? If so, how do you explain this difference?(5 pts)

h) At the new steady state, calculate the bi-lateral trade balance of each province against all the other provinces.  Also calculate the aggregate provincial trade balance.  Report your results.  Are there provinces for which the aggregate trade balance is in surplus? In deficit? Is this result different from what you found in c)? If so, how do you explain this difference?(13 pts)


热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图