The "censored-continuous" Class, the "truncated-continuous" Class and Inherited Classes
The censored-continuous class and the truncated-continuous class are both virtual and both inherit from the continuous-class
and each is the parent of four classes that differ depending on whether the lower and upper bounds are numeric vectors or functions. A
censored observation is one whose exact value is not observed. A truncated observation is one whose exact value is not observed and which
implies that values on some other variables are not observed for that unit of observation. An example of truncation might be that
some taxation forms are not required when a person's income falls below a certain threshold. The methods for these classes are not
working yet. Aside from these facts, the rest of the documentation here is primarily directed toward developeRs.
Both the censored-continuous class and the truncated-continuous class are virtual, so no objects can be
created with these classes. However, the missing_variable
generic function can be used to create an object that inherits
from one of their subclasses by specifying type = "NNcensored-continuous"
, type = "NFcensored-continuous"
,
type = "FNcensored-continuous"
, type = "FFcensored-continuous"
, type = "NNtruncated-continuous"
, type = "NFtruncated-continuous"
,
type = "FNtruncated-continuous"
, type = "FFtruncated-continuous"
. When doing so, the lower and upper slots need to be
specified appropriately.
The censored-continuous class and the truncated-continuous class are both virtual, both inherit from the continuous class, both use the identity transformation by default, and both have two additional slots:
The upper bound for each observation
The lower bound for each observation
Both the censored-continuous class and the truncated-continuous class have four subclasses that differ depending
on whether the upper and / or lower bounds are numeric vectors or functions that output numeric
vectors (scalars are recycled and can be Inf
). These subclasses are
where both the lower and upper bounds are numeric vectors
where the lower bound is a function and the upper bound is a numeric vector
where the lower bound is a numeric vector and the upper bound is a function
where both the lower and upper bounds are functions
where both the lower and upper bounds are numeric vectors
where the lower bound is a function and the upper bound is a numeric vector
where the lower bound is a numeric vector and the upper bound is a function
where both the lower and upper bounds are functions
Ben Goodrich, for this version, based on earlier versions written by Yu-Sung Su, Masanao Yajima, Maria Grazia Pittau, Jennifer Hill, and Andrew Gelman.
# STEP 0: GET DATA data(CHAIN, package = "mi") # STEP 0.5 CREATE A missing_variable (you never need to actually do this) #log_virus <- missing_variable(CHAIN$log_virus, type = "NN_censored-continuous", # lower = 0, upper = Inf) #show(log_virus)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.