regress.back.fitness.vs.effect: Linear regression of background fitness against effects

Description Usage Arguments Details Value

View source: R/model_fitting_functions.R

Description

Linear regression of background fitness against effects

Usage

1
regress.back.fitness.vs.effect(fitness.of.backs, effects.matrix, n.muts)

Arguments

fitness.of.backs

Matrix with background fitness for effects.matrix

effects.matrix

Effect of mutation in that genotype

n.muts

Number of mutations

Details

For each mutation, function does simple linear regression using lm(). The product of logged p-values (P) is the summary statistic used in model selection. When the model that generated the data and the model analyzing the data match, the expected slope of the regression line is zero.

Value

List:
[[1]] p.vals P-value for linear regression for each mutation
[[2]] lm.intercepts Intercepts for each mutation [[3]] lm.slopes Slopes for each mutation [[4]] P Sum of the logs of the p-values. [[5]] fitness.of.backs Matrix with fitness of backgrounds when each mutation (columns) is added to each genotype (rows). [[6]] effects.matrix Matrix with fitness effect when given mutation (column) is added to given create genotype (row). If there is insufficient data to do regression, a warning is returned.


jtvanleuven/Stickbreaker documentation built on May 20, 2019, 3:18 a.m.