Expand description
§solow-discrete
Discrete-choice and count regression models estimated by maximum likelihood:
Logit, Probit, and Poisson. Each model is fit with a full Newton
step using analytic log-likelihood, score, and Hessian, converging to the true
optimum so that results agree with the canonical reference to machine precision.
use ndarray::{array, Array2};
use solow_discrete::Logit;
let mut x = Array2::<f64>::ones((5, 2));
x.column_mut(1)
.assign(&array![0.1, -0.4, 1.2, 0.7, -1.1]);
let y = array![0.0, 0.0, 1.0, 1.0, 0.0];
let res = Logit::new(y, x).unwrap().fit().unwrap();
assert!(res.converged);
assert_eq!(res.params.len(), 2);Structs§
- Conditional
Logit - Conditional logistic regression for grouped binary data.
- Conditional
Model - A conditional fixed-effects model awaiting estimation.
- Conditional
Poisson - Conditional Poisson regression for grouped count data.
- Conditional
Results - The fitted result of a conditional fixed-effects model.
- Discrete
Results - The fitted result of a discrete-choice / count model.
- Generalized
Poisson - A generalized Poisson (GP-1) model awaiting estimation.
- Generalized
Poisson Results - The fitted result of a generalized-Poisson (GP-1) model.
- Hurdle
Count Model - A Poisson hurdle count model awaiting estimation.
- Hurdle
Count Results - The fitted result of a Poisson hurdle model.
- Logistic
RegressionCV - Fitted LogisticRegressionCV.
- Logit
- Binary logistic regression:
P(y=1) = 1/(1 + e^{-Xβ}). - MNLogit
- A multinomial logit model awaiting estimation.
- MNLogit
Results - The fitted result of a multinomial logit model.
- Negative
Binomial - A negative-binomial (NB2) model awaiting estimation.
- Negative
Binomial Results - The fitted result of an NB2 negative-binomial model.
- Ordered
Model - An ordinal regression model awaiting estimation.
- Ordered
Results - The fitted result of an ordinal regression model.
- Poisson
- Poisson count regression:
E[y] = e^{Xβ}. - Probit
- Binary probit regression:
P(y=1) = Φ(Xβ). - TruncatedLF
Poisson - A zero-truncated Poisson model awaiting estimation.
- TruncatedLF
Poisson Results - The fitted result of a zero-truncated Poisson model.
- Zero
Inflated Poisson - A zero-inflated Poisson model awaiting estimation.
- Zero
Inflated Poisson Results - The fitted result of a zero-inflated Poisson model.
Enums§
- Distr
- Latent error distribution selecting ordinal logit vs. ordinal probit.