This function simulates clonal composites using outputs of a genetic-spatial
competition model fitted using asr() or asr_ma(). Currently,
only forestry data is accepted.
composite(
prep.out,
model,
resp.out,
d.row.col,
d.weight = TRUE,
selected,
nsim = 10,
verbose = TRUE
)A comprepfor object.
A comresp object.
A vector of size two. The first element contain the distance between rows, and second the distance between columns of the simulated grid.
A logical value. If TRUE (default) the predicted mean
of each plant in the grid will be weighted by the inverse of the distance between rows,
columns and diagonals.
A vector with the names of the clones selected to compose the clonal composite.
The names must be present in the comresp object.
An integer defining the number grid simulations. If nsim > 1,
the function will estimate the 95% confidence interval of the predicted means using
a bootstrap process. Defaults to 10.
A logical value. If TRUE, shows the function progress. Defaults to FALSE.
The function returns a data.frame with the predicted mean of each clone and their respective 95% confidence interval. The composite performance is obtained by averaging the predicted mean of all clones.
Considering the direct (DGE) and indirect genetic effects (IGE) of the selected clones,
the function simulates grids. Clones are positioned differently in each simulation,
which enables the modification of focal tree-neighbour dynamics. In each simulation,
the expected mean of each clone is predicted using the following equation (Ferreira et al., 2023):
$$\hat{y}_{ij} = \hat{\mu} + \hat{d}_i + \sum^n_{i \neq j}{\hat{c}_j}$$
where \(d_i\) is the DGE of the ith focal tree, and
\(c_j\) is the IGE of the jth neighbour. If d.weight = TRUE, the
IGE is divided by the distance between the focal tree and its neighbours:
$$\hat{y}_{ij} = \hat{\mu} + \hat{d}_i + \sum^n_{i \neq j}{\frac{1}{dist_{ij}} \times \hat{c}_j}$$
Ferreira, F.M., Chaves, S.F.S., Bhering, L.L., Alves, R.S., Takahashi, E.K., Sousa, J.E., Resende, M.D.V., Leite, F.P., Gezan, S.A., Viana, J.M., Fernandes, S.B., Dias, K.O.G., 2023. A novel strategy to predict clonal composites by jointly modeling spatial variation and genetic competition. Forest Ecology and Management 548, 121393. doi:10.1016/j.foreco.2023.121393
# \donttest{
library(gencomp)
comp_mat = prepfor(data = euca, gen = 'clone', area = 'area',
plt = 'tree', age = 'age', row = 'row', col = 'col',
dist.col = 3, dist.row = 2, trait = 'MAI', method = 'SK',
n.dec = 3, verbose = FALSE, effs = c("block"))
model = asr_ma(prep.out = comp_mat,
fixed = MAI~ age,
random = ~ block:age,
lrtest = TRUE,
spatial = TRUE,
cor = TRUE,
maxit = 20)
#> ASReml Version 4.2 21/01/2025 18:20:58
#> LogLik Sigma2 DF wall
#> 1 -5695.638 1.0 1645 18:20:59 ( 4 restrained)
#> 2 -5632.490 1.0 1645 18:20:59 ( 5 restrained)
#> 3 -5562.100 1.0 1645 18:20:59 ( 3 restrained)
#> 4 -5515.785 1.0 1645 18:20:59 ( 2 restrained)
#> 5 -5489.058 1.0 1645 18:21:00 ( 1 restrained)
#> 6 -5461.928 1.0 1645 18:21:00 ( 1 restrained)
#> 7 -5447.018 1.0 1645 18:21:00
#> 8 -5442.411 1.0 1645 18:21:01
#> 9 -5441.232 1.0 1645 18:21:01
#> 10 -5441.178 1.0 1645 18:21:01
#> 11 -5441.176 1.0 1645 18:21:02
#> ====> Starting likelihood ratio tests
#> ASReml Version 4.2 21/01/2025 18:21:02
#> LogLik Sigma2 DF wall
#> 1 -5567.226 1.0 1645 18:21:02 ( 1 restrained)
#> 2 -5502.968 1.0 1645 18:21:02 ( 3 restrained)
#> 3 -5479.250 1.0 1645 18:21:03 ( 1 restrained)
#> 4 -5460.279 1.0 1645 18:21:03 ( 1 restrained)
#> 5 -5453.254 1.0 1645 18:21:03 ( 1 restrained)
#> 6 -5450.791 1.0 1645 18:21:04 ( 1 restrained)
#> 7 -5449.892 1.0 1645 18:21:04
#> 8 -5449.753 1.0 1645 18:21:04
#> 9 -5449.751 1.0 1645 18:21:04
#> ASReml Version 4.2 21/01/2025 18:21:05
#> LogLik Sigma2 DF wall
#> 1 -5596.539 1.0 1645 18:21:05 ( 1 restrained)
#> 2 -5528.593 1.0 1645 18:21:05 ( 3 restrained)
#> 3 -5496.563 1.0 1645 18:21:05 ( 1 restrained)
#> 4 -5469.550 1.0 1645 18:21:05 ( 1 restrained)
#> 5 -5457.877 1.0 1645 18:21:06 ( 1 restrained)
#> 6 -5453.135 1.0 1645 18:21:06 ( 1 restrained)
#> 7 -5451.147 1.0 1645 18:21:06
#> 8 -5450.770 1.0 1645 18:21:06
#> 9 -5450.762 1.0 1645 18:21:06
#> ASReml Version 4.2 21/01/2025 18:21:06
#> LogLik Sigma2 DF wall
#> 1 -5538.532 1.0 1645 18:21:07
#> 2 -5501.241 1.0 1645 18:21:07 ( 2 restrained)
#> 3 -5479.725 1.0 1645 18:21:07 ( 1 restrained)
#> 4 -5466.675 1.0 1645 18:21:07
#> 5 -5455.535 1.0 1645 18:21:07
#> 6 -5450.825 1.0 1645 18:21:07
#> 7 -5449.790 1.0 1645 18:21:08
#> 8 -5449.751 1.0 1645 18:21:08
#> 9 -5449.751 1.0 1645 18:21:08
#> ASReml Version 4.2 21/01/2025 18:21:08
#> LogLik Sigma2 DF wall
#> 1 -5683.330 1.0 1645 18:21:09 ( 1 restrained)
#> 2 -5604.604 1.0 1645 18:21:09 ( 2 restrained)
#> 3 -5565.312 1.0 1645 18:21:09 ( 2 restrained)
#> 4 -5541.890 1.0 1645 18:21:09 ( 2 restrained)
#> 5 -5527.033 1.0 1645 18:21:10 ( 1 restrained)
#> 6 -5512.722 1.0 1645 18:21:10 ( 1 restrained)
#> 7 -5506.215 1.0 1645 18:21:10
#> 8 -5504.876 1.0 1645 18:21:10
#> 9 -5504.665 1.0 1645 18:21:10
#> 10 -5504.661 1.0 1645 18:21:11
#> ASReml Version 4.2 21/01/2025 18:21:11
#> LogLik Sigma2 DF wall
#> 1 -5573.612 1.0 1645 18:21:11
#> 2 -5532.774 1.0 1645 18:21:11 ( 2 restrained)
#> 3 -5509.337 1.0 1645 18:21:11
#> 4 -5489.122 1.0 1645 18:21:12
#> 5 -5480.358 1.0 1645 18:21:12
#> 6 -5478.228 1.0 1645 18:21:12
#> 7 -5478.111 1.0 1645 18:21:12
#> 8 -5478.108 1.0 1645 18:21:12
#> ====> LRT results:
#> effect LR-statistic Pr(Chisq)
#> 1 DGE 1.098212e+02 0.000000e+00
#> 2 IGE 5.671546e+01 2.520206e-14
#> 3 DGE:age 2.022865e+00 7.747327e-02
#> 4 IGE:age -9.514352e-05 5.000000e-01
results = resp(prep.out = comp_mat, model = model, weight.tgv = FALSE, sd.class = 1)
cc = composite(prep.out = comp_mat, model = model, resp.out = results,
d.row.col = c(3,3), d.weight = TRUE, nsim = 10, verbose = TRUE,
selected = results$blups$main[order(results$blups$main$TGV,
decreasing = TRUE),1][1:10])
#> 1. Simulated the grids
#> 2. Computed the total genotypic values
#> 3. Estimated the predicted mean and its confidence intervals
#>
#> The means were predicted considering an area of 9 ha
# }