Skip to content

Instantly share code, notes, and snippets.

@BioSciEconomist
BioSciEconomist / RNA seq analysis.R
Created January 22, 2020 12:49
Companion code from DataCamp next-gen sequencing analysis course
# *-----------------------------------------------------------------
# | PROGRAM NAME: RNA seq analysis.R
# | DATE: 12/27/19
# | CREATED BY: MATT BOGARD
# | PROJECT FILE: /Users/amandabogard/Google Drive/R Training
# *----------------------------------------------------------------
# | PURPOSE: dc code and analysis
# *----------------------------------------------------------------
@BioSciEconomist
BioSciEconomist / Gamma Power Calculator.R
Last active February 24, 2020 22:45
Power calculations based on the gamma distribution for positive claims costs
# *-----------------------------------------------------------------
# | PROGRAM NAME: Gamma Power Calculator 26Nov19.R
# | DATE: 11/20/19
# | CREATED BY: MATT BOGARD
# | PROJECT FILE:
# *----------------------------------------------------------------
# | PURPOSE: compare conventional vs nGLM power calculations to estimate power and sample size for tests involving costs
# *----------------------------------------------------------------
# based on: Cundill, Bonnie & Alexander, Neal. (2015). Sample size calculations for skewed distributions.
@BioSciEconomist
BioSciEconomist / iptw demo.py
Last active January 21, 2021 20:35
inverse probability of treatment weighted regression (IPTW)
# *-----------------------------------------------------------------
# | PROGRAM NAME: iptw demo.py
# | DATE: 11/27/19
# | CREATED BY: MATT BOGARD
# | PROJECT FILE:
# *----------------------------------------------------------------
# | PURPOSE: inverse probablilty of treatment weighted regression (IPTW)
# *----------------------------------------------------------------
@BioSciEconomist
BioSciEconomist / claims cost analysis demo.py
Last active January 19, 2021 18:18
analysis of cost data using 2 part GLM models in python
#  ------------------------------------------------------------------
#  |PROGRAM NAME: claims cost analysis demo.py
#  |DATE: 11/13/19
#  |CREATED BY: MATT BOGARD
#  |PROJECT FILE:
#  |----------------------------------------------------------------
#  | PURPOSE: analysis of cost data using 2- part GLM model
#  |----------------------------------------------------------------
 
# TO DO: add bootstrapping
@BioSciEconomist
BioSciEconomist / py code pallette.py
Last active February 1, 2024 23:39
examples of data munging and analysis in python
# *-----------------------------------------------------------------
# | PROGRAM NAME: py code pallette.py
# | DATE: 7/17/20 (original: 12/28/18)
# | CREATED BY: MATT BOGARD
# | PROJECT FILE:
# *----------------------------------------------------------------
# | PURPOSE: examples of data munging and analysis in python
# *----------------------------------------------------------------
# see also: https://pandas.pydata.org/pandas-docs/stable/getting_started/comparison/comparison_with_r.html
@BioSciEconomist
BioSciEconomist / R Code Pallete.R
Last active June 17, 2024 12:29
Data cleaning processing and analysis in R
# *-----------------------------------------------------------------
# | PROGRAM NAME: R Code Pallete
# | DATE: 3/11/20
# | CREATED BY: MATT BOGARD
# | PROJECT FILE:
# *----------------------------------------------------------------
# | PURPOSE:
# *----------------------------------------------------------------
@BioSciEconomist
BioSciEconomist / gamma model demo.py
Created November 16, 2019 02:34
example analysis of cost data using GLM gamma model with log link
# ------------------------------------------------------------------
# |PROGRAM NAME:gamma model demo.py
# |DATE: 11/13/19
# |CREATED BY: MATT BOGARD
# |PROJECT FILE:
# |----------------------------------------------------------------
# | PURPOSE: example analysis of cost data using GLM gamma model with log link
# |----------------------------------------------------------------
# TO DO: add bootstrapping
@BioSciEconomist
BioSciEconomist / boot basic.R
Last active November 8, 2019 13:44
Basic bootstrapping
# *-----------------------------------------------------------------
# | PROGRAM NAME: basic boot.R
# | DATE: 11/9/19
# | CREATED BY: MATT BOGARD
# | PROJECT FILE:
# *----------------------------------------------------------------
# | PURPOSE: demo R boot package and home grown bootsrapping for differences in means and difference-in-differences
# *----------------------------------------------------------------
#---------------------------------
@BioSciEconomist
BioSciEconomist / randomization inference demo.R
Last active October 15, 2019 01:37
Example of basic randomization inference in R
# *-----------------------------------------------------------------
# | PROGRAM NAME: randomization inference demo.R
# | DATE: 10/14/19
# | CREATED BY: MATT BOGARD
# | PROJECT FILE:
# *----------------------------------------------------------------
# | PURPOSE: demo of randomization inference based on 'Field Experimetns: Design, Analysis, and Interpretation
# | by Alan S. Gerber and Donald P. Green (Ch3)
# *----------------------------------------------------------------
##########################################################
##########################################################
######### under construction #############
##########################################################
##########################################################
# see: http://econometricsense.blogspot.com/2019/01/modeling-claims-with-linear-vs-non.html?_sm_au_=iVV3RHk1r75TjsfM
# this is also the approach taken in Jonk: Yvonne Jonk, Karen Lawson, Heidi O'Connor, Kirsten S. Riise, David
# Eisenberg, Bryan Dowd, Mary J. KreitzerMed Care. 2015 Feb; 53(2): 133–140. doi: 10.1097/MLR.0000000000000287