Code Monkey home page Code Monkey logo

wooldridge's Introduction

CRAN_Status_Badge R build status AppVeyor Build Status status

wooldridge: 115 Data Sets for Econometrics

Economics students new to both Econometrics and R may find the introduction to both challenging. However, if their text is "Introductory Econometrics: A Modern Approach, 7e" by Jeffrey M. Wooldridge, they are in luck!

The wooldridge package aims to lighten the task by easily loading any data set from the text. The package contains full documentation for each set and all data have been compressed to a fraction of their original size. Just install the package, load it, and call the data you wish to work with.

But wait...there's more! A vignette, Introductory Econometrics Examples✨, illustrates solutions to examples from each chapter of the text, offering a relevant introduction to econometric modelling with R. The vignette also includes an Appendix of R resources, such as Using R for Introductory Econometrics by Florian Heiss.

Note: All data sets are from the 7th edition (Wooldridge 2020, ISBN-13: 978-1-337-55886-0), which is compatible with all other editions.

Installation

One can Install wooldridge directly from Github or The Comprehensive R Archive Network (CRAN). Recent additions to the data set has bumped the dependency up to R >= 3.5.0.

# 7th edition on CRAN
install.packages("wooldridge")
# 7th edition
remotes::install_github("JustinMShea/wooldridge")

Documentation

It's always recommended that one read supporting documentation for data sets of interest. This becomes trivial with the wooldridge package:

?wage1

Documentation includes Wooldridge's original source, variable descriptions, as well as page numbers in the referenced text. Some sets even contain additional notes suggesting related research projects or exploration.

Example

Load the wooldridge package and use the data() function to load the desired data set. Data set names match those in the text. Once loaded into the working environment, modeling data is quick and easy, leaving learners with more time to focus on interpretation of results and general diagnostics.

library(wooldridge)

data("wage1")

wageModel <- lm(lwage ~ educ + exper + tenure, data = wage1)

summary(wageModel)

wooldridge's People

Contributors

justinmshea avatar tappek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wooldridge's Issues

Reduce and rework Vignette

Reduce the size and scope of the vignette to a handful of interesting examples, with better workflows

Considering eliminating it altogether, and reducing package size and suggested packages in the process!

Florian Hess just came out with a 2nd edition of his Using R for Introductory Econometrics book, and its excellent. He offers a far more in depth treatment than this vignette, and should be the go to source for using R to work with the textbook.

Phillips - new version

Hey! I've been using this package to teach from and it's been very helpful so thanks a lot! I've found that the Phillips dataset that's contained in the package is the old version. I found the new version in Stata format from the publisher so was able to import into R and use it but just wanted to let you know.

Not compatible with R version 3.6 and 4.0

install.packages("woolridge")
Installing package into ‘/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘woolridge’ is not available (for R version 3.6.0)

install.packages("woolridge")
Warning in install.packages :
package ‘woolridge’ is not available (for R version 4.0.0)

Please make woolridge available for newer versions of R.
Thank you.

attend

Hi Justin, from some reason there is a problem when trying to subset() the attend data by priGPA. Here are
some details.

It seems to work fine as long as priGPA is an integer:

subset(attend, priGPA == 3 & ACT == 21)
attend termGPA priGPA ACT final atndrte hwrte frosh soph missed
512 30 3.38 3 21 16 93.75 100 0 1 2
643 30 3.25 3 21 27 93.75 100 1 0 2
645 32 3.04 3 21 28 100.00 100 0 1 0
stndfnl
512 -2.0483193
643 0.2626050
645 0.4726891

However, if priGPA has decimals, the subsetting doesn't work properly:

subset(attend, priGPA == 3.65 & ACT == 20)
[1] attend termGPA priGPA ACT final atndrte hwrte frosh
[9] soph missed stndfnl
<0 rows> (or 0-length row.names)

Here is my session info:

sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.4.1

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Rome
tzcode source: internal

attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base

other attached packages:
[1] wooldridge_1.4-3

loaded via a namespace (and not attached):
[1] utf8_1.2.3 R6_2.5.1 tidyselect_1.2.0
[4] Matrix_1.6-1.1 lattice_0.21-9 magrittr_2.0.3
[7] glue_1.6.2 tibble_3.2.1 foreign_0.8-85
[10] pkgconfig_2.0.3 dplyr_1.1.2 generics_0.1.3
[13] lifecycle_1.0.3 ttutils_1.0-1.1 cli_3.6.1
[16] fansi_1.0.4 xtable_1.8-4 grid_4.3.2
[19] vctrs_0.6.3 compiler_4.3.2 rstudioapi_0.14
[22] tools_4.3.2 pillar_1.9.0 EQL_1.0-1
[25] rlang_1.1.1

Enhance documentation for 4 data sets

Need more robust documentation of data sets "benefits", "beveridge", "happiness", and "hprice3". These were missing from my copy of Wooldridges` Data Set Handbook.

load datasets on the fly

it would be good to activate the 'lazy data' option, so that we can translate datasets on the fly

I shall send a PR

Text book hint

Concerning examples from Wooldridge's introductory text book:
The text book by Florian Heiss is a great ressource, it is a companion to Wooldridge's book. An online version is here: http://urfie.net/

Maybe that is worth to mention in your vignette for additional examples from Woodridge's book.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.