imreg: for each interval formed by the induced partition of the
regressor's bounds, the mean of the response bounds over the cases
covering it.
Arguments
- formula
a formula using
iv()for interval-valued variables;tda_imregneeds both sides interval-valued.- data
a data frame.
- options
a named list of further TDA options, passed through.
- dir
working directory.
- ...
passed to
tda_run.
See also
Other interval-valued data:
tda_bounds(),
tda_idf(),
tda_ilsreg(),
tda_imean(),
tda_inpreg(),
tda_ivar1(),
tda_ivreg(),
tda_sddf()
Examples
set.seed(3)
d <- data.frame(xlo = round(rnorm(30), 2))
d$xhi <- d$xlo + round(runif(30, 0.3, 1), 2)
d$ylo <- 2 + 0.5 * d$xlo + rnorm(30, sd = 0.2)
d$yhi <- d$ylo + round(runif(30, 0.3, 1), 2)
head(tda_imreg(iv(ylo, yhi) ~ iv(xlo, xhi), d)$table)
#> index x y_lower y_upper
#> 1 1 -1.67 0.9071987 1.837199
#> 2 1 -1.36 0.9071987 1.837199
#> 3 2 -1.36 0.0000000 0.000000
#> 4 2 -1.22 0.0000000 0.000000
#> 5 3 -1.22 1.0425473 1.652547
#> 6 3 -1.15 1.0425473 1.652547