FBD_tests1 {EvoPhylo} | R Documentation |

Produces tests of normality (within time bin, ignoring time bin, and pooling within-time bin values) and homoscedasticity (homogeneity of variances) for each fossilized birthâ€“death process (FBD) parameter in the posterior parameter log file.

```
FBD_tests1(posterior, downsample = TRUE)
```

`posterior` |
A data frame of posterior parameter estimates containing a single "Time_bin" column and one column for each FBD parameter value. Such data frame can be imported using |

`downsample` |
Whether to downsample the observations to ensure Shapiro-Wilk normality tests can be run. If |

`FBD_tests1()`

performs several tests on the posterior distributions of parameter values within and across time bins. It produces the Shapiro-Wilk test for normality using `shapiro.test`

and the Bartlett and Fligner tests for homogeneity of variance using `bartlett.test`

and `fligner.test`

, respectively. Note that these tests are likely to be significant even if the observations are approximately normally distributed or have approximately equal variance; therefore, they should be supplemented with visual inspection using `FBD_normality_plot`

.

A list containing the results of the three tests with the following elements:

`shapiro` |
A list with an element for each parameter. Each element is a data frame with a row for each time bin and the test statistic and p-value for the Shapiro-Wilk test for normality. In addition, there will be a row for an overall test, combining all observations ignoring time bin, and a test of the residuals, which combines the group-mean-centered observations (equivalent to the residuals in a regression of the parameter on time bin). |

`bartlett` |
A data frame of the Bartlett test for homogeneity of variance across time bins with a row for each parameter and the test statistic and p-value for the test. |

`fligner` |
A data frame of the Fligner test for homogeneity of variance across time bins with a row for each parameter and the test statistic and p-value for the test. |

`vignette("fbd-params")`

for the use of this function as part of an analysis pipeline.

`combine_log`

for producing a single data set of parameter posterior samples from individual parameter log files.

`FBD_reshape`

for converting posterior parameter table from wide to long format.

`FBD_normality_plot`

for visual assessments.

`FBD_tests2`

for tests of differences between parameter means.

`shapiro.test`

, `bartlett.test`

, and `fligner.test`

for the statistical tests used.

```
# See vignette("fbd-params") for how to use this
# function as part of an analysis pipeline
data("posterior3p")
posterior3p_long <- FBD_reshape(posterior3p)
FBD_tests1(posterior3p_long)
```

[Package *EvoPhylo* version 0.3.2 Index]