Code
These ain't perfect... Please let me know of any errors you find!
Flexible, Multicore Specification Curve
The popular specr package in R is good. However, specr is not super flexible--it does not support fixed-effect regressions, and mixed-effect regressions take some work.
I wanted to create a package that would build on specr while being more user-friendly. To that end, I'm working on this set of functions, which I've given the bad title of specster.
The current code supports:
Four common models: OLS Linear Regression, Logistic Regression, Fixed-Effect Regression, and Linear Mixed-Effect Regression (i.e., lm, glm, lfe::felm, and lmerTest::lmer in r)
New as of May 2023, you can test interactions! To do so, specify your effect as an interaction in setup_specster()
Set up of models
Multicore processing to speed up computation
Graphing with ggplot2
Citations:
specr package, which my repository borrows some from: https://github.com/masurp/specr
Specification Curve Analysis: Simonsohn, U., Simmons, J.P. & Nelson, L.D. (2020). Specification curve analysis. Nature Human Behaviour, 4, 1208–1214.https://doi.org/10.1038/s41562-020-0912-z
Web Scraping
ESPN.com March Madness Brackets
Github Link to Python Code -- Dropbox Link to Data
REI.com Reviews:
GitHub Link to Python and R Code -- Dropbox Link to Data, Data (merged with weather), and NCEI USA Weather Data.
VRBO.com Listings and Reviews:
Github Link to Python Code -- Dropbox Link to Data
BestBuy.com Aggregate Reviews:
Lasso Regression Example
Just an example of Lasso Regression with explanation. Download this file and open it to view.
Mediation Model Plotting (Work-In-Progress)
This function will draw you a mediation model in ggplot in R. It ain't awesome, but mediation is kind of silly anyways.
I plan to keep adding to it, as it can only do super simple mediation now.