Skip to content

Instantly share code, notes, and snippets.

@josef-pkt
josef-pkt / example_gls_simpletable.ipynb
Created September 22, 2012 03:19
playing with html
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 / example_gls_try4.ipynb
Created September 22, 2012 03:40
ipynb formatting
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 / tost_paired.py
Created October 16, 2012 16:17
TOST test of equivalence for paired samples
'''Test of Equivalence and Non-Inferiority
currently only TOST for paired sample
Application for example bioequivalence
Author: Josef Perktold
License: BSD-3
# -*- coding: utf-8 -*-
"""Avoid Pickle problems with an instance method
Created on Tue Dec 18 15:22:19 2012
Author: Josef Perktold
"""
import pickle
@josef-pkt
josef-pkt / try_scoreatpercentiles.py
Last active December 10, 2015 02:48
scoreatpercentiles vectorized
# -*- coding: utf-8 -*-
"""scoreatpercentiles vectorized
Created on Mon Dec 24 09:29:31 2012
Author: Josef Perktold
"""
import numpy as np
"""
=========================================================
circular data analysis functions
=========================================================
"""
# Authors : Anne Kosem and Alexandre Gramfort
# License : Simplified BSD
@josef-pkt
josef-pkt / ex_kernel_regression3.py
Last active December 10, 2015 14:39
script to try out Censored kernel regression now left censored with reverse indexing to undo sort
# -*- coding: utf-8 -*-
"""script to try out Censored kernel regression
Created on Wed Jan 02 13:43:44 2013
Author: Josef Perktold
"""
import numpy as np
import statsmodels.nonparametric.api as nparam
@josef-pkt
josef-pkt / try_mixed_repeated.py
Created February 11, 2013 12:35
example for OneWayMixed (doesn't work)
# Worker Machine score
ss = '''\
1 1 A 52.0
2 1 A 52.8
3 1 A 53.1
4 2 A 51.8
5 2 A 52.8
@josef-pkt
josef-pkt / try_mixed_repeated_0.py
Created February 11, 2013 12:44
another try on OneWayMixed (units are machine intersection worker)
# Worker Machine score
ss = '''\
1 1 A 52.0
2 1 A 52.8
3 1 A 53.1
4 2 A 51.8
5 2 A 52.8