Skip to content

Instantly share code, notes, and snippets.

@josef-pkt
josef-pkt / glm_varweights_wls.ipynb
Last active February 7, 2024 20:55
comparing GLM gaussian using var_weights and WLS (updated after fit_constrained bug fix, rerun based on 3856)
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_gmm_poisson.ipynb
Last active August 24, 2023 20:53
Poisson with endogeneity, GMM with IV versus MLE in python
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 / example_gmm_euler.ipynb
Last active June 9, 2023 14:42
Generalized Method of Moments in Python: Estimating Euler Equations
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 / 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
@josef-pkt
josef-pkt / nonparametric_cuzicktrend.py
Last active January 1, 2023 15:29
Cuzick's non-parametric test of trend
'''Cuzick's non-parametric test of trend
Author : Josef Perktold
'''
import numpy as np
from scipy import stats
from scipy.stats.stats import rankdata, tiecorrect, square_of_sums
@josef-pkt
josef-pkt / ex_gam_bs_autos_cleaned.ipynb
Created November 13, 2018 17:36
Example: GAM in statsmodels
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_binned_kernel_regression.ipynb
Created February 20, 2017 05:44
binned local linear kernel regression - illustration
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_gam_mpg_basic.ipynb
Created January 30, 2019 00:50
Basic GAM example with formula after merge
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
Created March 12, 2021 18:58
kernel density and cdf estimation using asymmetric kernels for interval and positive data (version at merge)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.