This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# *----------------------------------------------------------------- | |
# | PROGRAM NAME: ex DID vs repeated measures | |
# | DATE: 9/9/20 | |
# | CREATED BY: MATT BOGARD | |
# | PROJECT FILE: https://gist.github.com/BioSciEconomist | |
# *---------------------------------------------------------------- | |
# | PURPOSE: compare repeated measures model with random effects with DID | |
# *---------------------------------------------------------------- | |
# see also: http://econometricsense.blogspot.com/2018/02/intuition-for-random-effects.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# *----------------------------------------------------------------- | |
# | PROGRAM NAME: ex ITT vs IV CACE LATE.R | |
# | DATE: 6/4/20 | |
# | CREATED BY: MATT BOGARD | |
# | PROJECT FILE: /Users/amandabogard/Google Drive/ | |
# *---------------------------------------------------------------- | |
# | PURPOSE: code based on http://mindymallory.com/R-Companion-Price-Analysis/chapter-2-getting-started.html#working-with-apis | |
# *---------------------------------------------------------------- | |
# reference: Matering Metrics. Angrist and Pishke. 2015 (p.110) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------------------------ | |
# PROGRAM NAME: addition problems.py | |
# DATE: 5/9/20 | |
# CREATED BY: MATT BOGARD | |
# PROJECT FILE: /Users/amandabogard/Google Drive/Python Scripts | |
#---------------------------------------------------------------- | |
# PURPOSE: generate basic addition problems | |
# --------------------------------------------------------------- | |
# references: modified from: https://codereview.stackexchange.com/questions/106464/generating-arithmetic-quiz-questions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# *----------------------------------------------------------------- | |
# | PROGRAM NAME: ex bank marketing predictive model.py | |
# | DATE: 5/1/20 | |
# | CREATED BY: MATT BOGARD | |
# | PROJECT FILE: | |
# *---------------------------------------------------------------- | |
# | PURPOSE: basic example of predictive modeling, evaluation, and scoring | |
# *---------------------------------------------------------------- | |
# Import numpy and pandas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# *----------------------------------------------------------------- | |
# | PROGRAM NAME: Power Analysis for ITT.py | |
# | DATE: 4/14/20 | |
# | CREATED BY: MATT BOGARD | |
# | PROJECT FILE: | |
# *---------------------------------------------------------------- | |
# | PURPOSE: examples of power calculations considering ITT analysis | |
# *---------------------------------------------------------------- | |
# reference: https://blogs.worldbank.org/impactevaluations/power-calculations-101-dealing-with-incomplete-take-up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# *----------------------------------------------------------------- | |
# | PROGRAM NAME: ex cluster analysis.R | |
# | DATE: 3/6/20 | |
# | CREATED BY: MATT BOGARD | |
# | PROJECT FILE: | |
# *---------------------------------------------------------------- | |
# | PURPOSE: basic mechanics of cluster analysis | |
# *---------------------------------------------------------------- | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# *----------------------------------------------------------------- | |
# | PROGRAM NAME: ex factor analysis.R | |
# | DATE: 3/6/20 | |
# | CREATED BY: MATT BOGARD | |
# | PROJECT FILE: | |
# *---------------------------------------------------------------- | |
# | PURPOSE: basic mechanics of factor analysis | |
# *---------------------------------------------------------------- | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------ | |
# |PROGRAM NAME: percentiles.R | |
# |DATE: 2/25/20 | |
# |CREATED BY: MATT BOGARD | |
# |PROJECT FILE: | |
# |---------------------------------------------------------------- | |
# | PURPOSE: quickly divide predicted probabilities into groups based on percentiles | |
# | and assess model performance | |
# |------------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# *----------------------------------------------------------------- | |
# | PROGRAM NAME: dc customer segmentation | |
# | DATE: 5/17/19 | |
# | CREATED BY: MATT BOGARD | |
# | PROJECT FILE:/Users/amandabogard/Google Drive/Python Scripts | |
# *---------------------------------------------------------------- | |
# | PURPOSE: code from Data Camp course | |
# *---------------------------------------------------------------- | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------ | |
# |PROGRAM NAME: sample size for LATE.R | |
# |DATE: 1/30/19 | |
# |CREATED BY: MATT BOGARD | |
# |PROJECT FILE: M:\Matt B\MB Coders Corner | |
# |---------------------------------------------------------------- | |
# | PURPOSE: sample size and power calculations for LATE in instrumental variables analysis | |
# |---------------------------------------------------------------- | |
# based on: Kirk Bansak. "A Generalized Framework for the Estimation of Causal Moderation Effects with | |
# Randomized Treatments and Non-Randomized Moderators." (Under Review) https://arxiv.org/pdf/1610.08580.pdf |