Skip to content

Commit

Permalink
version 0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianAronson authored and cran-robot committed Oct 3, 2021
1 parent c1c58bc commit 2cfb1ad
Show file tree
Hide file tree
Showing 20 changed files with 302 additions and 306 deletions.
10 changes: 5 additions & 5 deletions DESCRIPTION
@@ -1,18 +1,18 @@
Package: easyPSID
Title: Reading, Formatting, and Organizing the Panel Study of Income
Dynamics (PSID)
Version: 0.1.1
Version: 0.1.2
Authors@R: person("Brian", "Aronson",email = "bdaronson@gmail.com", role = c("aut", "cre"))
Description: Provides various functions for reading and preparing the Panel Study of Income Dynamics (PSID) for longitudinal analysis, including functions that read the PSID's fixed width format files directly into R, rename all of the PSID's longitudinal variables so that recurring variables have consistent names across years, simplify assembling longitudinal datasets from cross sections of the PSID Family Files, and export the resulting PSID files into file formats common among other statistical programming languages ('SAS', 'STATA', and 'SPSS').
Depends: R (>= 3.0.1), stringr (>= 1.0.0), LaF (>= 0.6.0), foreign (>=
0.8-67)
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.0.2
LazyData: false
RoxygenNote: 6.1.0
NeedsCompilation: no
Packaged: 2020-02-16 21:30:00 UTC; admin
Packaged: 2021-10-03 14:44:33 UTC; bda13
Author: Brian Aronson [aut, cre]
Maintainer: Brian Aronson <bdaronson@gmail.com>
Repository: CRAN
Date/Publication: 2020-02-16 21:40:02 UTC
Date/Publication: 2021-10-03 15:00:02 UTC
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,2 +1,2 @@
YEAR: 2019
YEAR: 2021
COPYRIGHT HOLDER: Brian Aronson
36 changes: 18 additions & 18 deletions MD5
@@ -1,7 +1,7 @@
62a7f29caf97d44cb56dff420cc20229 *DESCRIPTION
02d1618577bd2d0466aa03f413aca193 *LICENSE
69627f5a26c562b6becb8fa84ad16468 *NAMESPACE
c1de29bd3be85bcb8ed3f5843d6a2916 *NEWS.md
90415693d449123c4ab45d1de1a51e58 *DESCRIPTION
8effe555a748c8ef043339c2427d17ae *LICENSE
9506bff0123601879225c2af3647593c *NAMESPACE
5f6ebebd4f6a4407a05a788631875939 *NEWS.md
504c78d1143d2eabbd7353bebcc55ee2 *R/10find_desc.R
7203ff66e6fa5ea692020f55683ef9cc *R/1unzip_all_files.R
062d276c9308d1224c420382ee0aaf2a *R/2convert_to_rds.R
Expand All @@ -13,22 +13,22 @@ d1b5d0e6a1acb4cc5341eef4f0745346 *R/7convert_from_rdata.R
6c1013c14d817547ce674d85fbd2f7ed *R/8find_name.R
220925bea5f68f355e628352b4e141db *R/9find_years.R
00ee728a84bf1ccda82983f101a23f94 *R/PSID_Package.Documentation_function.R
b2e1a61ff7266782d6ae8eb717413698 *R/sysdata.rda
2fc3d460a956393562e0b46eadd1cce7 *README.md
40774678dc10e0cf9a8e6d2e5259f987 *R/sysdata.rda
f6c6aba7f7561381e0646286d9694f5a *README.md
a3ec50e70b44fb699009d06d6d1c402e *inst/extdata/rds_dir/FAM1968.rds
a24bf4365b653a291af90f9d9fb457d7 *inst/extdata/rds_dir/FAM1969.rds
211376a165be5b245e5cf09346412ab9 *inst/extdata/rds_dir/IND2017.rds
d7cd1cdcf062ed1cc1ab772e9835927c *inst/extdata/rds_dir/IND2019.rds
d9542fbbf2513e8559a8be7317c492be *inst/extdata/unzip_dir/FAM1984.do
6b31772af4073883c76d77aae74499cb *inst/extdata/unzip_dir/FAM1984.txt
903436bd03d13eee3bdaf84bcaa2456a *inst/extdata/zip_dir/fam1968.zip
b26037db93eaf350df86e52f2e92ee6b *man/convert_from_rds.Rd
638d11037496c60489b05a6af2ab683b *man/convert_to_rds.Rd
3ef982a9e69452a737f9f767f7048b26 *man/create_custom_panel.Rd
1d5a8e5053d0d780f2a5832756a9502d *man/create_extract.Rd
43694510596de6780a9050c0c9e203ad *man/easyPSID-package.Rd
6772871517946994232c2907bcfaeba5 *man/find_description.Rd
755f810c229ef7d63237e3131c191adb *man/find_name.Rd
39170b51d8820493575f6a58b4dccc26 *man/find_years.Rd
d125e371031dfb7b4c5c597dd695a6d1 *man/rename_fam_vars.Rd
f967609ad5341477406a117a1702c8d7 *man/rename_ind_vars.Rd
36e6772d307e01275470a574e0b38634 *man/unzip_all_files.Rd
afe3f0e80913ceebd730903077fb25b4 *man/convert_from_rds.Rd
dc0873bd81886c48b5df83555ea6e522 *man/convert_to_rds.Rd
8b87c53e7689dd30607c94331317fe78 *man/create_custom_panel.Rd
005e57ff5f826054a68df190e089465b *man/create_extract.Rd
8cca39d80dea448b4043ea520ede9e66 *man/easyPSID-package.Rd
a5fe95482fbcd9ed1354d3a884a7aef3 *man/find_description.Rd
a55e08b7c1a1c1a6e2f714c55e567c71 *man/find_name.Rd
81bae55cab97ac5a020621077ad19eba *man/find_years.Rd
3b7b2ddefacf1506ffd638a87f43f5b7 *man/rename_fam_vars.Rd
e4fb51302e862a2a7c6135eecfd9a30b *man/rename_ind_vars.Rd
6fd3f35620ec7606502ed16910d03cac *man/unzip_all_files.Rd
2 changes: 1 addition & 1 deletion NAMESPACE
@@ -1,4 +1,4 @@
# Generated by roxygen2: do not edit by hand
# Generated by roxygen2: do not edit by hand

