GraphPad Statistics Guide

Using a script to simulate many data sets

Using a script to simulate many data sets

Previous topic Next topic No expanding text in this topic  

Using a script to simulate many data sets

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function Mail us feedback on this topic!  

This page will help people who set up these scripts in earlier versions of Prism, or people for whom the Monte-Carlo analysis doesn't provide enough versatility. But for most people, the Monte Carlo analysis will be much easier.

Follow these steps:

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.

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.