讲解:E471、Econometric Theory、R、RR|MatlabE471: Econometric Theory and Practice I Spring 2020Assignment 2Due: Thursday, February 27, 2020, 1:00 pmInstructions:• Please upload an electronic copy of your answers to Canvas combining all results inone pdf/word file. If there is any handwritten part, please scan it and include it withthe rest of the answers.• Please also upload your code to Canvas before the due time. The code accounts for50% of the points of the empirical questions.• You are allowed to collaborate in groups, but required to write up answers and codeindependently. Direct copying will be treated as cheating. Please write the names ofyour collaborators at the beginning of your work, if any.Questions:1. This question is a sequel to Question 1 in Assignment 1. Reall that you downloadedthe file Assignment1Data.csv, which contains three series: CITCRP, MARKET, andRKFREE with data from January 1978 to December 1987.Recall the regressionrc,i − rf,i = β0 + β1(rm,i − rf,i) + �i. (1)The capital asset pricing model (CAPM) suggests that β0 should be zero. Using the Rchunks from our lectures, extend your program to:(a) compute a p-value for the null hypothesis H0 : β0 = 0;(b) and to construct 90%, 95%, and 99% confidence intervals for β0 and β1.2. Suppose that E[U|X] = 0, E[X2] = µXX, and V[U|X] = σ2. We used the following tworesults in our derivations for the OLS estimator:(a) Show that E[UX] = 0.(b) Show that V[UX] = E[U2X2] = σ2µXX3. Consider the following regression modelYi = βXi + Ui, β = 1, E[X2i ] = 14, V(Ui|Xi) = 1and the sample size is n = 100. We are interested in testing the null hypothesis thatβ = βH versus the alternative that β 6= βH using a t-statistic of the formt = βˆ − βHσˆβˆ.(a) What is the correct critical value to guarantee that the hypothesis test has a type-Ierror of 5%?(b) Define the type-II error of a hypothesis test.(c) Suppose an econometrician tests the “false” hypothesis that β = βH = 1.2 (the“truth” is that β = 1). What is the type-II error associated with this test?(d) Repeat the calculation for βH = 1.6, βH = 1.8, and βH = 2.(e) What is the power of a test?(f) True or False: The t-test has less power against alternative hypotheseis that arefar away from the null hypothesis. Hint: use your previous results to answer thisquestion.Page 24. You are working for a life insurance company and are preparing for a briefing of theboard. Your economic intuition tells you that the best predictor of life insurance holdingsis income. You gather the relevant data (family life insurance and family income, bothin thousands of dollars) and want to analyze it, running a regressionlifeinsi = β0 + β1incomei + uiThe data set is provided in the file Assignment2Data.csv.(a) Estimate the above regression model. What is your point estimate for β1? What isthe interpretation of that estimate?(b) Provide a 95% confidence interval for the coefficient on income.(c) One of the managers suggests that the industry rule of thumb is that people buy fivedollars life insurance for each additional dollar of their income. Another managerdisagrees and says it could be more or less. You want to examine the difference ofopinion.What null and alternative hypotheses would you use here to discriminate betweenthese hypotheses? Test the hypothesis, using a 5% type I error and interpret theresults.(d) Calculate a p-value for the test in (c).(e) The company wants to offer life insurance to low income households. The chairmanasks you how much life insurance would a household with an income of 20,000dollars buy. Calcul代写E471留学生作业、代做Econometric Theory作业、代做R编程设计作业、代写R语言作业

