Description Usage Arguments Details Value Author(s) Examples
uses simulation to determine robustness of parameter estimates under a model
1 | parameter.reestimation(GRAD, TIME, model, PARAMETERS, N, REP = 1)
|
GRAD |
vector of gradient values (i.e. any continuous variable) for sister pair dataset |
TIME |
vector of evolutionary ages (i.e. node ages ) for sister pair dataset |
model |
any model implemented in EvoRAG |
PARAMETERS |
A vector listing the model parameters under which to simulate. Model parameters must be in the same order as described in sisterContinuous. |
REP |
How many replicated datasets of TIME and GRAD to use. Default = 1. Example: REP=3 generates a dataset with each element in TIME and GRAD repeated 3 times. This option will be used primarily for calculating statistical power as a function of increasing number of sister pairs |
N |
The number of simulations to perform |
Simulates data under a model, and re-estimates model parameters using the same model. A model performs well if the parameters it is simulated under are similar to those it re-estimates.
Returns a matrix showing the mean, median, range, several percentiles and the standard error for each model parameter.
Jason T. Weir
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
###simulate data
set.seed(seed = 3)
TIME = runif(n=300, min = 0, max = 10)
GRAD = runif(n=300, min = 0, max = 60)
DATA1 <- sim.sisters(TIME = TIME, GRAD=GRAD, parameters = c(2, -0.03),
model=c("BM_linear"))
###run parameter.reestimation
model = c("BM_linear")
parameter.reestimation(GRAD, TIME, model=model, PARAMETERS=c(2, -0.03),
N=100, REP = 1)
## End(Not run)#end dontrun
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.