panelbox 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. panelbox/__init__.py +67 -0
  2. panelbox/__version__.py +14 -0
  3. panelbox/cli/__init__.py +0 -0
  4. panelbox/cli/{commands}/__init__.py +0 -0
  5. panelbox/core/__init__.py +0 -0
  6. panelbox/core/base_model.py +164 -0
  7. panelbox/core/formula_parser.py +318 -0
  8. panelbox/core/panel_data.py +387 -0
  9. panelbox/core/results.py +366 -0
  10. panelbox/datasets/__init__.py +0 -0
  11. panelbox/datasets/{data}/__init__.py +0 -0
  12. panelbox/gmm/__init__.py +65 -0
  13. panelbox/gmm/difference_gmm.py +645 -0
  14. panelbox/gmm/estimator.py +562 -0
  15. panelbox/gmm/instruments.py +580 -0
  16. panelbox/gmm/results.py +550 -0
  17. panelbox/gmm/system_gmm.py +621 -0
  18. panelbox/gmm/tests.py +535 -0
  19. panelbox/models/__init__.py +11 -0
  20. panelbox/models/dynamic/__init__.py +0 -0
  21. panelbox/models/iv/__init__.py +0 -0
  22. panelbox/models/static/__init__.py +13 -0
  23. panelbox/models/static/fixed_effects.py +516 -0
  24. panelbox/models/static/pooled_ols.py +298 -0
  25. panelbox/models/static/random_effects.py +512 -0
  26. panelbox/report/__init__.py +61 -0
  27. panelbox/report/asset_manager.py +410 -0
  28. panelbox/report/css_manager.py +472 -0
  29. panelbox/report/exporters/__init__.py +15 -0
  30. panelbox/report/exporters/html_exporter.py +440 -0
  31. panelbox/report/exporters/latex_exporter.py +510 -0
  32. panelbox/report/exporters/markdown_exporter.py +446 -0
  33. panelbox/report/renderers/__init__.py +11 -0
  34. panelbox/report/renderers/static/__init__.py +0 -0
  35. panelbox/report/renderers/static_validation_renderer.py +341 -0
  36. panelbox/report/report_manager.py +502 -0
  37. panelbox/report/template_manager.py +337 -0
  38. panelbox/report/transformers/__init__.py +0 -0
  39. panelbox/report/transformers/static/__init__.py +0 -0
  40. panelbox/report/validation_transformer.py +449 -0
  41. panelbox/standard_errors/__init__.py +0 -0
  42. panelbox/templates/__init__.py +0 -0
  43. panelbox/templates/assets/css/base_styles.css +382 -0
  44. panelbox/templates/assets/css/report_components.css +747 -0
  45. panelbox/templates/assets/js/tab-navigation.js +161 -0
  46. panelbox/templates/assets/js/utils.js +276 -0
  47. panelbox/templates/common/footer.html +24 -0
  48. panelbox/templates/common/header.html +44 -0
  49. panelbox/templates/common/meta.html +5 -0
  50. panelbox/templates/validation/interactive/index.html +272 -0
  51. panelbox/templates/validation/interactive/partials/charts.html +58 -0
  52. panelbox/templates/validation/interactive/partials/methodology.html +201 -0
  53. panelbox/templates/validation/interactive/partials/overview.html +146 -0
  54. panelbox/templates/validation/interactive/partials/recommendations.html +101 -0
  55. panelbox/templates/validation/interactive/partials/test_results.html +231 -0
  56. panelbox/utils/__init__.py +0 -0
  57. panelbox/utils/formatting.py +172 -0
  58. panelbox/utils/matrix_ops.py +233 -0
  59. panelbox/utils/statistical.py +173 -0
  60. panelbox/validation/__init__.py +58 -0
  61. panelbox/validation/base.py +175 -0
  62. panelbox/validation/cointegration/__init__.py +0 -0
  63. panelbox/validation/cross_sectional_dependence/__init__.py +13 -0
  64. panelbox/validation/cross_sectional_dependence/breusch_pagan_lm.py +222 -0
  65. panelbox/validation/cross_sectional_dependence/frees.py +297 -0
  66. panelbox/validation/cross_sectional_dependence/pesaran_cd.py +188 -0
  67. panelbox/validation/heteroskedasticity/__init__.py +13 -0
  68. panelbox/validation/heteroskedasticity/breusch_pagan.py +222 -0
  69. panelbox/validation/heteroskedasticity/modified_wald.py +172 -0
  70. panelbox/validation/heteroskedasticity/white.py +208 -0
  71. panelbox/validation/instruments/__init__.py +0 -0
  72. panelbox/validation/robustness/__init__.py +0 -0
  73. panelbox/validation/serial_correlation/__init__.py +13 -0
  74. panelbox/validation/serial_correlation/baltagi_wu.py +220 -0
  75. panelbox/validation/serial_correlation/breusch_godfrey.py +260 -0
  76. panelbox/validation/serial_correlation/wooldridge_ar.py +200 -0
  77. panelbox/validation/specification/__init__.py +16 -0
  78. panelbox/validation/specification/chow.py +273 -0
  79. panelbox/validation/specification/hausman.py +264 -0
  80. panelbox/validation/specification/mundlak.py +331 -0
  81. panelbox/validation/specification/reset.py +273 -0
  82. panelbox/validation/unit_root/__init__.py +0 -0
  83. panelbox/validation/validation_report.py +257 -0
  84. panelbox/validation/validation_suite.py +401 -0
  85. panelbox-0.2.0.dist-info/METADATA +337 -0
  86. panelbox-0.2.0.dist-info/RECORD +90 -0
  87. panelbox-0.2.0.dist-info/WHEEL +5 -0
  88. panelbox-0.2.0.dist-info/entry_points.txt +2 -0
  89. panelbox-0.2.0.dist-info/licenses/LICENSE +21 -0
  90. panelbox-0.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,272 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ {% include 'common/meta.html' %}