代做R语言编程ate a point prediction.(f) Explain why it is better to consider an interval prediction rather than a pointprediction.(g) Calculate 90%, 95%, and 99% prediction intervals for the life insurance holding ofa family that earns 20,000 dollars.Page 35. The goal is to replicate Table 2 of Acemoglu, Johnson, and Robinson (AER, 2001). Youcan find the article athttp://www.aeaweb.org/articles.php?doi=10.1257/aer.91.5.1369and the data athttp://economics.mit.edu/faculty/acemoglu/data/ajr2001Download the zip file for the replication of Table 2, and extract the file maketable2.dtainto your work directory. The data set is provided in STATA format which can be readby R (see below).(a) Load the data using the following R chunk.wholeworld = foreign::read.dta(maketable2.dta)head(wholeworld)## shortnam africa lat_abst avexpr logpgp95 other asia## 1 AFG 0 0.3667 NA NA 0 1## 2 AGO 1 0.1367 5.364 7.771 0 0## 3 ARE 0 0.2667 7.182 9.804 0 1## 4 ARG 0 0.3778 6.386 9.133 0 0## 5 ARM 0 0.4444 NA 7.682 0 1## 6 AUS 0 0.3000 9.318 9.898 1 0## loghjypl baseco## 1 NA NA## 2 -3.4112 1## 3 NA NA## 4 -0.8723 1## 5 NA NA## 6 -0.1708 1(b) How many observations are in the “whole world” sample? What does “NA” mean?(c) What is the “base sample” considered in the paper? (you have to read the text,e.g., section II.A., to answer this question!) The following R chunk generates thebase sample:basesample = wholeworld[is.na(wholeworld[,9])==FALSE,]; # delete NAhead(basesample)## shortnam africa lat_abst avexpr logpgp95 other asia## 2 AGO 1 0.1367 5.364 7.771 0 0## 4 ARG 0 0.3778 6.386 9.133 0 0## 6 AUS 0 0.3000 9.318 9.898 1 0## 12 BFA 1 0.1444 4.455 6.846 0 0## 13 BGD 0 0.2667 5.136 6.877 0 1## 16 BHS 0 0.2683 7.500 9.285 0 0## loghjypl baseco## 2 -3.4112 1## 4 -0.8723 1## 6 -0.1708 1## 12 -3.5405 1## 13 -2.0636 1Page 4## 16 NA 1(d) For the whole world sample and the base sample generate a scatter plot of log percapita GDP (y-axis) versus expropriation risk (x-axis).(e) Here is some R chunk for the estimation of specification (1) in Table 2.olsspec1 summary(olsspec1)#### Call:## lm(formula = wholeworld$logpgp95 ~ wholeworld$avexpr)#### Residuals:## Min 1Q Median 3Q Max## -1.902 -0.316 0.138 0.422 1.441#### Coefficients:## Estimate Std. Error t value Pr(>|t|)## (Intercept) 4.6261 0.3006 15.4 ## wholeworld$avexpr 0.5319 0.0406 13.1 ## ---## Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1#### Residual standard error: 0.718 on 109 degrees of freedom## (52 observations deleted due to missingness)## Multiple R-squared: 0.611, Adjusted R-squared: 0.608## F-statistic: 171 on 1 and 109 DF, p-value: How many observations are used in this regression: fewer than in the whole worldsample? Why? Does the number of observations used in your estimation match thenumber of observations reported in the paper?(f) Now write a chunk of R code that estimates specification (2) in Table 2. Do youget the same point estimate? Do you get the same standard error estimate?(g) Follow lecture slides and compute White’s heteroskedasticity consistent standarderrors. Are they bigger or smaller than those under homoskedastic assumption?(h) Now replicate the estimation results for specifications (3) - (8). Report point estimates,standard error estimates, R2, and number of coefficients up to four significantdigits (the paper only reports two significant digits).Page 5转自:http://www.6daixie.com/contents/18/4934.html

