Description Usage Arguments Examples
This function takes a parameter specification matrix and returns a matrix of random starting values
1 | witness.starting.params(parameter.form, values = NULL)
|
parameter.form |
A matrix where the rows are the experiments, and the columns are the parameters a, ssp, sfs, c, and wa. To fix parameters across rows, one would simply input the same values. For example, if one wanted all the encoding values (a) to be the same, the first row could consist of only ones. See example. |
values |
A vector of starting values. If the user wants random starting values, leave as NULL. Otherwise, specify what the starting values should be. |
1 2 3 4 5 6 7 8 9 10 | ###### prepare parameter vector
params = matrix(c(rep("e", times=4),
0, 0, 0, 0,
"sfs1", "sfs1", "sfs2", "sfs2",
"cr1", "cr2", "cr1", "cr2",
1, 1, 1, 1), nrow=4)
# note: fixes ssp and wa encoding across experiments, but allows sfs/cr to vary
###### generate initial parameters
st = witness.starting.params(params)
st
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.