Skip to main content

Crate solow_gee

Crate solow_gee 

Source
Expand description

§solow-gee

Generalized estimating equations (GEE) for clustered / longitudinal data. Mean parameters are estimated by Fisher scoring on the estimating equations under a working within-cluster correlation (CovStruct); inference uses the cluster-robust sandwich covariance (with a model-based “naive” covariance also exposed). Supports the Gaussian, Poisson, and Binomial families with Independence and Exchangeable working correlation. Validated against an authoritative reference.

use ndarray::array;
use solow_gee::{CovStruct, Gee};
use solow_glm::Family;

let x = array![
    [1.0, 0.0], [1.0, 1.0], [1.0, 2.0],
    [1.0, 3.0], [1.0, 4.0], [1.0, 5.0],
];
let y = array![1.0, 2.0, 3.0, 5.0, 8.0, 13.0];
let groups = [0i64, 0, 1, 1, 2, 2];
let res = Gee::new(y, x, &groups, Family::Poisson, CovStruct::Exchangeable)
    .unwrap()
    .fit()
    .unwrap();
assert!(res.converged);

Structs§

CategoricalGeeResults
Fitted results of a categorical (NominalGee / OrdinalGee) GEE.
Gee
A GEE model awaiting estimation.
GeeResults
Fitted GEE results.
NominalGee
A nominal-response (unordered multinomial) marginal GEE awaiting estimation.
OrdinalGee
An ordinal-response (proportional-odds cumulative) marginal GEE awaiting estimation.

Enums§

CategoricalCov
Between-observation working association for categorical GEE.
CovStruct
The within-cluster working correlation structure.