rr分布 matlab,讲解:E471、Econometric Theory、R、RR|Matlab相关推荐

  1. matlab python对比_Python与R、Matlab的对比

    作为一枚程序员,想要研究Python编程语言与数学学习(教学)的结合,就不能不了解以及比对一下其他数学学习与应用的解决方案,比如R语言.Matlab等数学软件.经过广泛的搜索了解了一下国外的反馈与趋势 ...

  2. Julia与R/Python/MATLAB比较及Julia中的Text Analysis模块

    http://site.douban.com/146782/widget/notes/15468638/note/356127615/           上午等着R跑数,R是出了名的慢,特别是处理文 ...

  3. 台大郭彦甫教授Matlab讲解笔记(一)

    台大郭彦甫教授Matlab讲解笔记(一) Introduction 对于一个软件的学习,首先要认识它的界面,了解各个窗口.我用的是2015b版的MATLAB. 大致分为四个窗口. 当前文件夹:展示了电 ...

  4. 数据分析包的比较:R,Matlab,SciPy,Excel,SAS,SPSS,Stata

    数据分析包的比较:R,Matlab,SciPy,Excel,SAS,SPSS,Stata (2010-11-02 12:35:29) 标签: 数据分析 机器学习 it 分类: 数据挖掘 数据分析包的比 ...

  5. 创建一个Python脚本,实现以下功能。(1)定义一个元组t1=(1,2,R,py,Matlab‘)和一个空列表1ist1。(2)以while循环的方式,用append()函数依次向listl中

    创建一个Python脚本,实现以下功能. (1)定义一个元组t1=(1,2,R,py,Matlab')和一个空列表1ist1. (2)以while循环的方式,用append()函数依次向listl中添 ...

  6. 统计语言类教程:R语言贝叶斯统计学、Copula、SEM、极值统计学、混合效应模型、R\Python\matlab机器学习、科研数据可视化、线性回归、分位数回归、GAMS、meta分析、近红外光谱等.

    查看原文>>>统计语言类教程:贝叶斯统计学.Copula.SEM.极值统计学.混合效应模型.PyTorch深度学习.科研数据可视化 以下给大家整理了一些常用的统计学内容和python ...

  7. matlab电机外特性曲线,电机大作业(MATLAB仿真,电机特性曲线).doc

    电机大作业(MATLAB仿真,电机特性曲线).doc 电机电机大作业大作业 专业班级电气 XXXX 姓 名XXX 学 号XXX 指导老师张 威 一.研究课题(来源教材习题一.研究课题(来源教材习题 4 ...

  8. 静电场的有限差分法与matlab 仿真课程设计,计算物理和MATLAB课程设计--自激振动系统的MATLAB仿真.doc...

    东北石油大学课程设计任务书 课程 计算物理和MATLAB课程设计 题目 自激振动系统的MATLAB仿真 专业 姓名 学号 主要内容.基本要求.主要参考资料等 主要内容: 研究范?德?波耳(Van de ...

  9. matlab需要多大运存_提高matlab运行效率

    用过Matlab的人都知道,Matlab是一种解释性语言,存在计算速度慢的问题,为了提高程序的运行效率,matlab提供了多种实用工具及编码技巧. 1. 循环矢量化 Matlab是为矢量和矩阵操作而设 ...

最新文章

  1. 成功爬取-CVE-2018-15982漏洞复现【博客园】【1】
  2. [html] 实现一个页面锁屏的功能
  3. SQL高手请进来一下,谢谢
  4. [Unity] 播放 Generic Animation 导致无法移动的解决办法:在 Animator 中勾选 Apply Root Motion
  5. Python生成器对象send()方法用法
  6. 微信开发 调用摄像机拍照(录像)功能
  7. 【JSOI2007】【BZOJ1029】建筑抢修(贪心,堆)
  8. Python中使用random随机函数与Matplotlib库绘制随机漫步图
  9. 无人驾驶车辆模型预测控制配套代码_代码详解——最简NMPC路径跟踪仿真代码...
  10. paip.提升用户体验----自定义移位操作符重载
  11. java计算机毕业设计房产中介管理系统源码+系统+lw+数据库+调试运行
  12. java-xx参数介绍及调优总结
  13. 检查macOS中硬盘是否健康的小技巧
  14. (第六章)hive之查询
  15. 微信支付整理 (微信公众号支付)
  16. html移动端实现手写签名,signature手写签名实现,微信公众号浏览器html手写签名实现
  17. 南方科技大学2019计算机考研录取,2019浙江硕士研究生拟录取名单_南方科技大学...
  18. 迪杰斯特拉求最短路(dijkstra)
  19. 不会就要问,求大神解决一下安装linux不认内置硬盘的问题
  20. ForkJoinPool的理解与使用

热门文章

  1. 电源硬件设计----线性调压器与LDO
  2. 2分钟彻底搞懂“高内聚,低耦合”
  3. 酷盟集团旗下酷客SCRM亮相2020 CBME孕婴童展
  4. 如何阻止某款软件访问网络
  5. 一、MySQL数据库设置默认时区
  6. 【Windows 11】系统安装修改版 Subsystem for Android 安卓子系统,并用 Magisk Root
  7. 博友的 编写高质量代码 改善java程序的151个建议
  8. sfsdfsdffsdf
  9. FleaPHP 开发指南 - 5. 应用程序设置
  10. 访问weblogic控制台报错的问题处理