联系我们: 手动添加方式: 微信>添加朋友>企业微信联系人>13262280223 或者 QQ: 1483266981
这是一篇是选择一个主题并用R语言进行应用经济学数据分析的作业
ECON 4400 Project
选择一个话题
从一般领域或一系列问题开始
确保您对该主题感兴趣
使用Google Scholar或EconLit等在线服务调查有关此主题的过往工作
将您的主题缩小为要调查的特定问题
解决理论问题
选择数据
想要包含对您的理论模型所暗示的事物进行度量的数据很重要
调查在过去的文献中使用了什么类型的数据集
搜索其他可用数据集(例如,ICPSR)
考虑收集自己的数据
使用数据
尝试以可访问的格式从源下载数据。下载R数据格式(如果可用)。如果没有,则可以使用Excel,csv或任何定界文件并将其导入到R环境中。其他数据类型(例如Sata,SAS等)也可以导入R。请谨慎使用其他格式,并确保正确导入数据。
创建适合分析的变量。例如,根据分类变量创建虚拟变量,创建小时工资等。
您的数据集可能包含许多其他不需要的变量。最好创建一个新的数据框以保存感兴趣的变量的子集。使用仅包含所需变量的数据框会更容易。
检查数据中是否缺少值,错误,离群值等。
如果您有多个时间段的数据(一个面板),则可以在所需的特定日期获取该数据集的子集。您知道如何使用方括号[]对R中的数据进行子集化。
确保报告您做了什么
Estimating a Model
Start with a model that is based in your theory (Your baseline specification). This should include the variables of interest and main control variables.
Include other variables that are theoretically less clear, and test for their significance. (t-test for single variable and f-test for jointly testing multiple variables)
Check for functional form misspecification. (plots, R-squared, etc)
Consider reasonable forms: interactions, quadratics, logs, etc.
Don’t lose sight of your theory and the ceteris paribus interpretation – you need to be careful about including variables that greatly alter the interpretation. For example, effect of bedrooms on house price conditional on square footage
Once you have a well-specified model, need to worry about the standard errors
Check for heteroskedasticity (use graphs). There are other tests too. Always safe to use heteroscedasticity-robust tests.
R语言计量经济 | ECON 4400 Project


发表评论