getCategoryFrequenciesNode: retrieves the category frequencies for one node

Description Usage Arguments Details Value Warning Note See Also

Description

For a specified node of a tree this function retrieves the category frequencies for each SNP.

Usage

1
getCategoryFrequenciesNode(SNPmatrix = matrix(), splitVar = numeric())

Arguments

SNPmatrix

A matrix containing the SNPs used in the analysis.

splitVar

A numeric indicating the variable used to split the considered Node.

Details

The provided matrix could technically be any Matrix with categorical variables. In context of this package it will usually be a subset of the original SNP data set containing only the observations still 'active' in the considered node. The splitVar argument also only makes sense in this particular setting.

Value

A 5 x n.snps matrix, where n.snps is the number of SNP variables in SNPmatrix. The rows contain in this order:

An indicator whether a variable was used for splitting in the considered node; 0 = no, 1 = yes

The number of category 0 ( = AA) observations

The number of category 1 ( = Aa) observations

The number of category 2 ( = aa) observations

Number of levels/different categories a variable/SNP has in the according node.

Warning

This function only counts the instances of observations having one of the values 0, 1 or 2. If you provide a SNPmatrix with differently coded categories, you will get wrong results.

Note

Calls the underlying Rcpp/C++ function with the same name.

See Also

getCategoryFrequenciesTree, getCategoryFrequenciesForest


adibender/rFtools documentation built on May 14, 2019, 5:13 a.m.