mean_confint.Rd
Compute confidence interval of the mean of series with an associated distribution
mean_confint(series, conf_level = 0.95, distribution = "t")
(HESeries)
(Optional: numeric, default 0.95) - Confidence level which must be in (0, 1).
(Optional string, default "t") - if "norm", use Standard Normal distribution (z-distribution), else use Student's t-distribution.
HESeries of length 2, containing lowerbound and upperbound of confidence interval.
if (FALSE) {
params <- heaan_sdk.HEParameter("FGb", "real")
context <- heaan_sdk.Context(
params,
key_dir_path = "keys-real",
load_keys = "all",
generate_keys = FALSE)
series_1 <- rnorm(100, 0, 10)
he_series <- HESeries.from_series(context, series)
encrypt(he_series)
res_t <- mean_confint(he_series, conf_level = 0.95, distribution = "t")
res_norm <- mean_confint(he_series, conf_level = 0.99, distribution = "norm")
decrypt(res_t)
decrypt(res_norm)
res_t <- to_series(res_t)
res_norm <- to_series(res_norm)
}