make.Gmatrix {exactLTRE} | R Documentation |
G-matrix
Description
The G-matrix is the operator used for calculating a vector of effects from a vector of responses, up to arbitrary interaction order. This recursive function for building up the G-matrix is presented in a paper about genetic epistasis from Poelwijk, Krishna, and Ranganathan (2016, PLOS Comp Bio doi:10.1371/journal.pcbi.1004771). When the G-matrix is multiplied on the right by a column vector of the observed responses, it will produce a column vector of the effects. In other words, the G-matrix adds and subtracts off the appropriate lower-order terms to arrive at the correct values of interaction effects.
Usage
make.Gmatrix(n)
Arguments
n |
The number of observed parameters, mutation sites, etc. |
Value
A matrix that is 2^n-by-2^n.
Examples
Gmat<- make.Gmatrix(3)
[Package exactLTRE version 0.1.0 Index]