pub struct DmlFit { /* private fields */ }Expand description
A fitted DML model: estimates, standard errors and the per-repetition scores and nuisance predictions behind them.
Arrays indexed by treatment have length k = n_treat; per-repetition
arrays have shape (k, n_rep).
Implementations§
Source§impl DmlFit
impl DmlFit
Source§impl DmlFit
impl DmlFit
pub fn model_name(&self) -> &str
pub fn treatment_names(&self) -> &[String]
pub fn n_obs(&self) -> usize
pub fn n_treat(&self) -> usize
pub fn n_rep(&self) -> usize
pub fn n_folds(&self) -> usize
Sourcepub fn coef(&self) -> ArrayView1<'_, f64>
pub fn coef(&self) -> ArrayView1<'_, f64>
Point estimates θ̂ (median over repetitions).
Sourcepub fn se(&self) -> ArrayView1<'_, f64>
pub fn se(&self) -> ArrayView1<'_, f64>
Standard errors (aggregated over repetitions).
pub fn t_stat(&self) -> Array1<f64>
Sourcepub fn p_value(&self) -> Array1<f64>
pub fn p_value(&self) -> Array1<f64>
Two-sided p-values for H0: θ = 0 from the aggregated t-statistic,
as DoubleML’s pval. (Multiple-testing adjustments in
p_adjust instead take the median over repetitions.)
Sourcepub fn confint(&self, level: f64) -> Result<Array2<f64>>
pub fn confint(&self, level: f64) -> Result<Array2<f64>>
Pointwise Wald confidence intervals at level, shape (k, 2)
(median over repetitions of each repetition’s interval).
Sourcepub fn p_adjust(&self, method: PAdjust) -> Array1<f64>
pub fn p_adjust(&self, method: PAdjust) -> Array1<f64>
Multiple-testing adjusted p-values across treatments (applied per
repetition, then the median is taken). For the bootstrap-based
Romano–Wolf procedure see Bootstrap::romano_wolf.
Sourcepub fn all_coef(&self) -> ArrayView2<'_, f64>
pub fn all_coef(&self) -> ArrayView2<'_, f64>
Estimates for every repetition, shape (k, n_rep).
pub fn all_se(&self) -> ArrayView2<'_, f64>
Sourcepub fn psi(&self) -> ArrayView3<'_, f64>
pub fn psi(&self) -> ArrayView3<'_, f64>
Score values ψ at θ̂, shape (n, k, n_rep).
Sourcepub fn psi_elements(&self) -> (ArrayView3<'_, f64>, ArrayView3<'_, f64>)
pub fn psi_elements(&self) -> (ArrayView3<'_, f64>, ArrayView3<'_, f64>)
Score elements ψ_a and ψ_b (ψ = ψ_a·θ + ψ_b), shape (n, k, n_rep).
Sourcepub fn cate(&self, basis: ArrayView2<'_, f64>) -> Result<Blp>
pub fn cate(&self, basis: ArrayView2<'_, f64>) -> Result<Blp>
Best linear predictor of the CATE on basis (shape (n, p), include a
constant column for an intercept), using the orthogonal signal ψ_b.
Valid for scores with ψ_a = −1, i.e. Irm with the ATE score.
Sourcepub fn gate(&self, groups: ArrayView2<'_, f64>) -> Result<Blp>
pub fn gate(&self, groups: ArrayView2<'_, f64>) -> Result<Blp>
Group average treatment effects for mutually exclusive groups given as
0/1 dummy columns (shape (n, n_groups)).
Sourcepub fn nuisance_names(&self) -> impl Iterator<Item = &str>
pub fn nuisance_names(&self) -> impl Iterator<Item = &str>
Names of the stored nuisance predictions (e.g. ml_l, ml_m).
Sourcepub fn predictions(&self, name: &str) -> Option<ArrayView3<'_, f64>>
pub fn predictions(&self, name: &str) -> Option<ArrayView3<'_, f64>>
All predictions of one nuisance, shape (n, n_rep, k).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DmlFit
impl RefUnwindSafe for DmlFit
impl Send for DmlFit
impl Sync for DmlFit
impl Unpin for DmlFit
impl UnsafeUnpin for DmlFit
impl UnwindSafe for DmlFit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more