## Abstract

Hall *et al*. claim that it is not yet possible to infer the diel activity patterns of fossil archosaurs with high confidence. We demonstrate here that this assertion is founded on unscreened data, untenable assumptions, and inappropriate methods. Our approach follows ecomorphological and phylogenetic principles in a probabilistic framework, resulting in statistically well-supported reconstructions of diel activity patterns in Mesozoic archosaurs.

Phylogenetic flexible discriminant analysis is a rigorous statistical method to make quantitative inferences of ecology in fossil vertebrates. We applied this method to infer the diel activity patterns of Mesozoic archosaurs and concluded that, in contrast to the previous perception, many were nondiurnal (*1*, *2*). Hall *et al*. question our approach (*3*), claiming that discriminant analysis, especially the use of prior probabilities, and the pattern of morphospace occupation in this particular case are inappropriate for reliable inferences of diel activity patterns. Here, we dispel these concerns and emphasize the strength of phylogenetic flexible discriminant analysis in paleobiology.

Discriminant analysis is a widely accepted technique for multigroup classification (*4*, *5*), with a long history of biological applications [briefly reviewed in (*2*)]. It classifies test samples with unknown group membership on the basis of quantitative rules established by a training data set with known group membership (*4*, *5*). Group membership is identified by posterior probabilities calculated for each test sample (*4*, *5*). The classification of a test sample is not calculated from “how closely it plots to a group centroid” as asserted in (*3*). It is only in linear discriminant analysis with equal prior probabilities that the Mahalanobis distance from the test sample to the nearest group centroid is the distinguishing criterion (*4*).

The use of prior probabilities is integral to discriminant analyses and is encouraged whenever estimates of the proportions among classes are available (*4*, *5*). Proportions among diurnal, cathemeral, and nocturnal vertebrates are known from extant species and have ecological foundation. It is logical to use these proportions as prior probabilities by making a uniformitarian assumption that they were similar in the Mesozoic. By assuming equal prior probabilities, Hall *et al*. (*3*) force discriminant analysis to classify fossil organisms into equal numbers of cathemeral, diurnal, and nocturnal species as much as possible. Their use of such an artificial proportion is against ecology, uniformitarianism, and statistical guidelines. Hall *et al*. further claim that data on diel activity patterns from the Animal Diversity Web (ADW), used to derive prior probabilities, were inaccurate. However, we used the data after verifying that proportions of diel activity patterns among amniotes remain approximately the same when using peer-reviewed mammal data (Fig. 1) (*6*), and thus their assertion is wrong. It should be noted that classification of diel activity patterns varies among authors. Our explicit definition is based on optics (*1*, *2*) and differs from those in (*6*) and (*7*) that compromise the optical framework of our analysis. Our classification allowed us to identify different types of ocular image formation and diel activity patterns on the basis of optics. It is unsurprising that Hall *et al*. found deviations in their largely uncited data source given Fig. 1. Hall *et al*. (3) claim that they classified 24.6% of the photopic mammal species differently. However, given that their methods and assumptions are flawed, as we demonstrated above, such a claim is unfounded. If we reanalyze our data with equal prior probabilities, a procedure statistically and biologically unwarranted, only eight taxa are classified differently. The overall pattern (*1*) remains unchanged.

The establishment of form-function relations is essential for inference of ecology in fossils (*1*, *2*, *8*, *9*). Hall *et al*. state there was no osteological proxy for axial length, yet the external scleral-ring diameter is correlated with axial length (*9*). All osteological features in our analysis are optically relevant, facilitating functional interpretations of morphospace. Hall *et al*. observe that many Mesozoic archosaurs plot outside the extant saurian morphospace, especially along discriminant axis 2, and state that it may be impossible to infer diel activity patterns. Contrary to what is stated in (*3*), scores on discriminant axis 2 are correlated with eye size, the geometric mean of all variables (*1*, *8*) [*P* < 0.001 for both extant and fossil data, calculated with the SMATR package (*10*) in R 2.13.0 (*11*)]. Many Mesozoic archosaurs have larger absolute eye sizes than extant saurians (*1*) and should plot outside the extant morphospace. Nevertheless, they can be interpreted functionally. Absolutely large eyes may deliver both reasonable light sensitivity and visual acuity (*12*), benefiting mainly cathemeral species. Indeed, it is largely discriminant axis 2 that separates cathemeral species from others (*1*, *8*).

Hall *et al*. reanalyzed our data with linear discriminant analysis, ignoring our new method (phylogenetic flexible discriminant analysis) (*1*, *2*), even though our approach is explained by a simple step-by-step guide (*1*) and provides all classification statistics (table S1). Linear discriminant analysis is known to have poor classification performance, mainly because linear functions are crude descriptors of group boundaries (*5*). Phylogenetic flexible discriminant analysis uses nonlinear group boundaries. Furthermore, it is necessary to account for phylogenetic relatedness of test samples and training samples. Hall *et al*. casually assume that phylogenetic signal was insufficiently strong to affect classification, although we have already reported that this assumption is incorrect (*2*). Even though the phylogenetic signal in the relation between osteology and diel activity patterns is small (Pagel’s λ = 0.08), classification of test samples is affected (*2*). The choice of appropriate λ is essential for correct classification, because equal misidentification rates can have different identification sets (*2*).

We are puzzled by Hall *et al*.’s statement that we claimed to have given a definitive answer to the problem of dinosaurian diel activity patterns (*3*). We presented concrete evidence on the basis of robust, well-supported results. Discriminant analysis provides a quantitative prediction of group membership in a probabilistic framework. As such, classifications cannot be “definitive,” and the incorporation of uncertainty is a strength of our approach. The misclassification rate in our training data set is 19.5% (*2*), very reasonable for comparative analyses, whereas nonphylogenetic linear discriminant analysis of log10-transformed data rounded to three significant figures, calculated with the MASS package (*13*) in R 2.13.0 (*11*) resulted in a misclassified proportion of 22.0%. The presence of outliers does not compromise our overall inference or conclusion, as in most statistical studies.

To conclude, the inference of nocturnality in dinosaurs from scleral ring and orbit morphology is sound. Discriminant analysis of continuous morphological traits with explicit functional relevance provides a testable, quantitative model of ecomorphological inference in fossil vertebrates, a rapidly growing area in paleobiology (*14*, *15*).