5
+
6
+ <!-- Embedded CSS -->
7
+ <style>
8
+ {{ css_inline|safe }}
9
+ </style>
10
+ </head>
11
+ <body>
12
+ <div class="report-container">
13
+ <!-- Header -->
14
+ {% include 'common/header.html' %}
15
+
16
+ <!-- Validation Summary Dashboard -->
17
+ <section class="report-section">
18
+ <h2 class="section-title">Validation Summary</h2>
19
+
20
+ <div class="metric-grid">
21
+ <div class="metric-card">
22
+ <div class="metric-label">Total Tests</div>
23
+ <div class="metric-value">{{ summary.total_tests }}</div>
24
+ </div>
25
+
26
+ <div class="metric-card">
27
+ <div class="metric-label">Tests Passed</div>
28
+ <div class="metric-value text-success">{{ summary.total_passed }}</div>
29
+ </div>
30
+
31
+ <div class="metric-card">
32
+ <div class="metric-label">Tests Failed</div>
33
+ <div class="metric-value text-danger">{{ summary.total_failed }}</div>
34
+ </div>
35
+
36
+ <div class="metric-card">
37
+ <div class="metric-label">Pass Rate</div>
38
+ <div class="metric-value">{{ summary.pass_rate_formatted }}</div>
39
+ <div class="metric-progress">
40
+ <div class="metric-progress-bar"
41
+ style="width: {{ summary.pass_rate }}%;
42
+ background-color: {% if summary.pass_rate >= 80 %}var(--success){% elif summary.pass_rate >= 60 %}var(--warning){% else %}var(--danger){% endif %};">
43
+ </div>
44
+ </div>
45
+ </div>
46
+ </div>
47
+
48
+ <!-- Overall Status Alert -->
49
+ {% if summary.has_issues %}
50
+ <div class="alert alert-{{ summary.overall_status }} mt-4">
51
+ <strong>{{ summary.status_message }}</strong>
52
+ <p class="mt-2">Review the test results and recommendations below to address detected issues.</p>
53
+ </div>
54
+ {% else %}
55
+ <div class="alert alert-success mt-4">
56
+ <strong>{{ summary.status_message }}</strong>
57
+ <p class="mt-2">Your panel data model has passed all validation tests.</p>
58
+ </div>
59
+ {% endif %}
60
+ </section>
61
+
62
+ <!-- Tab Navigation -->
63
+ <div class="tab-container" id="validation-tabs">
64
+ <div class="tab-buttons">
65
+ <button class="tab-button active" data-tab="overview-tab">
66
+ Overview
67
+ </button>
68
+ <button class="tab-button" data-tab="results-tab">
69
+ Test Results
70
+ </button>
71
+ <button class="tab-button" data-tab="charts-tab">
72
+ Visualizations
73
+ </button>
74
+ {% if recommendations %}
75
+ <button class="tab-button" data-tab="recommendations-tab">
76
+ Recommendations
77
+ <span class="badge badge-warning">{{ recommendations|length }}</span>
78
+ </button>
79
+ {% endif %}
80
+ <button class="tab-button" data-tab="methodology-tab">
81
+ Methodology
82
+ </button>
83
+ </div>
84
+
85
+ <!-- Tab Contents -->
86
+ <div class="tab-contents">
87
+
88
+ <!-- Overview Tab -->
89
+ <div id="overview-tab" class="tab-content active">
90
+ {% include 'validation/interactive/partials/overview.html' %}
91
+ </div>
92
+
93
+ <!-- Test Results Tab -->
94
+ <div id="results-tab" class="tab-content">
95
+ {% include 'validation/interactive/partials/test_results.html' %}
96
+ </div>
97
+
98
+ <!-- Charts Tab -->
99
+ <div id="charts-tab" class="tab-content">
100
+ {% include 'validation/interactive/partials/charts.html' %}
101
+ </div>
102
+
103
+ <!-- Recommendations Tab -->
104
+ {% if recommendations %}
105
+ <div id="recommendations-tab" class="tab-content">
106
+ {% include 'validation/interactive/partials/recommendations.html' %}
107
+ </div>
108
+ {% endif %}
109
+
110
+ <!-- Methodology Tab -->
111
+ <div id="methodology-tab" class="tab-content">
112
+ {% include 'validation/interactive/partials/methodology.html' %}
113
+ </div>
114
+
115
+ </div>
116
+ </div>
117
+
118
+ <!-- Footer -->
119
+ {% include 'common/footer.html' %}
120
+ </div>
121
+
122
+ <!-- Plotly.js -->
123
+ {{ plotly_js|safe }}
124
+
125
+ <!-- Embedded JavaScript -->
126
+ <script>
127
+ {{ js_inline|safe }}
128
+ </script>
129
+
130
+ <!-- Chart Rendering Script -->
131
+ <script>
132
+ // Initialize tabs
133
+ document.addEventListener('DOMContentLoaded', function() {
134
+ PanelBoxTabs.init('validation-tabs');
135
+
136
+ // Render charts
137
+ renderCharts();
138
+ });
139
+
140
+ function renderCharts() {
141
+ {% if charts %}
142
+ // Test Overview Bar Chart
143
+ if (document.getElementById('chart-test-overview')) {
144
+ const testOverviewData = [
145
+ {
146
+ x: {{ charts.test_overview.categories|tojson }},
147
+ y: {{ charts.test_overview.passed|tojson }},
148
+ name: 'Passed',
149
+ type: 'bar',
150
+ marker: { color: '#10b981' }
151
+ },
152
+ {
153
+ x: {{ charts.test_overview.categories|tojson }},
154
+ y: {{ charts.test_overview.failed|tojson }},
155
+ name: 'Failed',
156
+ type: 'bar',
157
+ marker: { color: '#ef4444' }
158
+ }
159
+ ];
160
+
161
+ const testOverviewLayout = {
162
+ title: 'Test Results by Category',
163
+ barmode: 'stack',
164
+ xaxis: { title: 'Test Category' },
165
+ yaxis: { title: 'Number of Tests' },
166
+ hovermode: 'closest',
167
+ font: { family: 'var(--font-sans)' }
168
+ };
169
+
170
+ Plotly.newPlot('chart-test-overview', testOverviewData, testOverviewLayout, {responsive: true});
171
+ }
172
+
173
+ // P-value Distribution
174
+ if (document.getElementById('chart-pvalue-dist')) {
175
+ const pvalueData = [{
176
+ x: {{ charts.pvalue_distribution.test_names|tojson }},
177
+ y: {{ charts.pvalue_distribution.pvalues|tojson }},
178
+ type: 'bar',
179
+ marker: {
180
+ color: {{ charts.pvalue_distribution.pvalues|tojson }},
181
+ colorscale: [
182
+ [0, '#ef4444'],
183
+ [0.05, '#f59e0b'],
184
+ [0.1, '#eab308'],
185
+ [1, '#10b981']
186
+ ],
187
+ cmin: 0,
188
+ cmax: 0.2
189
+ },
190
+ text: {{ charts.pvalue_distribution.pvalues|tojson }},
191
+ texttemplate: '%{text:.4f}',
192
+ textposition: 'outside'
193
+ }];
194
+
195
+ const pvalueLayout = {
196
+ title: 'P-values by Test',
197
+ xaxis: {
198
+ title: 'Test Name',
199
+ tickangle: -45
200
+ },
201
+ yaxis: {
202
+ title: 'P-value',
203
+ type: 'log'
204
+ },
205
+ shapes: [
206
+ // Significance level lines
207
+ {
208
+ type: 'line',
209
+ x0: -0.5,
210
+ x1: {{ charts.pvalue_distribution.test_names|length }} - 0.5,
211
+ y0: 0.05,
212
+ y1: 0.05,
213
+ line: { color: 'red', width: 2, dash: 'dash' }
214
+ },
215
+ {
216
+ type: 'line',
217
+ x0: -0.5,
218
+ x1: {{ charts.pvalue_distribution.test_names|length }} - 0.5,
219
+ y0: 0.01,
220
+ y1: 0.01,
221
+ line: { color: 'darkred', width: 1, dash: 'dot' }
222
+ }
223
+ ],
224
+ annotations: [
225
+ {
226
+ x: 0,
227
+ y: 0.05,
228
+ text: 'α = 0.05',
229
+ showarrow: false,
230
+ xanchor: 'left',
231
+ yanchor: 'bottom'
232
+ }
233
+ ],
234
+ hovermode: 'closest',
235
+ font: { family: 'var(--font-sans)' }
236
+ };
237
+
238
+ Plotly.newPlot('chart-pvalue-dist', pvalueData, pvalueLayout, {responsive: true});
239
+ }
240
+
241
+ // Test Statistics
242
+ if (document.getElementById('chart-test-stats')) {
243
+ const statsData = [{
244
+ x: {{ charts.test_statistics.test_names|tojson }},
245
+ y: {{ charts.test_statistics.statistics|tojson }},
246
+ type: 'scatter',
247
+ mode: 'markers',
248
+ marker: {
249
+ size: 12,
250
+ color: '#2563eb',
251
+ line: { width: 1, color: '#1e40af' }
252
+ }
253
+ }];
254
+
255
+ const statsLayout = {
256
+ title: 'Test Statistics',
257
+ xaxis: {
258
+ title: 'Test Name',
259
+ tickangle: -45
260
+ },
261
+ yaxis: { title: 'Test Statistic' },
262
+ hovermode: 'closest',
263
+ font: { family: 'var(--font-sans)' }
264
+ };
265
+
266
+ Plotly.newPlot('chart-test-stats', statsData, statsLayout, {responsive: true});
267
+ }
268
+ {% endif %}
269
+ }
270
+ </script>
271
+ </body>
272
+ </html>
@@ -0,0 +1,58 @@
1
+ <section class="report-section">
2
+ <h3 class="section-subtitle">Interactive Visualizations</h3>
3
+
4
+ <p class="text-muted mb-6">
5
+ Explore validation test results through interactive charts. Hover over data points for detailed information,
6
+ zoom in/out, and pan to focus on specific areas of interest.
7
+ </p>
8
+
9
+ <!-- Test Overview Chart -->
10
+ <div class="chart-section mb-8">
11
+ <h4 class="chart-title">Test Results by Category</h4>
12
+ <p class="chart-description">
13
+ Stacked bar chart showing the number of passed and failed tests in each category.
14
+ </p>
15
+ <div class="chart-container">
16
+ <div id="chart-test-overview" class="chart-plot"></div>
17
+ </div>
18
+ </div>
19
+
20
+ <!-- P-value Distribution Chart -->
21
+ <div class="chart-section mb-8">
22
+ <h4 class="chart-title">P-value Distribution</h4>
23
+ <p class="chart-description">
24
+ Distribution of p-values across all tests (log scale). Tests with p-values below the significance
25
+ threshold (α = 0.05) indicate potential issues.
26
+ </p>
27
+ <div class="chart-container">
28
+ <div id="chart-pvalue-dist" class="chart-plot"></div>
29
+ </div>
30
+ <div class="chart-note mt-2">
31
+ <strong>Note:</strong> The red dashed line represents the 5% significance level (α = 0.05).
32
+ Tests below this line reject the null hypothesis.
33
+ </div>
34
+ </div>
35
+
36
+ <!-- Test Statistics Chart -->
37
+ <div class="chart-section mb-8">
38
+ <h4 class="chart-title">Test Statistics</h4>
39
+ <p class="chart-description">
40
+ Scatter plot of test statistics for all validation tests. Each point represents a test result.
41
+ </p>
42
+ <div class="chart-container">
43
+ <div id="chart-test-stats" class="chart-plot"></div>
44
+ </div>
45
+ </div>
46
+
47
+ <!-- Chart Instructions -->
48
+ <div class="info-box mt-6">
49
+ <h4 class="info-box-title">Chart Interactions</h4>
50
+ <ul class="info-box-list">
51
+ <li><strong>Hover:</strong> Move your mouse over data points to see detailed information</li>
52
+ <li><strong>Zoom:</strong> Click and drag to zoom into a region, or use the zoom buttons</li>
53
+ <li><strong>Pan:</strong> After zooming, click and drag to pan around</li>
54
+ <li><strong>Reset:</strong> Click the "Reset axes" button to restore the original view</li>
55
+ <li><strong>Export:</strong> Use the camera icon to download the chart as a PNG image</li>
56
+ </ul>
57
+ </div>
58
+ </section>
@@ -0,0 +1,201 @@
1
+ <section class="report-section">
2
+ <h3 class="section-subtitle">Validation Methodology</h3>
3
+
4
+ <p class="text-muted mb-6">
5
+ This section provides technical details about the validation tests performed on your panel data model.
6
+ Each test is designed to detect specific violations of panel data assumptions.
7
+ </p>
8
+
9
+ <!-- Specification Tests -->
10
+ <div class="methodology-section mb-8">
11
+ <h4 class="methodology-title">Specification Tests</h4>
12
+
13
+ <div class="test-methodology">
14
+ <h5 class="test-method-name">Hausman Test</h5>
15
+ <p class="test-method-description">
16
+ Tests the null hypothesis that Random Effects estimates are consistent. Rejection suggests
17
+ systematic differences between FE and RE estimates, favoring Fixed Effects.
18
+ </p>
19
+ <div class="test-method-details">
20
+ <p><strong>Test Statistic:</strong> H = (β<sub>FE</sub> - β<sub>RE</sub>)' [Var(β<sub>FE</sub>) - Var(β<sub>RE</sub>)]<sup>-1</sup> (β<sub>FE</sub> - β<sub>RE</sub>)</p>
21
+ <p><strong>Distribution:</strong> χ² with K degrees of freedom</p>
22
+ <p><strong>Interpretation:</strong> If p-value < 0.05, use Fixed Effects</p>
23
+ </div>
24
+ </div>
25
+
26
+ <div class="test-methodology">
27
+ <h5 class="test-method-name">Mundlak Test</h5>
28
+ <p class="test-method-description">
29
+ Alternative to Hausman test based on auxiliary regression. Tests whether entity means of
30
+ time-varying regressors are correlated with the unobserved effect.
31
+ </p>
32
+ <div class="test-method-details">
33
+ <p><strong>Approach:</strong> Estimate Random Effects including entity means of X as additional regressors</p>
34
+ <p><strong>Test Statistic:</strong> Wald test on coefficients of entity means</p>
35
+ <p><strong>Interpretation:</strong> Rejection indicates correlation, favoring Fixed Effects</p>
36
+ </div>
37
+ </div>
38
+ </div>
39
+
40
+ <!-- Serial Correlation Tests -->
41
+ <div class="methodology-section mb-8">
42
+ <h4 class="methodology-title">Serial Correlation Tests</h4>
43
+
44
+ <div class="test-methodology">
45
+ <h5 class="test-method-name">Wooldridge Test</h5>
46
+ <p class="test-method-description">
47
+ Tests for first-order autocorrelation in panel data models. Specifically designed for
48
+ Fixed Effects models with small T.
49
+ </p>
50
+ <div class="test-method-details">
51
+ <p><strong>Null Hypothesis:</strong> No first-order autocorrelation</p>
52
+ <p><strong>Test Statistic:</strong> F-test on correlation of lagged residuals</p>
53
+ <p><strong>Distribution:</strong> F(1, N-1)</p>
54
+ </div>
55
+ </div>
56
+
57
+ <div class="test-methodology">
58
+ <h5 class="test-method-name">Baltagi-Wu Test</h5>
59
+ <p class="test-method-description">
60
+ Durbin-Watson analogue for panel data. Tests for serial correlation in the idiosyncratic
61
+ error component.
62
+ </p>
63
+ <div class="test-method-details">
64
+ <p><strong>Test Statistic:</strong> BW = Σ<sub>i</sub>Σ<sub>t</sub>(ê<sub>it</sub> - ê<sub>i,t-1</sub>)² / Σ<sub>i</sub>Σ<sub>t</sub>ê<sub>it</sub>²</p>
65
+ <p><strong>Range:</strong> 0 to 4 (2 indicates no autocorrelation)</p>
66
+ </div>
67
+ </div>
68
+ </div>
69
+
70
+ <!-- Heteroskedasticity Tests -->
71
+ <div class="methodology-section mb-8">
72
+ <h4 class="methodology-title">Heteroskedasticity Tests</h4>
73
+
74
+ <div class="test-methodology">
75
+ <h5 class="test-method-name">Breusch-Pagan LM Test</h5>
76
+ <p class="test-method-description">
77
+ Tests for heteroskedasticity in panel data residuals. Detects whether error variance
78
+ depends on explanatory variables.
79
+ </p>
80
+ <div class="test-method-details">
81
+ <p><strong>Null Hypothesis:</strong> Homoskedastic errors</p>
82
+ <p><strong>Approach:</strong> Regress squared residuals on regressors</p>
83
+ <p><strong>Test Statistic:</strong> LM = N·R² ~ χ²(K)</p>
84
+ </div>
85
+ </div>
86
+
87
+ <div class="test-methodology">
88
+ <h5 class="test-method-name">Modified Wald Test</h5>
89
+ <p class="test-method-description">
90
+ Tests for groupwise heteroskedasticity in Fixed Effects models. Allows variance to differ
91
+ across entities.
92
+ </p>
93
+ <div class="test-method-details">
94
+ <p><strong>Null Hypothesis:</strong> σ²<sub>1</sub> = σ²<sub>2</sub> = ... = σ²<sub>N</sub></p>
95
+ <p><strong>Test Statistic:</strong> Wald statistic ~ χ²(N)</p>
96
+ </div>
97
+ </div>
98
+ </div>
99
+
100
+ <!-- Cross-Sectional Dependence Tests -->
101
+ <div class="methodology-section mb-8">
102
+ <h4 class="methodology-title">Cross-Sectional Dependence Tests</h4>
103
+
104
+ <div class="test-methodology">
105
+ <h5 class="test-method-name">Pesaran CD Test</h5>
106
+ <p class="test-method-description">
107
+ Tests for weak cross-sectional dependence in large panels. Robust to non-stationarity
108
+ and structural breaks.
109
+ </p>
110
+ <div class="test-method-details">
111
+ <p><strong>Test Statistic:</strong> CD = √(2T/(N(N-1))) Σ<sub>i&lt;j</sub> ρ̂<sub>ij</sub></p>
112
+ <p><strong>Distribution:</strong> N(0,1) asymptotically</p>
113
+ <p><strong>Advantages:</strong> Valid for large N, valid for dynamic models</p>
114
+ </div>
115
+ </div>
116
+
117
+ <div class="test-methodology">
118
+ <h5 class="test-method-name">Frees Test</h5>
119
+ <p class="test-method-description">
120
+ Nonparametric test for cross-sectional independence. Based on squared rank correlation
121
+ of residuals across entities.
122
+ </p>
123
+ <div class="test-method-details">
124
+ <p><strong>Null Hypothesis:</strong> No cross-sectional correlation</p>
125
+ <p><strong>Test Statistic:</strong> Frees = T·mean(R²<sub>ij</sub>) where R is rank correlation</p>
126
+ <p><strong>Critical values:</strong> Tabulated by Frees (1995, 2004)</p>
127
+ </div>
128
+ </div>
129
+ </div>
130
+
131
+ <!-- Interpretation Guidelines -->
132
+ <div class="guidelines-box mt-8">
133
+ <h4 class="guidelines-title">Interpretation Guidelines</h4>
134
+
135
+ <div class="guideline-item">
136
+ <h5>Significance Levels</h5>
137
+ <p>
138
+ Tests use standard significance levels: 1% (***), 5% (**), 10% (*). A p-value below the
139
+ chosen significance level (typically 5%) leads to rejection of the null hypothesis.
140
+ </p>
141
+ </div>
142
+
143
+ <div class="guideline-item">
144
+ <h5>Multiple Testing</h5>
145
+ <p>
146
+ When conducting multiple tests, consider adjusting significance levels (e.g., Bonferroni correction)
147
+ to control for family-wise error rate. However, validation tests are typically exploratory,
148
+ so strict corrections may be overly conservative.
149
+ </p>
150
+ </div>
151
+
152
+ <div class="guideline-item">
153
+ <h5>Sample Size Considerations</h5>
154
+ <p>
155
+ Some tests have low power in small samples. With large N or T, even minor deviations from
156
+ assumptions may be detected as statistically significant. Always consider economic significance
157
+ alongside statistical significance.
158
+ </p>
159
+ </div>
160
+
161
+ <div class="guideline-item">
162
+ <h5>Remedial Actions</h5>
163
+ <p>
164
+ Failing a test doesn't necessarily invalidate your model. Many violations can be addressed
165
+ through robust standard errors, alternative estimators, or model re-specification. Consult
166
+ the Recommendations tab for specific guidance.
167
+ </p>
168
+ </div>
169
+ </div>
170
+
171
+ <!-- Technical References -->
172
+ <div class="references-box mt-6">
173
+ <h4 class="references-title">Technical References</h4>
174
+ <ul class="references-list">
175
+ <li>
176
+ Baltagi, B. H., & Wu, P. X. (1999). Unequally Spaced Panel Data Regressions with AR(1) Disturbances.
177
+ <em>Econometric Theory</em>, 15(6), 814-823.
178
+ </li>
179
+ <li>
180
+ Frees, E. W. (1995). Assessing Cross-Sectional Correlation in Panel Data.
181
+ <em>Journal of Econometrics</em>, 69(2), 393-414.
182
+ </li>
183
+ <li>
184
+ Hausman, J. A. (1978). Specification Tests in Econometrics.
185
+ <em>Econometrica</em>, 46(6), 1251-1271.
186
+ </li>
187
+ <li>
188
+ Mundlak, Y. (1978). On the Pooling of Time Series and Cross Section Data.
189
+ <em>Econometrica</em>, 46(1), 69-85.
190
+ </li>
191
+ <li>
192
+ Pesaran, M. H. (2004). General Diagnostic Tests for Cross Section Dependence in Panels.
193
+ <em>Cambridge Working Papers in Economics</em>, 0435.
194
+ </li>
195
+ <li>
196
+ Wooldridge, J. M. (2002). <em>Econometric Analysis of Cross Section and Panel Data</em>.
197
+ MIT Press.
198
+ </li>
199
+ </ul>
200
+ </div>
201
+ </section>