Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UniIS

UniIS is a distribution-independent R package for importance-sampling inference with univariate complete, censored, and truncated data. Users supply the probability functions of a distribution and a proposal over its parameters; the package constructs the observed likelihood and all log-scale importance weights.

Implemented core

The initial release supports complete, left/right/interval-censored, Type-I, Type-II, progressive Type-II, first-failure, progressive first-failure, doubly Type-II, middle-censored, left-truncated, and right-truncated observations. It includes ordinary, self-normalized, defensive-mixture, and adaptive deterministic-mixture importance sampling, evidence estimation, ESS and weight diagnostics, S3 summaries, likelihood information criteria, predictive functionals, plotting, and generic simulation helpers. New schemes can be provided as a parser function returning exact values, censoring intervals, and truncation regions.

The package intentionally distinguishes implemented methods from planned extensions. Sequential Monte Carlo, bridge sampling, Pareto-smoothed weights, and specialised joint/hybrid censoring likelihoods belong to future releases, where their methods can be documented and validated rather than silently approximated by a different design.

Example

library(UniIS)

set.seed(2026)
x <- rexp(100, rate = 1.5)
fit <- is_fit(
  data = x,
  pdf = function(x, theta) dexp(x, rate = exp(theta[1])),
  cdf = function(x, theta) pexp(x, rate = exp(theta[1])),
  survival = function(x, theta) pexp(x, rate = exp(theta[1]), lower.tail = FALSE),
  theta0 = c(log_rate = log(1)),
  proposal = is_proposal_normal(log(1), 0.75),
  scheme = "complete",
  control = is_control(n_draws = 5000, method = "adaptive")
)

summary(fit)
exp(coef(fit))
is_predictive(fit, c(0.5, 1), "survival")

For a positive parameter, sampling its logarithm as above avoids invalid proposal draws. Include the relevant Jacobian in a prior or proposal density when you use a custom transformed parameterisation.

About

❗ This is a read-only mirror of the CRAN R package repository. UniIS — Importance Sampling Inference for Censored Univariate Data

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages