normalize8empirical: normalizes an /empirical/

Description Usage Arguments Details Value Examples

View source: R/f3.rbsb4.code.r

Description

This function normalizes an /empirical/ object, that is returns the object with weight transformed into probabilities (taking care of the two parts)

Usage

1

Arguments

empi

The empirical object to normalize.

Details

Also a sorting of the discrete values is performed and multiple identical values are merged. Zero values are eliminated as much as possible. Also are values outside the proposed support.

Value

the transformed /empirical/

Examples

1
2
3
4
5
6
7
8
 rbsb3k("RESET"); # for R checking compliance (useless)
 print(normalize8empirical(new("empirical")));
 e1 <- new("empirical", des=char2des("e1"), sup=c(0, 10), repa=c(10, 0), xw=matrix(c(1, 2, 1, 2, 1, 1:5), ncol=2));
 print(e1);
 print(normalize8empirical(e1));
 e2 <- new("empirical", des=char2des("e2"), sup=c(2.5, 3.5), repa=c(0, 5), xy=matrix(c(1:5, 0, 1, 1, 1, 0), ncol=2));
 print(e2);
 print(normalize8empirical(e2));

rbsb documentation built on May 31, 2017, 1:45 a.m.