https://github.com/pachadotdev/baltagi
'Econometric Analysis of Panel Data' (ISBN 978-3-030-53952-8) tidy datasets
https://github.com/pachadotdev/baltagi
econometrics panel-data rstats
Last synced: 9 months ago
JSON representation
'Econometric Analysis of Panel Data' (ISBN 978-3-030-53952-8) tidy datasets
- Host: GitHub
- URL: https://github.com/pachadotdev/baltagi
- Owner: pachadotdev
- License: cc0-1.0
- Created: 2023-08-28T07:08:48.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-28T17:13:29.000Z (almost 3 years ago)
- Last Synced: 2025-02-14T18:52:20.072Z (over 1 year ago)
- Topics: econometrics, panel-data, rstats
- Language: R
- Homepage:
- Size: 936 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE.md
Awesome Lists containing this project
README
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# baltagi
## About
'Econometric Analysis of Panel Data' (ISBN 978-3-030-53952-8)
provides up-to-date coverage of basic panel data techniques, illustrated
with real economic applications and datasets. However, importing the
original data from the book into R is not straightforward because
some of the datasets are available in Microsoft Word format. I provide the
datasets in tidy format, expecting that this will allow students to focus on
the econometric techniques rather than on data wrangling.
## Installation
You can install the development version of baltagi like so:
``` r
remotes::install_github("pachadotdev/baltagi")
```
## Example
Baltagi, Song and Jung (2001) investigated the productivity of public capital in
each US state's private output, which is discussed in section 9.6.1 of the book
(Empirical Example: Nested States Public Capital Productivity).
The original dataset is in Microsoft Word format (DOCX). To read it, you would
need to copy it in Notepad, save as CSV , and then import it into R to find that
there are data wrangling steps involved to make it usable. Alternatively, you
can read the DOCX file directly in R with the `readtext` package and then
proceed to the data wrangling.
`baltagi` saves all those steps and you can jump directly to the econometric
analysis.
```{r example}
library(baltagi)
library(plm)
fit <- plm(
log(gsp) ~ log(priv_cap) + log(hwy) + log(water) + log(util) + log(emp) +
unemp,
data = produc,
index = c("st_abb", "year")
)
summary(fit)
```