1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! # solow-summary
//!
//! Labeled regression-results summary tables for Solow models -- the rendered,
//! human-readable companion to a fitted model's numeric results.
//!
//! The crate is deliberately model-agnostic: a [`RegressionSummary`] is built
//! from plain values (parameter names, estimates, standard errors, test
//! statistics, p-values, confidence intervals, and a set of header
//! statistics), so the results of *any* estimator can be rendered without this
//! crate depending on that estimator's crate.
//!
//! ## Layout
//!
//! A summary renders as two stacked fixed-width text blocks:
//!
//! 1. a **header block** of key statistics, and
//! 2. a **coefficient table** with columns `coef`, `std err`, the test
//! statistic (`t` or `z`), the corresponding p-value, and the lower/upper
//! confidence-interval bounds.
//!
//! Both blocks are produced by the general [`SummaryTable`] type, which lays
//! out titled, optionally-headered, row-based tables with right-aligned
//! (or per-column left-aligned) fixed-width columns.
//!
//! The *visual layout* here is Solow's own. Only the displayed *numbers* are
//! cross-checked against a reference implementation (see the crate's
//! `tests/reference.rs`).
//!
//! ## Example
//!
//! ```
//! use solow_summary::{HeaderStats, RegressionSummary};
//!
//! let names = ["const", "x1"];
//! let params = [1.5, -2.0];
//! let bse = [0.07, 0.08];
//! let tvalues = [21.4, -25.0];
//! let pvalues = [1e-20, 1e-22];
//! let conf_int = [(1.35, 1.65), (-2.16, -1.84)];
//!
//! let header = HeaderStats {
//! model: Some("OLS".into()),
//! nobs: Some(40.0),
//! rsquared: Some(0.95),
//! aic: Some(45.9),
//! bic: Some(51.0),
//! ..HeaderStats::new()
//! };
//!
//! let summary =
//! RegressionSummary::new(&names, ¶ms, &bse, &tvalues, &pvalues, &conf_int, header);
//! let text = summary.to_string();
//! assert!(text.contains("R-squared:"));
//! assert!(text.contains("const"));
//! ```
pub use ;
pub use ;
pub use ;