R/mice_imputation_add_jitter.R

Defines functions mice_imputation_add_jitter

## File Name: mice_imputation_add_jitter.R
## File Version: 0.01

mice_imputation_add_jitter <- function(x, jitter_val=1e15)
{
    no <- length(x)
    jitter_val1 <- jitter_val * max(x, na.rm=TRUE)
    x <- x + stats::runif(no)/jitter_val1
    return(x)
}

Try the miceadds package in your browser

Any scripts or data that you put into this service are public.

miceadds documentation built on May 29, 2024, 11:05 a.m.