Title: | Censored Distributions for 'greta' |
---|---|
Description: | Provides additional censored distributions for use with 'greta', a probabilistic programming framework for Bayesian modeling. Includes censored versions of Normal, Log-Normal, Student's T, Gamma, Exponential, Weibull, Pareto, and Beta distributions with support for right, left, and interval censoring. For details on 'greta', see Golding (2019) <doi:10.21105/joss.01601>. The methods are implemented using 'TensorFlow' and 'TensorFlow Probability' for efficient computation. |
Authors: | Mlen-Too Wesley [aut, cre] |
Maintainer: | Mlen-Too Wesley <[email protected]> |
License: | Apache License 2.0 |
Version: | 0.1.0 |
Built: | 2024-11-29 13:56:09 UTC |
Source: | CRAN |
Creates a censored beta distribution for use with greta.
beta_censored( alpha, beta, is_censored, censor = "right", lower = NULL, upper = NULL, dim = length(is_censored) )
beta_censored( alpha, beta, is_censored, censor = "right", lower = NULL, upper = NULL, dim = length(is_censored) )
alpha |
Shape parameter for successes. |
beta |
Shape parameter for failures. |
is_censored |
Logical vector indicating whether each observation is censored. |
censor |
Type of censoring: one of 'right', 'left', 'interval'. |
lower |
Lower bound for interval censoring (optional). |
upper |
Upper bound for interval censoring (optional). |
dim |
Dimension of the data (optional, defaults to length of |
A greta censored beta distribution node.
Creates a censored exponential distribution for use with greta.
exponential_censored( rate, is_censored, censor = "right", lower = NULL, upper = NULL, dim = length(is_censored) )
exponential_censored( rate, is_censored, censor = "right", lower = NULL, upper = NULL, dim = length(is_censored) )
rate |
Rate parameter of the exponential distribution. |
is_censored |
Logical vector indicating whether each observation is censored. |
censor |
Type of censoring: one of 'right', 'left', 'interval'. |
lower |
Lower bound for interval censoring (optional). |
upper |
Upper bound for interval censoring (optional). |
dim |
Dimension of the data (optional, defaults to length of |
A greta censored exponential distribution node.
Creates a censored gamma distribution for use with greta.
gamma_censored( shape, rate, is_censored, censor = "right", lower = NULL, upper = NULL, dim = length(is_censored) )
gamma_censored( shape, rate, is_censored, censor = "right", lower = NULL, upper = NULL, dim = length(is_censored) )
shape |
Shape parameter of the gamma distribution. |
rate |
Rate parameter of the gamma distribution (reciprocal of scale). |
is_censored |
Logical vector indicating whether each observation is censored. |
censor |
Type of censoring: one of 'right', 'left', 'interval'. |
lower |
Lower bound for interval censoring (optional). |
upper |
Upper bound for interval censoring (optional). |
dim |
Dimension of the data (optional, defaults to length of |
A greta censored gamma distribution node.
Provides additional censored distributions for use with Greta, a probabilistic programming framework for Bayesian modeling. Includes censored versions of Normal, Log-Normal, Student's t, Gamma, Exponential, Weibull, Pareto, and Beta distributions with support for right, left, and interval censoring.
Maintainer: Mlen-Too Wesley [email protected]
Useful links:
Report bugs at https://github.com/mtwesley/greta.censored/issues
# add a simple example here to introduce the package!
# add a simple example here to introduce the package!
Creates a censored log-normal distribution for use with greta.
lognormal_censored( meanlog, sdlog, is_censored, censor = "right", lower = NULL, upper = NULL, dim = length(is_censored) )
lognormal_censored( meanlog, sdlog, is_censored, censor = "right", lower = NULL, upper = NULL, dim = length(is_censored) )
meanlog |
Mean of the log-transformed normal distribution. |
sdlog |
Standard deviation of the log-transformed normal distribution. |
is_censored |
Logical vector indicating whether each observation is censored. |
censor |
Type of censoring: one of 'right', 'left', 'interval'. |
lower |
Lower bound for interval censoring (optional). |
upper |
Upper bound for interval censoring (optional). |
dim |
Dimension of the data (optional, defaults to length of |
A greta censored log-normal distribution node.
Creates a censored normal distribution for use with greta.
normal_censored( mean, sd, is_censored, censor = "right", lower = NULL, upper = NULL, dim = length(is_censored) )
normal_censored( mean, sd, is_censored, censor = "right", lower = NULL, upper = NULL, dim = length(is_censored) )
mean |
Mean of the normal distribution. |
sd |
Standard deviation of the normal distribution. |
is_censored |
Logical vector indicating whether each observation is censored. |
censor |
Type of censoring: one of 'right', 'left', 'interval'. |
lower |
Lower bound for interval censoring (optional). |
upper |
Upper bound for interval censoring (optional). |
dim |
Dimension of the data (optional, defaults to length of |
A greta censored normal distribution node.
Creates a censored Pareto distribution for use with greta.
pareto_censored( scale, alpha, is_censored, censor = "right", lower = NULL, upper = NULL, dim = length(is_censored) )
pareto_censored( scale, alpha, is_censored, censor = "right", lower = NULL, upper = NULL, dim = length(is_censored) )
scale |
Minimum value of the Pareto distribution. |
alpha |
Shape parameter of the Pareto distribution. |
is_censored |
Logical vector indicating whether each observation is censored. |
censor |
Type of censoring: one of 'right', 'left', 'interval'. |
lower |
Lower bound for interval censoring (optional). |
upper |
Upper bound for interval censoring (optional). |
dim |
Dimension of the data (optional, defaults to length of |
A greta censored Pareto distribution node.
Creates a censored Student's t distribution for use with greta.
student_censored( df, loc, scale, is_censored, censor = "right", lower = NULL, upper = NULL, dim = length(is_censored) )
student_censored( df, loc, scale, is_censored, censor = "right", lower = NULL, upper = NULL, dim = length(is_censored) )
df |
Degrees of freedom for the Student's t distribution. |
loc |
Location parameter (mean). |
scale |
Scale parameter. |
is_censored |
Logical vector indicating whether each observation is censored. |
censor |
Type of censoring: one of 'right', 'left', 'interval'. |
lower |
Lower bound for interval censoring (optional). |
upper |
Upper bound for interval censoring (optional). |
dim |
Dimension of the data (optional, defaults to length of |
A greta censored Student's t distribution node.
Creates a censored Weibull distribution for use with greta.
weibull_censored( shape, scale, is_censored, censor = "right", lower = NULL, upper = NULL, dim = length(is_censored) )
weibull_censored( shape, scale, is_censored, censor = "right", lower = NULL, upper = NULL, dim = length(is_censored) )
shape |
Shape parameter of the Weibull distribution. |
scale |
Scale parameter of the Weibull distribution. |
is_censored |
Logical vector indicating whether each observation is censored. |
censor |
Type of censoring: one of 'right', 'left', 'interval'. |
lower |
Lower bound for interval censoring (optional). |
upper |
Upper bound for interval censoring (optional). |
dim |
Dimension of the data (optional, defaults to length of |
A greta censored Weibull distribution node.