pub struct RdData<'a> {
pub y: ArrayView1<'a, f64>,
pub x: ArrayView1<'a, f64>,
pub cutoff: f64,
pub fuzzy: Option<ArrayView1<'a, f64>>,
pub covs: Option<ArrayView2<'a, f64>>,
pub cluster: Option<&'a [i64]>,
}Expand description
Data of an RD design: outcome y, running variable x and cutoff, and
optionally the treatment (fuzzy design), covariates and cluster labels.
Fields§
§y: ArrayView1<'a, f64>§x: ArrayView1<'a, f64>§cutoff: f64§fuzzy: Option<ArrayView1<'a, f64>>§covs: Option<ArrayView2<'a, f64>>§cluster: Option<&'a [i64]>Implementations§
Source§impl<'a> RdData<'a>
impl<'a> RdData<'a>
Sourcepub fn new(y: ArrayView1<'a, f64>, x: ArrayView1<'a, f64>) -> Self
pub fn new(y: ArrayView1<'a, f64>, x: ArrayView1<'a, f64>) -> Self
A sharp design with cutoff 0.
pub fn cutoff(self, c: f64) -> Self
Sourcepub fn fuzzy(self, t: ArrayView1<'a, f64>) -> Self
pub fn fuzzy(self, t: ArrayView1<'a, f64>) -> Self
Fuzzy design with treatment t.
Sourcepub fn covariates(self, z: ArrayView2<'a, f64>) -> Self
pub fn covariates(self, z: ArrayView2<'a, f64>) -> Self
Covariates for covariate-adjusted estimation (rdrobust’s covs).
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for RdData<'a>
impl<'a> RefUnwindSafe for RdData<'a>
impl<'a> Send for RdData<'a>
impl<'a> Sync for RdData<'a>
impl<'a> Unpin for RdData<'a>
impl<'a> UnsafeUnpin for RdData<'a>
impl<'a> UnwindSafe for RdData<'a>
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