Skip to content

Instantly share code, notes, and snippets.

@josef-pkt
josef-pkt / empirical_likelihood.py
Created March 20, 2012 19:29 — forked from jseabold/empirical_likelihood.py
Empirical Likelihood with Moment Constraints
'''
Author: Skipper
https://gist.github.com/2109628
Josef: adjustments to example
'''
from statsmodels.base.model import LikelihoodModel
@josef-pkt
josef-pkt / ex_treatment_effect.ipynb
Created February 8, 2022 17:28
treatment effect ATE and POM under conditional independence
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@josef-pkt
josef-pkt / try_distance_corr.py
Created June 15, 2012 19:48
distance covariance and correlation
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 15 14:00:29 2012
Author: Josef Perktold
License: MIT, BSD-3 (for statsmodels)
http://en.wikipedia.org/wiki/Distance_correlation
Yaroslav and Satrajit on sklearn mailing list
@josef-pkt
josef-pkt / stationary_block_bootstrap.py
Created April 2, 2012 01:14
Performs a stationary block bootstrap resampling of elements from a time series, or rows of an input matrix representing a multivariate time series.
#Copyright (c) 2011, Josh Hemann (hemann @ colorado . edu)
#All rights reserved.
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
@josef-pkt
josef-pkt / try_twosample_poisson_overdispersion.ipynb
Last active November 18, 2021 22:51
heteroscedasticity and overdispersion in GLM-Poisson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@josef-pkt
josef-pkt / try_mannwhitneyu_permute.py
Created October 10, 2012 14:56
permutation pvalues for mannwhitneyu
# -*- coding: utf-8 -*-
"""Mann-Whitney U rank test with permutation p-values
Created on Tue Oct 09 13:22:52 2012
Author: Josef Perktold, based on scipy function
I'm keeping currently more results than I need for checking
Monte Carlo: size and power for n1=5, n2=25
@josef-pkt
josef-pkt / beta_regression.ipynb
Last active July 19, 2021 17:35
Beta Regression in statsmodels
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@josef-pkt
josef-pkt / ex_kde_asymmetric.ipynb
Last active March 8, 2021 21:16
kernel density and kernel distribution estimation for positive and unit interval data, using asymmetric kernels
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@josef-pkt
josef-pkt / beta_kde.ipynb
Created February 20, 2021 20:17
quick experiment for kde on interval [0, 1] using beta kernel
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.