Learn R Programming

medicare: tools for simplifying Medicare data analysis

The medicare package is a collection of functions and methods I've used to manipulate Medicare data and get it ready for analysis. This includes things like efficiently subsetting messy Cost Report data to pull desired variables, renaming variables in data that doesn't come with headers, and finding more useful names for Provider of Service files from the early 2000's that name variables sequentially from "PROV0001".

Publicly available Medicare data often requires extensive preparation and cleaning before any analysis can take place. Files are often raw dumps of database tables, which the researcher is expected to subset and merge to make a workable dataset. This package contains methods to extract data from such datasets (e.g. Cost Reports), provide useful names for variables (Cost Reports and Provider of Services File), and even parse data dictionary / layout files to extract variable names for older datasets, where names in the raw data are essentially Var1, Var2, Var3... (Provider of Services File).

Installation and Documentation

medicare is under active development and available on CRAN. You can install the latest release version of the package by using

install.packages("medicare")

You can install the development version of the medicare package using devtools:

library(devtools)
devtools::install_github("robertgambrel/medicare")

Please let me know about any problems by opening an issue.

For detailed examples on how to use some of the functionality, check out the Vignettes, which show examples similar to what I've done in my own work.

browseVignettes(package="medicare")

Copy Link

Version

Install

install.packages('medicare')

Monthly Downloads

603

Version

0.2.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Robert Gambrel

Last Published

November 18th, 2016

Functions in medicare (0.2.0)

pos2010

Sample Medicare Provider of Service 2010 data for hospices
pos_names

Provide pre-extracted names for Provider of Service file, years 2000-2010
hospiceALPHA

Sample Medicare Hospice Cost Report 2014 data
hospiceNMRC

Sample Medicare Hospice Cost Report 2014 data
subset_worksheet

Subset the desired dataset, based on a worksheet code.
subset_column

Subset the desired dataset, based on a column code.
cr_alpha_names

Provide names for Cost Report "Alpha Table" data
cr_extract

Extract a variable from a Cost Report
subset_row

Subset the desired dataset, based on a row code.
price_deflate

Deflate prices within a sector, relative to a base period.
pos_names_extract

Process a Provider of Services Record Layour file to extract variable names
hospiceRPT

Sample Medicare Hospice Cost Report 2014 data
medicare

medicare: tools for simplifying Medicare data analysis
cr_rpt_names

Provide names for Cost Report "Report Table" data
cr_nmrc_names

Provide names for Cost Report "Numeric Table" data