df2bstat: computes bivariate statistics from a data frame

Description Usage Arguments Value Examples

View source: R/f0.rbsb1.code.r

Description

Data being supposed to be a data frame: observations by rows, variables by columns being numeric or factor; standard bivariate statistics are computed for each couple of variables.

Usage

1
df2bstat(data, nbmin=80)

Arguments

data

Date frame containing the data set. NA values are accepted.

nbmin

(numeric(1)) Minimum number of observations required to compute the statistics for each variable couple.

Value

a symmetric matrix having rows and columns associated to the variables. When the couple is numeric/numeric: the Pearson correlation; categoric/categoric: the first eigen values of {n\_ij/(n\_i+.n\_+j)}; numeric/categoric: the Pearson correlation giving to the categoric the values of mean of the numeric.

Examples

1
2
3
4
5
6
7
 rbsb3k("RESET"); # needed only for R checking, to be forgotten
 set.seed(1234);
 don <- as.data.frame(matrix(round(runif(100)*10), 20));
 names(don) <- LETTERS[1:5];
 don[[4]] <- as.factor(don[[4]]);
 don[[5]] <- as.factor(don[[5]]);
 df2bstat(don, 5);

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