Travis build status

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

emetricsrsw

Brief Summary of Econometrics

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.

What is 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:

Chapter 5 of Introduction to Econometrics discusses hypothesis testing and confidence intervals for single linear regression.

Installation

emetricsrsw is hosted on Github and can be installed by running the following:

devtools::install_github("danicamiguel/emetricsrsw")

Load

library(emetricsrsw)

Data

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.

Functionality

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)

Example: Dataset Summary Statistics

stata_sum(caschool)
include_graphics("man/figures/images/sum_caschool.png")

Summary of caschool dataset using STATA's sum command.

Example: Variable Summary Statistics

stata_sum_var(caschool$enrl_tot, caschool)
include_graphics("man/figures/images/sum_enrollment.png")

Summary of enrollment variable using STATA's sum command

Contributors



danicamiguel/emetricsrsw documentation built on Dec. 25, 2019, 5:12 a.m.