Module Expr Str Import alias identifier ImportFrom alias Import alias identifier Import alias identifier ImportFrom alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias Import alias identifier Import alias identifier FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Num Assign NameStore Num Assign NameStore BinOpFloorDiv NameLoad NameLoad Assign NameStore Num Assign NameStore Call NameLoad NameLoad NameLoad NameLoad keyword AttributeLoad NameLoad attr keyword TupleLoad ListLoad Num ListLoad Num Num keyword Num keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpSub NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num Num Num Num ListLoad Num Num Num Num Num ListLoad Num Num Num Num Num ListLoad Num Num Num Num Num ListLoad Num Num Num Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num NameLoad keyword Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num NameLoad keyword Str Expr Call NameLoad NameLoad Call AttributeLoad NameLoad attr Num Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num NameLoad keyword Str Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Num Expr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num keyword Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr CompareIs AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Num Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad Call NameLoad NameLoad AttributeLoad NameLoad attr attr Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num Expr Call AttributeLoad NameLoad attr BinOpSub BinOpDiv NameLoad NameLoad Num Num Expr Call AttributeLoad NameLoad attr BinOpSub BinOpDiv NameLoad NameLoad Num Num Expr Call AttributeLoad NameLoad attr Num BinOpSub BinOpDiv NameLoad AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr keyword Str Expr Call NameLoad NameLoad NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr keyword NameLoad Expr Call NameLoad NameLoad NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad NameLoad attr attr keyword Str Expr Call NameLoad NameLoad NameLoad keyword Num decorator_list
N/A N/A Test for short_panel and panel sandwich

Created on Fri May 18 13:05:47 2012

Author: Josef Perktold

moved example from main of random_panel
 N/A numpy np numpy.testing assert_almost_equal N/A numpy.testing npt N/A statsmodels.tools.eval_measures em statsmodels.stats.moment_helpers cov2corr se_cov statsmodels.regression.linear_model OLS statsmodels.sandbox.panel.panel_short ShortPanelGLS ShortPanelGLS2 statsmodels.sandbox.panel.random_panel PanelSample N/A statsmodels.sandbox.panel.correlation_structures cs N/A statsmodels.stats.sandwich_covariance sw assert_maxabs N/A N/A actual expected value N/A N/A N/A N/A N/A npt assert_array_less N/A N/A em maxabs actual expected None value N/A test_short_panel N/A N/A N/A N/A N/A nobs 100 N/A nobs_i 5 N/A n_groups N/A nobs nobs_i N/A k_vars 3 N/A dgp N/A PanelSample nobs k_vars n_groups corr_structure N/A cs corr_arma corr_args N/A N/A 1 N/A 1.0 -0.9 seed 377769 within False N/A y N/A N/A dgp generate_panel N/A noise N/A y N/A dgp y_true N/A dgp_cov_e N/A N/A np array N/A N/A 1.0 0.9 0.81 0.729 0.6561 N/A 0.9 1.0 0.9 0.81 0.729 N/A 0.81 0.9 1.0 0.9 0.81 N/A 0.729 0.81 0.9 1.0 0.9 N/A 0.6561 0.729 0.81 0.9 1.0 N/A N/A N/A npt assert_almost_equal N/A dgp cov dgp_cov_e 13 N/A cov_noise N/A N/A np cov N/A N/A noise reshape -1 n_groups order F N/A corr_noise N/A cov2corr cov_noise N/A N/A N/A npt assert_almost_equal corr_noise N/A dgp cov 1 N/A mod2 N/A ShortPanelGLS y N/A dgp exog N/A dgp groups N/A res2 N/A N/A mod2 fit_iterative 2 N/A corr_wresid N/A N/A np corrcoef N/A N/A N/A res2 wresid reshape -1 n_groups order F N/A N/A assert_maxabs corr_wresid N/A N/A np eye 5 0.1 N/A corr_resid N/A N/A np corrcoef N/A N/A N/A res2 resid reshape -1 n_groups order F N/A N/A assert_maxabs corr_resid N/A dgp cov 0.1 N/A N/A assert_almost_equal N/A N/A N/A res2 resid std 1 decimal 0 N/A y_pred N/A N/A np dot N/A mod2 exog N/A res2 params N/A N/A assert_almost_equal N/A res2 fittedvalues y_pred 13 N/A res2_ols N/A N/A mod2 _fit_ols N/A N/A N/A npt assert_ N/A N/A mod2 res_pooled res2_ols N/A res2_ols N/A mod2 res_pooled N/A mod1 N/A ShortPanelGLS y N/A dgp exog N/A dgp groups N/A res1 N/A N/A mod1 fit_iterative 1 N/A N/A assert_almost_equal N/A res1 params N/A res2_ols params decimal 13 N/A N/A assert_almost_equal N/A res1 bse N/A res2_ols bse decimal 13 N/A res_ols N/A N/A N/A OLS y N/A dgp exog fit N/A N/A assert_almost_equal N/A res1 params N/A res_ols params decimal 13 N/A N/A assert_almost_equal N/A res1 bse N/A res_ols bse decimal 13 N/A mod_old N/A ShortPanelGLS2 y N/A dgp exog N/A dgp groups N/A res_old N/A N/A mod_old fit N/A N/A assert_almost_equal N/A res2 params N/A res_old params decimal 13 N/A N/A assert_almost_equal N/A res2 bse N/A res_old bse decimal 13 N/A mod5 N/A ShortPanelGLS y N/A dgp exog N/A dgp groups N/A res5 N/A N/A mod5 fit_iterative 5 N/A cov_clu N/A N/A sw cov_cluster N/A mod2 res_pooled N/A N/A N/A dgp groups astype int N/A clubse N/A se_cov cov_clu N/A pnwbse N/A se_cov N/A N/A sw cov_nw_panel N/A mod2 res_pooled 4 N/A N/A mod2 group groupidx N/A bser N/A N/A np vstack N/A N/A res2 bse N/A res5 bse clubse pnwbse N/A bser_mean N/A N/A np mean bser axis 0 N/A N/A N/A npt assert_array_less N/A N/A clubse bser_mean 1 0.25 N/A N/A N/A npt assert_array_less N/A N/A pnwbse bser_mean 1 0.1 N/A N/A N/A npt assert_array_less 0.6 N/A N/A bser_mean N/A res_ols bse 1 N/A cov_uni N/A N/A sw cov_nw_panel N/A mod2 res_pooled 4 N/A N/A mod2 group groupidx weights_func N/A sw weights_uniform use_correction c N/A N/A assert_almost_equal cov_uni cov_clu decimal 13 N/A cov_clu2 N/A N/A sw cov_cluster N/A mod2 res_pooled N/A N/A N/A dgp groups astype int use_correction False N/A cov_uni2 N/A N/A sw cov_nw_panel N/A mod2 res_pooled 4 N/A N/A mod2 group groupidx weights_func N/A sw weights_uniform use_correction False N/A N/A assert_almost_equal cov_uni2 cov_clu2 decimal 13 N/A cov_white N/A N/A sw cov_white_simple N/A mod2 res_pooled N/A cov_pnw0 N/A N/A sw cov_nw_panel N/A mod2 res_pooled 0 N/A N/A mod2 group groupidx use_correction hac N/A N/A assert_almost_equal cov_pnw0 cov_white decimal 13 N/A