predictvo: Predict the relation of objects to a list of variables of...

Description Usage Arguments Value Examples

Description

By comparison of significant correlations within variables and the variables the objects incorporate predictvo() makes an prediction about the relation to given variables for every object.

Usage

1
predictvo(matrix, reltable, mvars, level = 2)

Arguments

matrix

data.frame with numeric values

reltable

table of correlation values (e.g. produced by reltable())

mvars

vector of variables of interest (full name)

level

switch to define if the prediction should be based on level 1 or on level 1 + level 2 variables. A level 1 variable is directly linked to a variable of interest, a level 2 variable is linked to the level 1 variables of said variable of interest

1: prediction is based only on level 1 variables.

2 (default): prediction is based on level 1 + level 2 variables.

Value

table with predicted, normalized relation values of every object and given variables of interest. If no variable of interest has correlations to other variables, predictvo() returns FALSE.

Examples

1
2
3
4
5
6
7
8
9
testmatrixrand <- data.frame(
   matrix(base::sample(0:1,400,replace=TRUE), nrow=20, ncol=20)
)

testcorr <- corrmat(testmatrixrand, "chi2", chi2limit = 0.1, dim = 1)

rel <- reltable(testcorr)

predictvo(testmatrixrand, rel, c("X2", "X3"))

nevrome/varnastats documentation built on May 9, 2019, 10:43 a.m.