The easyPSID package is designed to simplify the task of reading the Panel Study of Income Dynamics (PSID) into R and preparing the data for analysis.
Although the PSID is one of the most comprehensive longitudinal datasets for examining health and life course patterns among American families, preparing the PSID for analysis can be a difficult task. The PSID comes with no scripts for being read into R, and every wave of each PSID longitudinal variable has a unique name. For example, variables in the 1968 PSID Family File are named “V1” through “V440” whereas variables within the 1969 PSID Family File are named “V441” through “V1017,” even though of the 1969 Family File variables match those in the 1968 Family File. These aspects of the PSID can pose difficulties for R users who want to conduct longitudinal analyses in the PSID. Fortunately, the easyPSID package is designed to make working with the PSID as easy as possible.
After users have downloaded several waves of the PSID Packaged Data Family Files from https://simba.isr.umich.edu/, a common first use of the easyPSID package is to unzip each wave of the family files, convert them to .rds format, rename all longitudinal variables to consistent names across years, and save these resulting renamed datasets to .rds format with the following code (after amending for directory names). For example:
library(easyPSID) unzip_all_files( in_direc="C:/PSID/Zip Files", out_direc="C:/PSID/Unzipped Files", ) convert_to_rds( in_direc="C:/PSID/Unzipped Files", out_direc="C:/PSID/rds Files", ) rename_fam_vars( in_direc="C:/PSID/rds Files", out_direc="C:/PSID/renamed Files", )
If users desire all of the PSID .zip files, unzipped files, and .rds files to be in the same directory, this code can be simplified to just:
library(easyPSID) setwd("C:/PSID/Zip Files") unzip_all_files() convert_to_rds() rename_fam_vars()
Installing this package can be done with the following two lines:
However, prior to working with the easyPSID package, users will need to have already downloaded Packaged PSID data for the years that they wish to work with from https://simba.isr.umich.edu/. PSID's packaged data can only be accessed by loading this URL and navigating through the following tabs: Data- Packaged Data- Main and Supplemental Studies.
More detailed vignettes for this package are in development, but below is a brief outline of each functions in this package:
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.