Optimized multi-location partially replicated design
Source:R/fct_multi_location_prep.R
multi_location_prep.RdOptimized multi-location partially replicated design
Usage
multi_location_prep(
lines,
nrows,
ncols,
l,
planter = "serpentine",
plotNumber,
desired_avg,
copies_per_entry,
checks = NULL,
rep_checks = NULL,
exptName,
locationNames,
optim_list,
seed,
spread_reps = TRUE,
data = NULL,
allow_fillers = FALSE,
max_fillers = NULL,
year = NULL
)Arguments
- lines
Number of genotypes, experimental lines or treatments.
- nrows
Numeric vector with the number of rows field at each location.
- ncols
Numeric vector with the number of columns field at each location.
- l
Number of locations. By default
l = 1.- planter
Option for
serpentineorcartesianmovement. By defaultplanter = 'serpentine'.- plotNumber
Numeric vector with the starting plot number for each location. By default
plotNumber = 101.- desired_avg
(optional) Desired average of treatments across locations.
- copies_per_entry
Number of total copies per treatment.
- checks
Number of checks.
- rep_checks
Number of replications per check.
- exptName
(optional) Name of the experiment.
- locationNames
(optional) Name for each location.
- optim_list
(optional) A list object of class "MultiPrep"generated by
do_optim()function.- seed
(optional) Real number that specifies the starting seed to obtain reproducible designs.
- spread_reps
A logical value indicating whether to maximize the spatial distance between replicated treatments in the field. Default is
TRUE.- data
(optional) Data frame with 2 columns:
ENTRY | NAME. ENTRY must be numeric.- allow_fillers
A logical value indicating whether field dimensions may exceed the number of experimental plots. Fillers occupy the terminal cells of the selected planter path. Default is
FALSE.- max_fillers
Maximum number of filler plots considered when dimensions are selected automatically. When
NULL, up to 10 filler plots are considered.- year
(optional) Year recorded in the
YEARcolumn of the field book. By default the current year.
Value
A list of class FielDHub with several elements.
infoDesignis a list with information on the design parameters.layoutRandomis a matrix with the randomization layout.plotNumberis a matrix with the layout plot number.binaryFieldis a matrix with the binary field.fillerFieldis a logical matrix identifying filler plots.dataEntryis a data frame with the data input.genEntriesis a list with the entries for replicated and non-replicated parts.fieldBookis a data frame with field book design. This includes the index (Row, Column).min_pairwise_distanceis a data frame with the minimum pairwise distance between each pair of locations.reps_infois a data frame with information on the number of replicated and non-replicated treatments at each location.pairsDistanceis a data frame with the pairwise distances between each pair of treatments.treatments_with_repsis a list with the entries for the replicated part of the design.treatments_with_no_repsis a list with the entries for the non-replicated part of the design.list_locsis a list with each location list of entries.multi_location_datais a data frame with the entries of every location:LOCATION | ENTRY | NAME | REPS.allocationis a matrix with the allocation of treatments.size_locationsis a named vector with the size of each location.
Reproducibility
The result records effective inputs and the resolved seed in
metadata$parameters. Under the same package versions and RNG
settings, rebuild a result x with
do.call(multi_location_prep, x$metadata$parameters).
References
Edmondson, R.N. Multi-level Block Designs for Comparative Experiments. JABES 25, 500–522 (2020). https://doi.org/10.1007/s13253-020-00416-0
Examples
# Example 1: Generates a spatially optimized multi-location p-rep design with 142
# genotypes. The number of copies per plant available for this experiment is 9.
# This experiment is carried out in 5 locations, and there are seven seeds available
# for each plant to make replications.
# In this case, we add three controls (checks) with six reps each.
# With this setup, the experiment will have 142 treatments + 3 checks = 145
# entries and the number of plots per location after the allocation process
# will be 196.
# The average genotype allocation will be 1.5 copies per location.
if (FALSE) { # \dontrun{
optim_multi_prep <- multi_location_prep(
lines = 150,
l = 5,
copies_per_entry = 7,
checks = 3,
rep_checks = c(6,6,6),
locationNames = c("LOC1", "LOC2", "LOC3", "LOC4", "LOC5"),
seed = 1234
)
field_book <- optim_multi_prep$fieldBook
head(subset(field_book, LOCATION == "LOC1"), 10)
} # }