Using a script to simulate many data sets

Print this Topic

Why simulate?

When testing analysis methods and experimental designs, it can be useful to simulate and analyze a large number of data sets. This can give you a sense of how precisely you can determine the parameter values, and whether the distribution of parameters is symmetrical.

Prism makes this easy.

How to: Running a Prism script

This example should help you get started.

1.Create a Prism project that simulates a data set with random scatter (the first results sheet), and then fits a curve through these data with nonlinear regression (second results sheet).
2.Make sure that the first data table is empty and formatted for column data (no X column; no Y subcolumns). The script will write the results into this table. You can click in the upper left corner of the data table to change its format, if needed.
3.Click the Prism button at the left of the toolbar, and choose Run Script. Then choose New Script, and start with a blank page.
4.Enter this script:

Table Prism 1 Clear

Foreach 100

 Goto R 1

 Regenerate

 Goto R 2

 WTable "logEC50",5,1

Next

 

5.Click the Run button on the Script dialog.
6.After the script is complete, go to the first data table and view the results.
7.Click analyze, and choose to do Column statistics (with normality test) or perhaps create a Frequency Distribution.

Understanding the script

The first line of the script specifies which data table will hold the results. Then the script loops 100 times. With each loop, it goes to the first results page (with the simulation) and regenerates with new random scatter. It then goes to the second results page (with curve fit results) and writes the value in the fifth row of the first column into the data table, and labels that column "logEC50". you will want to adjust the row number, and perhaps add additional lines to output additional results. You may also want to loop more than 100 times.

 



Copyright (c) 2007 GraphPad Software Inc. All rights reserved.
URL: http://www.graphpad.com/help/Prism5/Prism5Help.html?simulating_many_data_sets_using_a_script.htm