MattMeister.com
  • Blog
  • Papers
  • Code & Data
  • Reviews HOF
  • Teaching

On this page

  • Web Scraping
    •     Tripadvisor
    •     REI
    •     Vrbo
    •     BestBuy
    •     ESPN.com March Madness
  • Other
    • Fast and Flexible Specification Curve
    • Lasso Regression Example
    • Mediation Model Plotting (Work-in-Progress)

Code & Data

These ain’t perfect… Please let me know of any errors you find!

Web Scraping

    Tripadvisor

     Reviews, questions, and answers

       Scraping Code Data

    REI

     Reviews

       Scraping Code Raw Data Weather Data Merged Data

    Vrbo

     Listings information and reviews

       Scraping Code Data

    BestBuy

     Aggregated review information (might add to this eventually)

       Scraping Code Data

    ESPN.com March Madness

     Brackets for men’s and women’s tournaments

       Scraping Code Data

Other

Fast and Flexible 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:

       Code

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)
  • Setup 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

Lasso Regression Example

Just an example of Lasso Regression with a short explanation.

       .html

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.

       Code