iterate_price: Iterate Price

Description Usage Arguments Value

Description

Iterate through different priced drugs in first stage percentage change estimation

Usage

1
iterate_price(DT, form, price_change, B, price_var, x_main, x_int, quiet)

Arguments

DT

a data.table

form

formula, first stage formula

price_change

data.table of price changes by drugs

B

integer, number of bootstrap samples to use when calculating standard errors

price_var

character, name of price variable

x_main

character (default = "first_mo"), name of instrument

x_int

character vector, names of variables to interact instrument with

quiet

logical (default = FALSE), if TRUE then does not print progress

Value

data.table of first stage estimates by price of drug


evanjflack/cfo.behavioral documentation built on Oct. 10, 2020, 11:52 p.m.