export(convert_from_rds)
export(convert_to_rds)
Expand Down
5 changes: 2 additions & 3 deletions NEWS.md
@@ -1,3 +1,2 @@
# easyPSID 0.1.1
- Added support for 2017 Family and Individual Files
- Lost support for 2015 Individual File
# easyPSID 0.1.2
- Added support for 2019 Family Files and 2019 Individual cross-sectional file. Please note that support for the 2017 version of the Individual cross-sectional is no longer supported in this version of the package.
Binary file modified R/sysdata.rda
Binary file not shown.
58 changes: 27 additions & 31 deletions README.md
@@ -1,12 +1,14 @@
# easyPSID
# easyPSID README.md

## Overview

[CRAN package](https://CRAN.R-project.org/package=easyPSID) 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-V440` whereas variables within the 1969 PSID Family File are named `V441-V1017`, even though most variables in the 1969 Family Files match those in the 1968 Family File. These aspects of the PSID pose difficulties for R users who want to conduct longitudinal analyses in the PSID. easyPSID simplifies these tasks and several others.
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.

## Example

After downloading multiple waves of the PSID Packaged Data Family Files from https://simba.isr.umich.edu/, a common use of easyPSID 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 the resulting renamed datasets to .rds format. This can be done as follows (assuming the PSID files were saved into `C:/PSID/Zip Files`):
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(
Expand All @@ -24,31 +26,25 @@ After downloading multiple waves of the PSID Packaged Data Family Files from htt

## Installation

This package can be directly installed via CRAN with `install.packages("easyPSID")`. Alternatively, newest versions of this package can be installed with `devtools::install_github("BrianAronson/easyPSID")`

Prior to working with the easyPSID package, users will need to download packaged PSID data for the family files and cross-sectional individual file from https://simba.isr.umich.edu/.

## Function Overview

Below is a brief outline of each function in this package:

- **unzip\_all\_files**
- Unzips all files in the supplied directory.
- **convert\_to\_rds**
- Read PSID fixed width files into R and saves output in .rds format.
- **rename\_fam\_vars**
- Renames all variables in longitudinal family files to their names when they were first available in the dataset.
- **rename\_ind\_vars**
- Renames all variables in longitudinal family files to their names when they were first available in the dataset.
- **create\_custom\_panel**
- Creates a longitudinal dataset with provided family files consisting of a custom set of variables selected by the user.
- **create\_extract**
- Creates a longitudinal dataset with provided family files consisting of the dataset's N most commonly reoccurring variables.
- **convert\_from\_rdata**
- Converts PSID .rds files to files compatible with STAT, SAS, or SPSS.
- **find\_name**
- Returns the new name (via the rename\_fam\_vars and rename\_ind\_vars functions) of a specified variable.
- **find\_years**
- Returns each year that a given variable is available in the PSID, and its names during those years.
- **find\_description**
- Returns the description of a given variable in the PSID with the variable labels provided by the PSID.
This package can be directly installed via CRAN with:
install.packages("easyPSID")

Alternatively, newest versions of this package can be installed with:
devtools::install_github("BrianAronson/easyPSID")

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. The current functions only work with the PSID's family files and cross-sectional individual file. For reference, once downloaded, the family files typically have a naming structure like "fam1968.zip", "fam1969.zip", etc. and the individual cross section will be named something like "ind2015er.zip".

##Function Overview

More detailed vignettes for this package are in development, but below is a brief outline of each function in this package:

- **unzip\_all\_files**: Unzips all files in the supplie directory.
- **convert\_to\_rds**: Read PSID fixed width files into R and saves output in .rds format.
- **rename\_fam\_vars**: Renames all variables in longitudinal family files to their names when they were first available in the dataset.
- **rename\_ind\_vars**: Renames all variables in longitudinal family files to their names when they were first available in the dataset.
- **create\_custom\_panel**: Creates a longitudinal dataset with provided family files consisting of a custom set of variables selected by the user.
- **create\_extract**: Creates a longitudinal dataset with provided family files consisting of the dataset's N most commonly reoccurring variables.
- **convert\_from\_rdata**: Converts PSID .rds files to files compatible with STAT, SAS, or SPSS.
- **find\_name**: Returns the new name (via the rename\_fam\_vars and rename\_ind\_vars functions) of a specified variable.
- **find\_years**: Returns each year that a given variable is available in the PSID, and its names during those years.
- **find\_description**: Returns the description of a given variable in the PSID with the variable labels provided by the PSID.
Binary file removed inst/extdata/rds_dir/IND2017.rds
Binary file not shown.
Binary file added inst/extdata/rds_dir/IND2019.rds
Binary file not shown.
50 changes: 25 additions & 25 deletions man/convert_from_rds.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 22 additions & 22 deletions man/convert_to_rds.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 29 additions & 29 deletions man/create_custom_panel.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2cfb1ad

Please sign in to comment.