https://github.com/emitanaka/pbst
Plant Breeding Selection Tools
https://github.com/emitanaka/pbst
Last synced: about 1 month ago
JSON representation
Plant Breeding Selection Tools
- Host: GitHub
- URL: https://github.com/emitanaka/pbst
- Owner: emitanaka
- License: other
- Created: 2021-03-24T09:27:23.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-24T10:14:50.000Z (about 4 years ago)
- Last Synced: 2025-04-02T02:35:47.620Z (about 2 months ago)
- Language: R
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# pbst
This R-package implements tools to assist selection from
multi-environment trial data of plant breeding experiments based on Smith and Cullis (2018) "Plant breeding selection tools built on factor analytic mixedmodels for multi-environment trial data" *Euphytica*.## Installation
You can install the development version of this package as:
``` r
# install.packages("remotes")
remotes::install_github("emitanaka/pbst")
```## Example
Suppose there are $m$ varieties tested at $p$ locations. You fit a factor analytic model as per Smith (2001) with $k$ factors.
You should have a data that consists of the estimates of the loading matrix which has dimension of $p$ rows and $k$ columns. In addition, you should have the variety scores as a _matrix_ with $m$ rows and $k$ factors. The score matrix should have the rownames with the names of the variety.
A sample data provided by Manigben Kulai Amadu are provided as `loadings` and `scores` when you load the package.
```{r}
library(pbst)
dim(scores)
head(scores)
loadings
```In the example above there are `r nrow(scores)` varieties tested at `r nrow(loadings)` environments (note: not all varieties are tested at each location).
The estimates of the loading matrix are not unique. There are some common rotation used and below employs the one recommended by Smith & Cullis (2018).
```{r}
rotate_loading(loadings)
```When using the recommended Factor Analytic Selection Tools (FAST), you should use the rotated version of the loading matrix. The output shows the overall performance (OP) and the root mean square deviation.
```{r}
results <- FAST(rotate_loading(loadings), scores)
head(results)
```