Skip to contents

This is a methodological function to calculate the percentage frequencies of weights by model adjusted using the robust regression approach.

Usage

fn_freqw(df, breaks, right=FALSE)

Arguments

df

A vector of data values.

breaks

A vector with class intervals.

right

Logical, indicating if the intervals should be closed on the right (and open on the left) or vice versa

Value

A table with frequencies by class interval is returned.

Details

The function calculates the relative frequency distribution using the function `fn_freq` from `Morefi` package.

For `fn_freq`, the breaks object must be defined. For this work, a sequence of breakpoints of equal distance is used. To incorporate the number of non-weighted values wi=1, a class interval **1** is added to the sequence.

For `fn_freq`, the breaks object must be defined. For this work, a sequence of breakpoints of equal distance is used. To incorporate the number of non-weighted values wi=1, a class interval **1** is added to the sequence.

See also

: `cut()` and `table()` functions from the R base package.

: `fn_freq` from `Morefi` package

Examples

   if (FALSE) {
df <- c(runif(n=30, min=0, max=1),rep(1,5))
breaks  <-  c(seq(0.1,0.9, by=0.1),1)

freq <- fn_freqw(df, breaks, right=FALSE)
          }