| DiallelSim | R Documentation |
DiallelSim() simulates plot data of a diallel in randomized complete blocks, in one or several
environments, from Griffing's model with random effects. It serves teaching (data with known effects) and the
planning of experiments (see DiallelPower).
DiallelSim(
Parents,
Method,
Rep,
Env = 1,
Mean = 0,
gca,
sca,
rec = 0,
gcaEnv = 0,
scaEnv = 0,
EnvSD = 0,
Block = 0,
Error,
seed = NULL
)
Parents |
number of parents |
Method |
Griffing's method, |
Rep |
number of replicates (blocks) per environment. |
Env |
number of environments (default |
Mean |
overall mean |
gca, sca, rec |
standard deviations of the gca, sca and reciprocal effects. |
gcaEnv, scaEnv |
standard deviations of the gca |
EnvSD |
standard deviation of the environment effects (default |
Block |
standard deviation of the block effects (default |
Error |
standard deviation of the plot errors |
seed |
seed of the random numbers, or |
The response of the plot of cross i \times j in block k of environment e is
y_{ijke} = \mu + g_i + g_j + s_{ij} + r_{ij} + \eta_e + (gE)_{ie} + (gE)_{je} + (sE)_{ije} + b_{ke} +
\varepsilon_{ijke},
with independent normal effects of standard deviations gca, sca (s_{ij} = s_{ji}), rec (r_{ij} = -r_{ji}, Methods 1 and 3), gcaEnv, scaEnv,
Block and Error; environment effects \eta_e have standard deviation EnvSD. The
gca, environment and block effects are centred to sum to zero and the sca effects to zero row and column sums over
the full P \times P table (Griffing's constraints of Methods 1 and 2). The true effects are returned as
the attribute "truth".
A data.frame with columns Cross1, Cross2, Rep, y (and Env),
with the attribute "truth": a list with gca (vector), sca and rec (matrices) and
Mean.
Muhammad Yaseen (myaseen208@gmail.com)
DiallelPower, Griffing, GriffingEnv
Other DiallelAnalysisR planning:
DiallelPower()
d <-
DiallelSim(
Parents = 6
, Method = 1
, Rep = 3
, Env = 1
, Mean = 100
, gca = 5
, sca = 3
, rec = 1
, gcaEnv = 0
, scaEnv = 0
, EnvSD = 0
, Block = 2
, Error = 4
, seed = 123
)
head(d)
attr(x = d, which = "truth")$gca
fit <-
Griffing(
y = y
, Rep = Rep
, Cross1 = Cross1
, Cross2 = Cross2
, data = d
, Method = 1
, Model = 1
, Reciprocal = c("combined", "split")[1]
)
cbind(true = attr(x = d, which = "truth")$gca, estimated = fit$GCA)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.