Model Selection in Estimation of Fitness Landscapes

A solution to the problem of estimating fitness landscapes was proposed by Lande and Arnold (1983). Another solution, which avoids problematic aspects of the LandeArnold methodology, was proposed by Shaw, Geyer, Wagenius, Hangelbroek, and Etterson (2008), who also provided an illustrative example involving real data. An earlier technical report (Geyer and Shaw, 2008) gave an example that was simpler in some ways (the data are simulated from the aster model so there are no issues making the data fit the model one has with real data) and much more complicated in others (each individual has five measured components of fitness over four time periods, 20 variables in all) and illustrates the full richness possible in aster analysis of fitness landscapes. The one issue that technical report did not deal with is model selection. When many phenotypic variables are measured, one often does not know which to put in the model. Lande and Arnold (1983) proposed using principal components regression as a method of dimension reduction, but this method is known to have no theoretical basis. Much of late 20th century and 21st century statistics is about model selection and model averaging, and we apply some of this methodology (which does have strong theoretical basis) to estimation of fitness landscapes using another simulated data set. All analyses are done in R (R Development Core Team, 2008) using the aster contributed package described by Geyer, Wagenius and Shaw (2007) except for analyses in the style of Lande and Arnold (1983), which use ordinary least squares regression. Furthermore, all analyses are done using the Sweave function in R, so this entire technical report and all of the analyses reported in it are completely reproducible by anyone who has R with the aster package installed and the R noweb file specifying the document. This revision corrects major errors in the frequentist model averaging calculations (Section 8) in the first version of the technical report. 1 R Package Aster We use R statistical computing environment (R Development Core Team, 2008) in our analysis. It is free software and can be obtained from http://cran.r-project.org. Precompiled binaries are available for Windows, Macintosh, and popular Linux distributions. We use the contributed package aster. If R has been installed, but this package has not yet been installed, do install.packages("aster") from the R command line (or do the equivalent using the GUI menus if on Apple Macintosh or Microsoft Windows). This may require root or administrator privileges. Assuming the aster package has been installed, we load it > library(aster) The version of the package used to make this document is 0.7-7 (which is available on CRAN). The version of R used to make this document is 2.9. 1. This entire document and all of the calculations shown were made using the R command Sweave and hence are exactly reproducible by anyone who has R and the R noweb (RNW) file from which it was created. Both the RNW file and and the PDF document produced from it are available at http://www.stat.umn.edu/geyer/aster. For further details on the use of Sweave and R see Chapter 1 of the technical report by Shaw, et al. (2007) available at the same web site. Not only can one exactly reproduce the results in the printable document, one can also modify the parameters of the simulation and get different results. Obvious modifications to try are noted on pages 3, 4, 11, and 15 below. But, of course, anything at all can be changed once one has the RNW file. 2 Simulate Data from Conditional Model 2.1 Overview It is hard to make up an unconditional aster model because the unconditional parameterization is so unintuitive. Thus we proceed in two steps. • First we simulate data using a conditional aster model with parameters we understand. • Then we fit an unconditional aster model to these data, and simulate data using the fitted unconditional model. Also it is hard to make up a fitness landscape, because we model it on the canonical parameter scale and these have no simple connection to the mean value parameter scale. Thus we also proceed in two steps here. • First we simulate data having a flat fitness landscape. • Then we fit models having a non-flat fitness landscapes, which we adjust in strength to be moderately statistically significant. The way these two issues interleave is as follows. 1. We simulate data using a conditional model having a flat fitness landscape. 2. We simulate data using an unconditional model having a flat fitness landscape. 3. We simulate data using unconditional models having a non-flat fitness landscapes. In Section 2 we only do the first step. 2.2 Graphical Model We make a graphical model based on consecutive time periods (call them years for concreteness). Data are “observed” over 10 years. For each individual we observe in year i three random variables Ui, Vi, and Wi. All random variables on one individual are connected by the graph shown in Figure 1. The variables Ui and Vi are Bernoulli (zero-or-one valued); the variables Wi are nonnegative-integer-valued. The Vi are redundant: Vi = 1 if and only if Wi > 0. The variables Ui indicate survival through the i-th year; the variables Wi count offspring produced in the i-th year. Hence the variables Vi indicate successful reproduction in the i-year (one or more offspring). We model the Wi as zero-truncated Poisson given Vi. If one likes to think of it that way, one can ignore Vi and say that Wi is zero-inflated Poisson given Ui, but the aster way to think about this requires three variables Ui, Vi, and Wi because that fits the required exponential family structure. In these data, the variable ∑ i Wi is considered fitness (total number of offspring over the course of the study, which will include most of the lifespan). 2 1 u1 u2 u3 u4 u5 u6 u7 u8 u9 u10 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 ? w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 ? Figure 1: Graph for the example. ui indicate survival, wi count number of offspring, vi indicate wi > 0. 2.3 Simulation We set the seeds of the random number generator so that we obtain the same results every time. To get different results, obtain the RNW file, change this statement, and reprocess using Sweave and LATEX. > RNGversion("2.5.0") > set.seed(42) We also set up some parameters of the simulation. These can also be changed. > nind <350 > ntime <10 > psurv <0.8 > prepr <0.7 > mpois <3 > theta.surv <log(psurv) log(1 psurv) > theta.repr <log(prepr) log(1 prepr) > theta.pois <log(mpois) > tau.pois <mpois/(1 exp(-mpois)) For a first pass we set mean survival per unit time to be psurv = 0.8 and mean reproduction indicator per unit time to be prepr = 0.7. For number of offspring in a time period given any offspring in that time period, the easiest thing to specify is the mean of the untruncated Poisson random variable that when truncated is the distribution we want. This untruncated mean is mpois = 3. The mean of the corresponding zero-truncated distribution is τ = 3.157. > vars <as.vector(outer(c("u", "v", "w"), 1:10, paste, + sep = "")) > vtype <as.factor(substr(as.character(vars), 1, + 1)) > fam <rep(1, length(vars)) > fam[vtype == "w"] <3 > pred <seq(along = vars) 1 > pred[vtype == "u"] <seq(along = vars)[vtype == + "u"] 3 > pred[1] <0