|
|
||
|
Next: Putting It All Together: Up: Simulation Tools Previous: The Bootstrap: bootstrap.bf The Parametric Bootstrap: parboot.bfAnother useful simulation tool is the parametric bootstrap. Hy-Phy provides the SimulateDataSet command to provide the type of model-based simulation required. In parboot.bf we find the following lines of code. Again, some lines have been deleted for clarity.
for (simCounter = 1; simCounter<=reps; simCounter = simCounter+1)
{
DataSet simData = SimulateDataSet(theLikFun);
DataSetFilter simFilter = CreateFilter (simData,1);
HarvestFrequencies (simFreqs, simFilter, 1, 1, 1);
LikelihoodFunction simLik = (simFilter, bsTree, simFreqs);
Optimize (simParamValues, simLik);
}
The end result is analagous to that of bootstrap.bf: we simulate reps datasets, find MLEs, and tabulate results. The fundamental difference is that the datasets are formed by simulating using the tree structure, evolutionary model, and parameters in theLikFun via the function SimulateDataSet. An important technical difference is that SimulateDataSet generates a DataSet as opposed to the DataSetFilter created by Bootstrap. Thus, we must use the CreateFilter command to create an appropriate filter. Again note the use of BSRes for tabulating results, and also the use of fscanf for acquiring input from the user (see the Batch Language Command Reference for details).
Spencer Muse 2000-05-31 |
Sergei L. Kosakovsky Pond and Spencer V. Muse, 1997-2002
|
|