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 / 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
# *----------------------------------------------------------------
@BioSciEconomist
BioSciEconomist / ex logit marginal effects.py
Created March 5, 2021 01:23
example code for getting marginal effects from logistic regression using python
# *-----------------------------------------------------------------
# | PROGRAM NAME: ex logit marginal effects.py
# | DATE: 3/4/21
# | CREATED BY: MATT BOGARD
# | PROJECT FILE:
# *----------------------------------------------------------------
# | PURPOSE: example code for getting marginal effects from logistic regression
# *----------------------------------------------------------------
import pandas as pd
@BioSciEconomist
BioSciEconomist / ex marginal effects.R
Last active March 8, 2023 16:55
Example marginal effects for logistic regression
# *-----------------------------------------------------------------
# | PROGRAM NAME: ex marginal effects.R
# | DATE: 2/26/21
# | CREATED BY: MATT BOGARD
# | PROJECT FILE:
# *----------------------------------------------------------------
# | PURPOSE: example calculations of marginal effects
# *----------------------------------------------------------------