one_cty_one_prod: Analyze outcome for one county, one product

Description Usage Arguments Value

View source: R/one_cty_one_prod.R

Description

one_cty_one_prod analyzes the given data for a single county for a single product type. The user must provide identifying information for the county and for either a product module code or a UPC (but not both).

Usage

1
2
3
4
5
6
one_cty_one_prod(product_data, fips_state, fips_county,
  product_module_code = NULL, upc = NULL, product_name,
  month_of_reform, year_of_reform, county_monthly_tax_data,
  rm_month_effects = FALSE,
  module_exemptions_path = "/project2/igaarder/Data/modules_exemptions_long.csv",
  balance_panel = T)

Arguments

product_data

Dataset to be analyzed (data.table). Should have columns with fips_county, fips_state, product_module_code

fips_state

The state fips code of the desired state (integer)

fips_county

The county fips code of the desired county (integer)

product_module_code

The product module code of the desired product (integer)

upc

The name of the UPC code (if product is given on UPC level) (integer). upc may be a list if you would like to average over multiple UPCs (if, for example, a brand replaces a product with another, similar product)

product_name

The name of the product (for graph labeling) (character)

month_of_reform

The month of the tax reform (integer)

year_of_reform

The year of the tax reform (integer)

county_monthly_tax_data

Dataset with tax rates (data.table)

rm_month_effects

Remove month seasonality? (logical)

module_exemptions_path

The path to the .csv file containing a long dataset of state-product level exemptions/special tax rates. The default is "/project2/igaarder/Data/modules_exemptions_long.csv"

balance_panel

Force the panel to be balanced? (logical)

Value

A list including a price_graph, a sales_graph, and the data collapsed to event-time level ()


johnnybonney/sales.taxes documentation built on Dec. 14, 2018, 3:03 p.m.