knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
Econometrics is the quantitative application of statistical methods used to evaluate theories and models in economics. Econometrics sits at the intersection of multiple regression and macroeconomic and microeconomic theory.
emetricsrsw
?The goal of the emetricsrsw
package is meant to serve as a companion to Chapter 5 of the textbook Introduction to Econometrics by James H. Stock and Mark W. Watson. Since this textbook was designed to assist learning in introductory econometrics courses taught at the undergraduate level, it’s expected that students will use the statistical analysis software, STATA, in order to complete the exercises and examples provided in the book. Unlike R, STATA is not a free, open-source platform - you must purchase an operating license in order to obtain the software.
However, let’s say that students taking this course do not have access to STATA when they need (i.e. if you’re off campus for the weekend, but have an assignment to complete that contains questions from this textbook).
This is where emetricsrsw
comes in handy. This package has two main goals:
Accessibility : Allow students who are familiar with STATA’s syntax and code, but have access to R to complete their statistical analysis as they would in STATA.
Enhanced Learning : This allows students who are using Stock and Watson’s econometrics textbook to enhance their learning experience by using R to complete exercises traditionally done only in STATA. This will be especially exciting for first-time R users!
Chapter 5 of Introduction to Econometrics discusses hypothesis testing and confidence intervals for single linear regression.
emetricsrsw
is hosted on Github and can be installed by running the following:
devtools::install_github("danicamiguel/emetricsrsw")
library(emetricsrsw)
The California Standardized Testing and Reporting dataset contains data on test performance, school characteristics and student demographic backgrounds. All of these data were obtained from the California Department of Education. For more information about this dataset see the Companion Website for Stock and Watson's Introduction to Econometrics.
The Birthweight_Smoking dataset contains data of infant births and dead in Pennsylvania in 1989. For more information about this dataset see the Companion Website for Stock and Watson's Introduction to Econometrics.
stata_sum
: provides summary statistics for all variables in a dataset
stata_sum_var
: provides summary statistics for a variable in a dataset chosen by user
stata_desc
: gives description of all variables in dataset, including variable classes (i.e. double, character, factor)
stata_list
: allows user to see all the observations of the dataset in a table
stata_list_2
: allows user to see a the first two rows of a given dataset
stata_list_10
: allows user to see a the first ten rows of a given dataset
stata_graph
: plots a scatterplot
stata_reg
: produces result summaries of a fitted model
stata_ci
: finds the confidence interval of a fitted linear model
stata_logit
: produces summary results of a fitted logistic model
library(knitr)
stata_sum(caschool)
include_graphics("man/figures/images/sum_caschool.png")
stata_sum_var(caschool$enrl_tot, caschool)
include_graphics("man/figures/images/sum_enrollment.png")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.