Learn R Programming

farr

The goal of farr is to provide functions and small data sets as used in “Empirical Research in Accounting: Tools and Methods”.

Installation

You can install the released version of farr from CRAN with:

install.packages("farr")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("iangow/farr")

Copy Link

Version

Install

install.packages('farr')

Monthly Downloads

594

Version

0.3.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Ian Gow

Last Published

September 1st, 2025

Functions in farr (0.3.2)

get_event_cum_rets_mth

Produce a table of cumulative event returns using monthly data
fhk_pilot

Treatment indicators for SHO pilot firms
get_me_breakpoints

Create a table of with cut-offs for size portfolios
get_event_cum_rets

Produce a table of cumulative event returns
get_event_dates

Produce a table mapping announcements to trading dates
get_annc_dates

Produce a table mapping announcements to trading dates
form_deciles

Form deciles
comp

Data on accruals and auditor choice
ndcg

Calculate metric: NDCG at k
rus

Random under-sampling function
rusboost

RUSBoost for two-class problems
gvkey_ciks

GVKEY-CIK links
get_got_data

Generate simulated data as described in Gow, Ormazabal and Taylor (2010).
pg_to_parquet

Save WRDS table as parquet file.
get_idd_periods

Period for Inevitable Disclosure Doctrine (IDD)
system_time

Version of system.time() that works with assignment
state_hq

Data on firm headquarters based on SEC EDGAR filings
cmsw_2018

Data for CMSW
get_size_rets_monthly

Create a table of monthly returns for size portfolios
sho_r3000_sample

Russell 3000 sample used by SEC
idd_dates

Dates for Inevitable Disclosure Doctrine (IDD)
sho_tickers

Tickers of pilot firms for Reg SHO.
get_event_rets

Produce a table of event returns
get_ff_ind

Fetch Fama-French industry grouping.
%>%

Pipe operator
roc

A function returning data for a ROC plot.
winsorize

Winsorize a vector.
get_test_scores

A function returning data on test_scores.
load_parquet

Function to load parquet file into database.
get_trading_dates

Produce a table mapping dates on CRSP to "trading days"
sho_r3000_gvkeys

Russell 3000 sample used by SEC with GVKEYs
michels_2017

Data on firms suffering natural disasters
undisclosed_names

Customer names that represent non-disclosures.
sho_r3000

Russell 3000 stocks at time of SEC Reg SHO sample formation.
zhang_2007_events

Event dates from Zhang (2007)
zhang_2007_windows

Event windows from Zhang (2007)
test_scores

Test scores
truncate

Truncate a vector.
iliev_2010

Data on public float
llz_2018

GVKEYs used in Li, Lin and Zhang (2018)
aaer_dates

AAER dates from SEC
auc

Area under curve
aus_banks

Australian banks
by_tag_year

Tags on StackOverflow
bloomfield_2021

Firm-years in RDD analysis of Bloomfield (2021)
aaer_firm_year

AAERs from Bao et al. (2020)
aus_bank_funds

Australian bank fundamental data
aus_bank_rets

Australian bank stock market data
camp_attendance

Camp attendance
confusion_stats

Confusion statistics.
apple_events

Dates for Apple Events
fhk_firm_years

Firm-years for replication of Fang, Huang and Karpoff (2016)