Skip to content

Instantly share code, notes, and snippets.

@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 / gradeint descent.r
Created November 5, 2016 17:22
Gradeint Descent
# ----------------------------------------------------------------------------------
# |PROGRAM NAME: gradient_descent_R
# |DATE: 11/27/11
# |CREATED BY: MATT BOGARD
# |PROJECT FILE: http://econometricsense.blogspot.com/2011/11/gradient-descent-in-r.html
# |----------------------------------------------------------------------------------
# | PURPOSE: illustration of gradient descent algorithm
# | REFERENCE: adapted from : http://www.cs.colostate.edu/~anderson/cs545/Lectures/week6day2/week6day2.pdf
# |
# ---------------------------------------------------------------------------------
@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 / ex VAR.py
Created February 23, 2021 18:05
Example VAR model for python
# *-----------------------------------------------------------------
# | PROGRAM NAME: ex VAR.py
# | DATE: 2/23/21
# | CREATED BY: MATT BOGARD
# | PROJECT FILE:
# *----------------------------------------------------------------
# | PURPOSE: source: https://www.machinelearningplus.com/time-series/vector-autoregression-examples-python/
# *----------------------------------------------------------------
# see also my blog post: http://econometricsense.blogspot.com/2011/05/vector-autoregressions-and-bayesian.html
@BioSciEconomist
BioSciEconomist / power simulation multiple ordinal logistic.R
Last active February 8, 2024 00:12
Simulation and power analysis for ordinal logistic regression with covariates
# *-----------------------------------------------------------------
# | PROGRAM NAME: power simulation multiple ordinal logistic.R
# | DATE: 2/3/24
# | CREATED BY: MATT BOGARD
# | PROJECT FILE: R Training
# *----------------------------------------------------------------
# | PURPOSE: power calculations and simulations
# *----------------------------------------------------------------
@BioSciEconomist
BioSciEconomist / power simulation ordinal logistic.R
Last active February 8, 2024 00:00
Power and sample size simulation for ordinal regression outcome
# *-----------------------------------------------------------------
# | PROGRAM NAME: power simulation ordinal logistic.R
# | DATE: 2/3/24
# | CREATED BY: MATT BOGARD
# | PROJECT FILE: R Training
# *----------------------------------------------------------------
# | PURPOSE: power calculations and simulations
# *----------------------------------------------------------------
@BioSciEconomist
BioSciEconomist / power simulation logistic.R
Created February 3, 2024 18:35
power analysis for logistic regression
# *-----------------------------------------------------------------
# | PROGRAM NAME: power simulation logistic.R
# | DATE: 2/3/24
# | CREATED BY: MATT BOGARD
# | PROJECT FILE: R Training
# *----------------------------------------------------------------
# | PURPOSE: power calculations and simulations
# *----------------------------------------------------------------
@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 / ex synthetic controls.R
Last active November 16, 2023 10:46
R code from An R Package for Synthetic Control Methods in Comparative Case Studies
# *-----------------------------------------------------------------
# | PROGRAM NAME: ex synthetic controls.R
# | DATE: 3/28/19
# | CREATED BY: MATT BOGARD
# | PROJECT FILE: Macintosh HD ▸ ⁨Users⁩ ▸ ⁨amandabogard⁩ ▸ ⁨Google Dive⁩ ▸ ⁨R Training⁩
# *----------------------------------------------------------------
# | PURPOSE: code based on Synth: An R Package for Synthetic Control Methods in Comparative Case Studies
# | Journal of Statistical Software June 2011, Volume 42, Issue 13
# *----------------------------------------------------------------
@BioSciEconomist
BioSciEconomist / sim multiple tests.py
Created March 16, 2021 13:33
Demonstrate the impact of multiple tests and false discovery rates
# *-----------------------------------------------------------------
# | PROGRAM NAME: sim multiple tests.py
# | DATE: 3/12/21
# | CREATED BY: MATT BOGARD
# | PROJECT FILE:
# *----------------------------------------------------------------
# | PURPOSE: demonstrate the impact of multiple tests and false discovery rates
# *----------------------------------------------------------------