Module Expr Str ImportFrom alias Import alias identifier ImportFrom alias Import alias identifier Import alias identifier Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpSub NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore BinOpAdd Num Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index Num Assign NameStore BinOpAdd NameLoad BinOpMult NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad attr Print AttributeLoad NameLoad attr Print Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num Expr Call NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num Expr Call NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num Expr Call NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num Print AttributeLoad NameLoad attr Print Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword Num keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword Num keyword NameLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Num Print NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword Num keyword NameLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Print NameLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Print NameLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Index Num attr Assign NameStore Call NameLoad BinOpAdd ListLoad Num NameLoad BinOpAdd NameLoad ListLoad Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Print Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Print Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad keyword NameLoad Print Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num BinOpFloorDiv Num Num Print Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num BinOpFloorDiv Num Num Print Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Str Expr Str
N/A N/A examples for sandwich estimators of covariance

Author: Josef Perktold

 statsmodels.compat.python lzip N/A numpy np numpy.testing assert_almost_equal N/A statsmodels.api sm N/A statsmodels.stats.sandwich_covariance sw N/A nobs 100 N/A kvars 4 N/A x N/A N/A N/A np random randn nobs N/A kvars 1 N/A exog N/A N/A sm add_constant x N/A params_true N/A N/A np ones kvars N/A y_true N/A N/A np dot exog params_true N/A sigma N/A 0.1 N/A N/A np exp N/A exog N/A N/A N/A -1 N/A endog N/A y_true N/A sigma N/A N/A N/A np random randn nobs N/A self N/A N/A N/A N/A sm OLS endog exog fit N/A N/A self HC3_se N/A N/A N/A sw se_cov N/A N/A sw cov_hc3 self N/A N/A assert_almost_equal N/A N/A sw se_cov N/A N/A sw cov_hc0 self N/A self HC0_se 15 N/A N/A assert_almost_equal N/A N/A sw se_cov N/A N/A sw cov_hc1 self N/A self HC1_se 15 N/A N/A assert_almost_equal N/A N/A sw se_cov N/A N/A sw cov_hc2 self N/A self HC2_se 15 N/A N/A assert_almost_equal N/A N/A sw se_cov N/A N/A sw cov_hc3 self N/A self HC3_se 15 N/A N/A self HC0_se N/A N/A N/A sw se_cov N/A N/A sw cov_hac_simple self nlags 0 use_correction False N/A bse_hac0 N/A N/A sw se_cov N/A N/A sw cov_hac_simple self nlags 0 use_correction False N/A N/A assert_almost_equal bse_hac0 N/A self HC0_se 15 N/A bse_hac0 N/A bse_hac0c N/A N/A sw se_cov N/A N/A sw cov_hac_simple self nlags 0 use_correction True N/A N/A assert_almost_equal bse_hac0c N/A self HC1_se 15 N/A bse_w N/A N/A sw se_cov N/A N/A sw cov_white_simple self use_correction False N/A bse_w N/A N/A assert_almost_equal bse_w N/A self HC0_se 15 N/A bse_wc N/A N/A sw se_cov N/A N/A sw cov_white_simple self use_correction True N/A bse_wc N/A N/A assert_almost_equal bse_wc N/A self HC1_se 15 N/A groups N/A N/A np repeat N/A N/A np arange 5 20 N/A idx N/A N/A N/A N/A N/A np nonzero N/A N/A np diff groups N/A 0 tolist N/A groupidx N/A lzip N/A N/A 0 idx N/A idx N/A N/A len groups N/A ngroups N/A len groupidx N/A N/A N/A sw se_cov N/A N/A sw cov_cluster self groups N/A N/A N/A sw se_cov N/A N/A sw cov_cluster self N/A N/A np ones N/A len endog int use_correction False N/A N/A N/A sw se_cov N/A N/A sw cov_crosssection_0 self N/A N/A np arange N/A len endog N/A groups N/A N/A np repeat N/A N/A np arange 50 N/A 100 50 N/A N/A N/A sw se_cov N/A N/A sw cov_cluster self groups N/A groups N/A N/A np repeat N/A N/A np arange 2 N/A 100 2 N/A N/A N/A sw se_cov N/A N/A sw cov_cluster self groups N/A http://www.kellogg.northwestern.edu/faculty/petersen/htm/papers/se/test_data.txt N/A 
test <- read.table(
      url(paste("http://www.kellogg.northwestern.edu/",
            "faculty/petersen/htm/papers/se/",
            "test_data.txt",sep="")),
    col.names=c("firmid", "year", "x", "y"))
