pub struct HeterogeneousData {
pub n_obs: usize,
pub p: usize,
pub support_size: usize,
pub n_x: usize,
pub binary_treatment: bool,
}Expand description
Heterogeneous treatment effects τ(x) = exp(2x₀) + 3 sin(4x₀) (or
3 sin(4x₁) with n_x = 2) on uniform covariates, as
make_heterogeneous_data.
Fields§
§n_obs: usize§p: usizeNumber of covariates.
support_size: usizeCovariates with non-zero coefficients.
n_x: usizeCovariates the effect depends on (1 or 2).
binary_treatment: boolImplementations§
Source§impl HeterogeneousData
impl HeterogeneousData
Sourcepub fn treatment_effect(&self, x: ArrayView2<'_, f64>) -> Array1<f64>
pub fn treatment_effect(&self, x: ArrayView2<'_, f64>) -> Array1<f64>
The treatment effect at covariates x.
pub fn generate(&self, seed: u64) -> Result<HeterogeneousSimulated>
Trait Implementations§
Source§impl Clone for HeterogeneousData
impl Clone for HeterogeneousData
Source§impl Debug for HeterogeneousData
impl Debug for HeterogeneousData
Source§impl Default for HeterogeneousData
impl Default for HeterogeneousData
Source§impl PartialEq for HeterogeneousData
impl PartialEq for HeterogeneousData
impl StructuralPartialEq for HeterogeneousData
Auto Trait Implementations§
impl Freeze for HeterogeneousData
impl RefUnwindSafe for HeterogeneousData
impl Send for HeterogeneousData
impl Sync for HeterogeneousData
impl Unpin for HeterogeneousData
impl UnsafeUnpin for HeterogeneousData
impl UnwindSafe for HeterogeneousData
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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