psidread
R package to help manage, construct, and reshape PSID data files in a simplified way using existing text from the official website.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (20.8%) to scientific vocabulary
Last synced: 9 months ago
·
JSON representation
Repository
R package to help manage, construct, and reshape PSID data files in a simplified way using existing text from the official website.
Basic Info
- Host: GitHub
- Owner: Qcrates
- Language: R
- Default Branch: master
- Size: 3.13 MB
Statistics
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Created over 2 years ago
· Last pushed 11 months ago
Metadata Files
Readme
Changelog
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# psidread
The goal of psidread is to provide a user-friendly approach to streamline the management, creation, and formatting of panel data from the Panel Study of Income Dynamics (PSID).
## Installation
Jan 16th Update: This package is now available on CRAN! You can install it directly from CRAN with:
``` {.r .R}
install.packages("psidread")
```
Or, you can install the development version of psidread from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("Qcrates/psidread")
```
## Usage
### Overview
The [Panel Study of Income Dynamics](https://psidonline.isr.umich.edu/) (PSID) is the longest running longitudinal household survey in the world, which provides invaluable data covering numerous topics including marriage, income, wealth, health and etc. However, the process of converting raw PSID data files into datasets ready for analysis is quite complex and challenging, especially for new users.
This package is developed with the purpose of addressing these challenges within only R environment without additional assistance from other statistical programming softwares. By bridging these gaps, the package aims to make PSID datasets more usable and manageable for researchers and analysts.
### Introduction
What `psidread` package is created to help:
- Create a table of data structure across multiple waves using the text that can be copied and pasted from the website
- Unzip and convert the zipped files without additional help of other software
- Read and merge the data files from multiple waves
- Rename and reshape the dataset to fit the need for advanced analysis
### Example Workflow
```{r, eval = FALSE}
# Step 1: Create the table of data structure ----
psid_varlist = c(" hh_age || [13]ER53017 [17]ER66017", " p_age || [13]ER34204")
str_df <- psid_str(varlist = psid_varlist, type = "separated")
# Step 2: Unzip and convert the ascii data ----
input_directory <- "your/input/directory"
output_directory <- "your/export/directory"
psid_unzip(indir = input_directory,
exdir = output_directory,
zipped = TRUE,
type = "package",
filename = NA)
# Step 3: Read and merge data ----
data_directory <- "your/folder/with/converted/data"
psid_df <- psid_read(indir = data_directory, str_df = str_df,idvars = c("ER30000"),type = "package",filename = NA)
# Step 4: Rename and reshape the data ----
df <- psid_reshape(psid_df = psid_df, str_df = str_df, shape = "long", level = "individual")
df
```
Please refer to the [vignettes](https://cran.r-project.org/package=psidread/vignettes/my-vignette.html) for the detailed instructions on how to build your own dataset from PSID using this package.
Owner
- Name: Qcrates
- Login: Qcrates
- Kind: user
- Company: Duke University
- Repositories: 1
- Profile: https://github.com/Qcrates
Data-driven policy researcher focusing on poverty, child, and health.
GitHub Events
Total
- Issues event: 2
- Issue comment event: 1
- Push event: 1
Last Year
- Issues event: 2
- Issue comment event: 1
- Push event: 1
Packages
- Total packages: 1
-
Total downloads:
- cran 304 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 5
- Total maintainers: 1
cran.r-project.org: psidread
Streamline Building Panel Data from Panel Study of Income Dynamics ('PSID') Raw Files
- Homepage: https://github.com/Qcrates/psidread
- Documentation: http://cran.r-project.org/web/packages/psidread/psidread.pdf
- License: GPL (≥ 3)
-
Latest release: 1.0.5
published 11 months ago
Rankings
Dependent packages count: 28.4%
Dependent repos count: 36.4%
Average: 49.9%
Downloads: 84.9%
Maintainers (1)
Last synced:
10 months ago
Dependencies
DESCRIPTION
cran
- asciiSetupReader * imports
- dplyr * imports
- stringr * imports
- tidyr * imports
- utils * imports
- testthat >= 3.0.0 suggests