Learn R Programming

noia (version 0.94.1)

Multilinear tools: Tools for the Multilinear Regression

Description

The functions perform various tasks required by the multilinear regression model.

Usage

formulaMultilinear(nloc=2, max.level=2, max.dom=2, 
		e.unique=FALSE)
reconstructLinearEffects(noia.multilinear)
startingValues(phen, genZ, reference="noia", max.level=2, 
	max.dom=2, fast=FALSE, e.unique=FALSE, start.algo="linear", 
	bilinear.steps=NULL, ...) 
startingValuesReg(reg, max.level=2, max.dom=2, e.unique=FALSE, 
	nloc=NULL)
startingValuesNothing(nloc, max.level=2, max.dom=2, 
	e.unique=FALSE)
startingValuesLinear(noia.linear, max.level=2, max.dom=2, 
	e.unique=FALSE, e.init=TRUE)
startingValuesMultilinear(noia.multilinear, max.level=2, 
	max.dom=2, e.unique=FALSE)
bilinearStep(form, X, phen, marginal, interactions, ...)

Arguments

nloc
Number of loci.
max.level
Maximum order of interactions.
max.dom
Maximum order for dominance.
e.unique
Whether a single interaction term is used for all pairs.
e.init
Whether starting values for epistatic effects should be calculated (if FALSE, all epistatic effects are set to 0).
phen
Vector of phenotypes.
genZ
The matrix of individual genotypic probabilities in the population.
reference
The reference point from which the regression is performed.
fast
Use of the "fast" algorithm.
start.algo
Algorithm used to compute the starting values. Can be "linear", "multilinear", "subset" or "bilinear".
bilinear.steps
Number of calls of the bilinearStep function. Ignored if start.algo is not "bilinear".
noia.multilinear
Object of class "noia.multilinear" provided by multilinearRegression.
noia.linear
Object of class "noia.linear" provided by linearRegression.
reg
Object of class "noia.linear" or "noia.multilinear".
form
A multilinear formula as returned by formulaMultilinear.
X
The product between a Z matrix and a S matrix. Can be provided directly by genZ2X.
marginal
A list of marginal effects.
interactions
A list of interaction effects. Should be complementary to marginal, together accounting for all genetic effects.
...
Extra parameters to the non-linear regression function nls.

Details

Because of the way the non-linear regression function nls works, the multilinear formula has to follow a specific form, with specific names for parameters. formulaMultilinear provides this formula. reconstructLinearEffects generates a vector of genetic effects, including general interaction effects (e.g. Additive by Additive etc) from the result of a multilinear regression. This is necessary for further computation of the Genotype-to-Phenotype map. Finally, startingValues provide a vector of starting values for the multilinear regression, from the result of a linear regression (through the function startingValuesLinear) or a simplier multilinear regression (through StartingValuesMultilinear). startingValuesNothing generates a list of starting values and sets all of them to 0. Starting values are necessary to ensure the convergence of the non-linearRegression (nls).

References

Hansen TF, Wagner G. (2001) Modeling genetic architecture: A multilinear theory of gene interactions. Theoretical Population Biology 59:61-86.

Le Rouzic A, Alvarez-Castro JM. (2008). Estimation of genetic effects and genotype-phenotype maps. Evolutionary Bioinformatics, 4.

See Also

multilinearRegression, GPmap.

Examples

Run this code
set.seed(123456789)

map <- c(0.25, -0.75, -0.75, -0.75, 2.25, 2.25, -0.75, 2.25, 2.25)
pop <- simulatePop(map, N=500, sigmaE=0.2, type="F2")

linear <- linearRegression(phen=pop$phen, gen=pop[2:3])
multilinear <- multilinearRegression(phen=pop$phen, 
	gen=cbind(pop$Loc1, pop$Loc2))

formulaMultilinear(nloc=2)
startingValuesReg(linear)
reconstructLinearEffects(multilinear)

Run the code above in your browser using DataLab