tutorial prism

65
1 BITS GraphPad Prism tutorial Software for Scientific Graphing Curve Fitting and Statistics January 2014 Janick Mathys VIB-BITS

Upload: felix-ezomo

Post on 04-Dec-2015

29 views

Category:

Documents


8 download

DESCRIPTION

Biostatistics

TRANSCRIPT

Page 1: Tutorial Prism

1

BITS GraphPad Prism tutorial

Software for Scientific Graphing

Curve Fitting and Statistics

January 2014

Janick Mathys

VIB-BITS

Page 2: Tutorial Prism

2

Contents

1. Installation ....................................................................................................................................... 5

2. Documentation ................................................................................................................................ 5

3. User interface .................................................................................................................................. 5

3.1. The Welcome dialog ................................................................................................................ 5

3.2. Prism Navigator tree (left window) ......................................................................................... 7

3.2.1. Families ............................................................................................................................ 7

3.3. Main Window (right window) ................................................................................................. 8

3.4. Bottom toolbar ........................................................................................................................ 8

3.5. Top menu and upper toolbar .................................................................................................. 8

4. Create new project .............................................................................................................................. 9

4.1. Create new project ....................................................................................................................... 9

4.2. Save project .................................................................................................................................. 9

5. Import data ...................................................................................................................................... 9

5.1. Data table types ......................................................................................................................... 10

5.1.1. XY tables .............................................................................................................................. 10

5.1.2. Column tables ...................................................................................................................... 10

5.1.3. Grouped tables .................................................................................................................... 11

5.1.4. Parts of whole tables ........................................................................................................... 11

5.1.5. Contingency tables .............................................................................................................. 11

5.1.6. Survival tables...................................................................................................................... 12

5.2. Limits of data tables ................................................................................................................... 12

5.3. Data types ................................................................................................................................... 13

5.4. Missing values ............................................................................................................................ 13

5.5. Import data ................................................................................................................................. 13

5.5.1. Manually enter data in Prism .............................................................................................. 14

5.5.2. Copy from another Prism table and paste .......................................................................... 14

5.5.3. Copy from an Excel table and paste .................................................................................... 15

5.5.4. Import data files .................................................................................................................. 15

5.5.6. Create X-values of XY tables automatically ......................................................................... 18

5.6. Open existing Prism Projects ...................................................................................................... 18

5.7. Change data tables ..................................................................................................................... 19

5.7.1. Change table format ............................................................................................................ 19

Page 3: Tutorial Prism

3

5.7.2. Change the name of a table ................................................................................................ 20

5.7.3. Change column width .......................................................................................................... 20

5.7.4. Change decimals .................................................................................................................. 21

5.7.5. Sorting data ......................................................................................................................... 21

5.7.6. Excluding data values .......................................................................................................... 21

6. Performing an analysis in Prism ........................................................................................................ 22

6.1. Transformations ......................................................................................................................... 23

6.1.1. Data transformations .......................................................................................................... 24

6.2. Table transformations ................................................................................................................ 26

6.2.1. Filtering the data set ........................................................................................................... 26

6.2.2. Transposing the data set ..................................................................................................... 26

6.3. Statistical analyses ...................................................................................................................... 27

6.3.1. Automatic detection of outliers .......................................................................................... 28

6.3.2. Calculating descriptive statistics ......................................................................................... 29

6.3.3. Checking normality of the data ........................................................................................... 30

6.3.4. Comparing the mean or median to a hypothetical value ................................................... 31

6.3.5. Creating a histogram ........................................................................................................... 32

6.3.6. Comparing two groups ........................................................................................................ 33

6.3.7. Multiple comparisons of two means in Prism ..................................................................... 36

6.3.8. Comparing means of three or more groups ........................................................................ 37

6.3.9. Correlations ......................................................................................................................... 43

6.4. Choice of analysis ....................................................................................................................... 45

6.5. Changing analysis results ............................................................................................................ 45

6.5.1. Excluding columns ............................................................................................................... 45

7. Information sheets ............................................................................................................................ 45

7.1. Create and edit an Info sheet ..................................................................................................... 46

7.2. How to use Info Sheets ............................................................................................................... 46

8. Graphics ............................................................................................................................................. 47

8.1. Create a graph ............................................................................................................................ 47

8.2. Graphs types ............................................................................................................................... 48

8.2.1. Pie chart ............................................................................................................................... 48

8.2.2. Dot plots or scatter plots ..................................................................................................... 48

8.2.3. Bar charts ............................................................................................................................. 52

8.2.4. Box plots .............................................................................................................................. 54

Page 4: Tutorial Prism

4

8.3. Choosing a graph for a table ...................................................................................................... 55

8.4. Changing a graph ........................................................................................................................ 55

8.4.1. Changing the type of an existing graph ............................................................................... 55

8.4.2. Changing features of a graph .............................................................................................. 56

8.4.3. Color schemes ..................................................................................................................... 63

8.3.5. Add text to a graph .............................................................................................................. 64

8.3.6. Changing the order of columns on a graph ......................................................................... 64

8.4. Cloning a graph ........................................................................................................................... 64

8.5. Making graphs consistent .......................................................................................................... 64

8.6. Combining multiple plots ........................................................................................................... 65

9. Repeating analyses ............................................................................................................................ 65

10. Export data ...................................................................................................................................... 65

Page 5: Tutorial Prism

5

1. Installation

BITS offers PRISM licenses for free to VIB scientists. You can find the installation procedure on our

website, you have to log on using your VIB account (the account you use to check your VIB mail):

http://www.bits.vib.be/index.php/software-overview/graphpad-prism

2. Documentation

The software runs on Windows and Mac. You can find a lot of documentation online:

- Prism user guide: http://www.graphpad.com/guides/prism/6/user-guide

- Statistics guide: http://www.graphpad.com/guides/prism/6/statistics/

- Curve fitting guide: http://www.graphpad.com/guides/prism/6/curve-fitting/

You can easily access these tutorials within Prism by expanding the Help section in the top menu.

Additionally, Prism shows links or buttons while you are using the software

(e.g. when you create a new table, when you do an analysis…). When you click these items, you are

redirected to the corresponding topic in the Prism user guide.

Prism also contains a lot of example data tables and graphs to show you how to get started in the

software. You can access these examples via the Welcome dialog (see section 3.1).

3. User interface

Video tutorial on Prism user interface: http://www.bits.vib.be/index.php/training/131-basic-statistics

3.1. The Welcome dialog

When you start Prism, the Welcome dialog is opened, containing the following sections:

Red: select one of the six types of data tables that Prism supports (see section 5.1 for a description of

these table types). When you make a selection a new table of this type is generated.

Orange: open existing projects (see section 5.6), example graphs or clone graphs (see section 8.4).

Green: more info on the selected table type: description and an example of a typical graph.

Purple: set the details of the new table: do you want an empty table to import your own data in

(upper part) or do you want to work with the example data in Prism (lower part)?

In the former case you have to specify the format of the data you want to enter. In the latter case

you have to select the type of analysis that you want to perform. Each table type has a list of analyses

that can be performed on it (see appendix for an overview). Selecting an analysis type fills the table

with example data that are ideal for doing that kind of analysis but the analysis itself is not

performed: you have to do the analysis yourself.

Page 6: Tutorial Prism

6

For discussing the user interface we will open the example column table containing data for an

unpaired t-test. Prism will load the Ozone correlations project.

Page 7: Tutorial Prism

7

The user interface is divided into:

Navigator window

Main window

Top menu

Upper toolbar

Bottom toolbar

Yellow and blue information and help areas

3.2. Prism Navigator tree (left window)

Allows users to browse to the information they want to work on. The navigator shows your data, and

analysis results using a specific hierarchy:

Projects contain:

data tables: contain the input data (see section 5)

information tables: can contain a description of the experiments that generated the data

and/or a list of parameter settings used in the analysis.

graphs: contain graphical representations of your data (see section 8)

result tables: contain the results of the analyses that you did on the data (see section 6)

layouts: combine several graphs or other sheets in a layout for publishing (see section 8.6)

Each of these five folders can contain multiple pages, called sheets. The navigator shows all the

sheets of the project that is currently open.

3.2.1. Families

Prism remembers the logical links between sheets. When you edit or replace data, Prism

automatically re-computes linked analyses and redraws linked graphs. A group of linked sheets is

called a family. Families are shown at the top of the navigator: e.g. when you open the sample XY

data table for correlation you see Family of “Ozone correlations” at the top of the navigator. The

names of the sheets that are part of the family are shown in bold in the navigator. You can also

expand the family to see which sheets belong to it. As said before Prism creates families

automatically by keeping track of the links between sheets but you can also create, delete or move

families yourself: http://www.graphpad.com/guides/prism/6/user-guide/families_of_sheets.htm

Families allow you to easily repeat your analysis with new data by duplicating the family. To duplicate

a family you can choose one of these three strategies:

-> Duplicate Family

Insert in top menu -> Duplicate Family

Right click data table, graph or result table -> Duplicate Family

Prism duplicates the data table and all linked graphs and result tables. If you replace the data on the

new data table, all analyses and graphs will be updated.

Prism will ask you to assign a name to the new (duplicated) data table. Suppose that the data table is

"Ozone" and is linked to "Ozone correlations". If you duplicate the family, you can enter "CO2" as the

Page 8: Tutorial Prism

8

name of the new data table. Prism will then rename the linked graph to "CO2 correlations"

automatically. It can only do this because the exact name of the data table is part of the graph name.

Note the distinction between duplicating a sheet and duplicating a family. If you duplicate a graph,

the copy will link to the same data table as the original. This is useful if you want to make two graphs

of the same data. But if you want to make two similar graphs of different data, you have to duplicate

the family or clone the graph (see section 8.4).

3.3. Main Window (right window)

Shows the sheets that you open by simply clicking the name of the sheet in the navigator.

3.4. Bottom toolbar

You can also open an overview of all sheets of one of the five components by clicking the name of a

sheet/folder in the navigator and click Gallery ( ) in the bottom toolbar. This will open a gallery

view in the Main window where you see all sheets of that component, e.g. all graphs of your data.

To remove the gallery and return to the normal sheet view, click again.

You can hide the navigator by clicking Hide / Display ( ) in the bottom toolbar.

To open the previously viewed sheet you click Ping-pong ( ) in the bottom toolbar.

Prism contains tools for navigating large projects, you can find an overview of these tools at:

http://www.graphpad.com/guides/prism/6/user-guide/using_tips_for_navigating_large_proj.htm

3.5. Top menu and upper toolbar

The top menu and the upper toolbar give access to all the actions that you can perform in Prism.

Prism is very redundant: each action can be done in multiple ways and the top menu and the upper

toolbar contain more or less the same features. For instance if you make a mistake, you can always

undo your last moves by following one of these strategies:

Edit in Top menu -> Undo

Undo ( ) in Undo section of the upper toolbar

Both the top menu and the upper toolbar are divided into sections and although the arrangement of

these sections is different, they do provide the same actions.

The buttons of the upper toolbar and the items in the dropdown menus of the top menu will change

depending on which type of information is open in the main window. When you are looking at a data

table you will see different buttons in the upper toolbar compared to when you’re looking at a graph.

Page 9: Tutorial Prism

9

4. Create new project

4.1. Create new project

Data in Prism is organized in a hierarchy. The top of the hierarchy are the projects. Projects contain

one or multiple data tables, results tables, graphs and page layouts.

If you use Prism for the first time and you don’t want to work on the example data, the first thing you

need to do is creating a project:

File in top menu -> New -> New Project File

Prism ( ) in upper toolbar -> New Prism Project File

New ( ) in the File section of the upper toolbar -> New Project File

When you create a new Project you are redirected to the Welcome dialog (see section 3.1.) where

you have to select (as always) a data table type. The type that you choose is not important; Once the

project is created you can open all kinds of data in it.

4.2. Save project

A newly created project gets a default name e.g. Project1. If you want to give the project a

meaningful name, you have to save it.

To save the project, choose one of the following strategies:

File in Top menu -> Save

Save ( ) in upper toolbar

Try Exercise 1 on the wiki page: http://wiki.bits.vib.be

5. Import data

Once you have created a project, you can load data into the project. Data is entered in a data table

that consists of rows and columns. The columns can be divided into sub-columns that are intended to

hold data from replicate measurements. If you enter replicate values, Prism will automatically

calculate and plot error bars. You can also enter pre-calculated standard deviations or standard

errors in Prism if you have calculated them elsewhere, but there is no need to do so.

There are six types of data tables in Prism (see section 5.1).

The choice of table type is very important: each graph and analysis type is linked to a certain table

type. For graphs Prism is not very stringent: it will allow you to use each graph type on each table

type, but the result doesn’t always look good when you combine a graph that is linked to a certain

table type with another type of table. Often Prism struggles with the titles of axes, legends…

Prism is more stringent about analyses: analyses are only allowed for specific data table types. If you

don't choose the appropriate type of table, you won't be able to perform the analysis you have in

mind. So choose a table type based on the organization of your data and the analysis you wish to

perform.

Page 10: Tutorial Prism

10

5.1. Data table types

http://www.graphpad.com/guides/prism/6/user-guide/using_data_table_format.htm

5.1.1. XY tables

An XY table is a table where every data point is defined by an X and at least one Y value.

Column X contains X-values, values of the variable that you manipulate (time, temperature,

concentration…) and that is used to plot the others against. The other columns (one or more Y

columns) contain the actual measurements (continuous data), e.g. in the example above contains

column A measurements from one group of subjects. Replicates are placed in sub-columns, e.g. in

the example above column A contains 3 sub-columns with replicate measurements for this one

group of subjects. In this way replicate measurements are recognized by Prism and automatically

used for calculating error bars.

There is only one X-column per XY-table but there can be multiple Y columns.

5.1.2. Column tables

In a column table each column contains the measurements for a specific group, so column tables

are also meant to hold continuous data that is grouped according to a single grouping variable.

Prism defines different groups by using separate columns, one for each group. Column A contains

measurements for the group of patients that received placebo; column B for the group that received

active drug.

By nature, column tables contain replicates in each column so column tables do not contain sub-

columns. This table can hold paired or unpaired data. If the data is paired then all values coming from

Page 11: Tutorial Prism

11

the same individual are placed in the same row. In example shown above the data cannot be paired

since both columns contain a different number of values.

5.1.3. Grouped tables

Grouped tables contain measurements for two grouping variables.

One grouping variable (Men vs. Women) is defined by the rows; the other grouping variable (Control

vs. Treated) is defined by the columns. Sub-columns contain data from replicate measurements.

5.1.4. Parts of whole tables

A parts of whole table is used to hold categorical data. It is the categorical counterpart of a Colum

table. So instead of measurements the table contains the number of observations that fall into a

certain category. It is essential that you enter the actual number of observations that you counted.

Do not enter normalized values or percentages. Since the values are counts, they cannot be negative

and must be integers. Prism will not let you enter a minus sign or decimal point.

The example below shows the number of students who received grades of A, B, C, etc.

5.1.5. Contingency tables

Contingency tables are the categorical counterpart of Grouped tables. So instead of one variable that

defines the categories, you have two. The categories are defined by the rows and the columns.

In the example above, the two rows represent different treatments (two categories: standard and

experimental treatment), the two columns represent two alternative outcomes (two additional

categories: graft patent and graft obstructed). In total you can make 4 treatment / outcome

combinations, so you have a total of 4 categories.

Page 12: Tutorial Prism

12

Each value in the table is the number of observations for a specific category. As in Parts of whole

tables you have to enter the actual count, not percentages or fractions.

5.1.6. Survival tables

Survival tables contain data for survival analysis, a branch of statistics that studies the occurrence of

events in time. Events are in most cases binary (yes or no) like death, failure, injury, sickness,

recovery from sickness, exceeding a threshold…

Survival analysis answers questions like: How many out of 100 people will survive until 86 years?

What’s a person’s chance of surviving past 20 years? Are there environmental factor that increase or

decrease the death rate... Therefore, many clinical trial data are analyzed by survival analysis e.g. the

effect of hormone treatment in women on the incidence of coronary heart diseases, the effect of

aspirin treatment on the mortality after myocardial infarctions…

Each row represents a distinct subject. Each Y-column represents a treatment. The X-column

contains elapsed time, usually in days. Note that you cannot use dates since Prism does not let you

enter dates. For each subject, you have to enter a code for Y:

Enter ‘1’ for a subject if the event (death) occurred at the time entered into X.

Enter ‘0’ if the data are censored. Data are censored when you simply don’t know what

happened to the subject after that time, or you do know but can’t use the information.

5.2. Limits of data tables

A data table can contain:

Any number of rows (limited by RAM and disk space), 100.000s rows shouldn’t be a problem

Up to 256 columns

Up to 256 sub-columns

Page 13: Tutorial Prism

13

5.3. Data types

All data in Prism should be numerical. This means that in Prism categorical variables should always be

transformed into numbers. It is, however, important to realize that although they are numerical,

these data are still categorical and therefore linked to specific statistical measures and tests.

5.4. Missing values

In Prism missing values are represented by empty cells. During import you can specify the value that

you missing have (e.g. NA, a very high value) so Prism can recognize then and represent them as

empty cells. Prism never treats an empty cell as a zero, it knows that it is a missing value.

5.5. Import data

Before you can enter, paste or import data in Prism, you have to create a new data table:

in the upper toolbar -> New Data Table (+ Graph)

File in top menu -> New -> New Data Table and Graph

This opens a window that is very similar to the Welcome dialog (see section 3.1) where you can

specify the type of data table you want to create.

Page 14: Tutorial Prism

14

First you have to specify if you want to enter new data or work with the built-in example data. For

either choice you have to specify the details of the data. This is exactly the same procedure as

described for the welcome dialog (see section 3.1). Note that for a table in which you are going to

enter data, you have to specify exactly what the data look like: e.g. the number of replicates,

whether you will use pre-computed standard errors or not…

There are six ways of entering data into Prism:

1. Manually type in the data values in a table

2. Copy from another Prism table and paste

3. Copy from an Excel table and paste

4. Import an Excel file

5. Import a .txt or .csv file

6. Automatically generate data values according to a mathematical formula

5.5.1. Manually enter data in Prism

Select a cell with the mouse and simply type in the value you want to enter

5.5.2. Copy from another Prism table and paste

You can copy/paste data from one Prism table to another. To copy data from a Prism table, you have

to select the data you want to copy and follow one of the following strategies:

Edit in the Top menu -> Copy

Right click the selection -> Copy

Copy ( ) in the clipboard section of the upper toolbar

Paste the data in the other table by placing your cursor in the cell that will become the upper-left

corner of the pasted data and follow one of the following strategies:

Edit in Top menu -> Paste -> Paste Data / Paste Embed / Paste Link

Right click the cell in the new data table -> Paste -> Paste Data / Paste Embed / Paste Link

Edit in Top menu -> Paste special

Paste ( ) in the clipboard section of the upper toolbar

Paste special ( ) in the clipboard section of the upper toolbar

. When you paste, you have the following options:

Paste only the values

Keep a link to the original file: when the original file is changed, the copy is automatically

changed accordingly

Embed (make a new copy) of the original table inside your new Prism table

If you want to paste link, you have to copy each column separately.

For examples on copying and pasting data from one Prism table to another, see the Prism user guide:

http://www.graphpad.com/guides/prism/6/user-guide/paste_linking_data_from_prism.htm

Page 15: Tutorial Prism

15

5.5.3. Copy from an Excel table and paste

You can also copy data from Excel files by performing a regular copy in Excel via Ctrl + C. Pasting is

done in exactly the same manner as described for pasting data from Prism tables (see section 5.5.2).

Again, if you want to paste link, you have to copy each column separately.

Linking and embedding Excel files works only in Windows when Office is installed (so it will not work

on our training laptops).

5.5.4. Import data files

You can import complete data files into a Prism table using one of these strategies:

Import ( ) button in upper toolbar

File in top menu -> Import

Scroll to the directory that holds the file you want to import and select the correct file type. Select

the file and click Open.

Prism opens the Import window that contains multiple tabs.

The Source tab will let you choose whether to embed or link to the original file (Windows only):

Insert data only will not keep a link to the original file

Insert and maintain link will keep the link

If you choose to keep a link and you change something in the original Excel file, the change will

become apparent in the Prism copy once you have clicked Save in Excel. This is different with paste

linking, where you see the change in the copy table from the moment you have made it in the

original table.

The View tab allows you to preview the result of your data import.

The Filter tab allows to specify the representation of missing values in your data set and to exclude

rows or columns from the import.

Page 16: Tutorial Prism

16

The Placement tab allows to specify the location of the column names and to rearrange the data as

you bring it into Prism.

Transpose means that you switch rows and columns: the data that are located in row 1 will

transfered to column 1 and vice versa and this for all rows and columns:

Page 17: Tutorial Prism

17

If all data are stacked into a single column (or row) and you want to organize the data into multiple

columns you can use the By rows and By columns options.

An example of a data set consisting of a single column:

Aa_replicate1 A B

Aa_replicate2 -> a replic1 replic2 replic3 replic1 replic2 replic3

Aa_replicate3 ? b replic1 replic2 replic3 replic1 replic2 replic3

Ab_replicate1

Ab_replicate2

Ab_replicate3

Ba_replicate1

Ba_replicate2

Ba_replicate3

Bb_replicate1

Bb_replicate2

Bb_replicate3

There are two grouping variables: A and B along the columns and 1, 2, 3, 4 and 5 along the rows.

Each measurement was repeated thrice. To load this data into a Grouped Table with 5 rows, 2

columns and 3 subcolumns each, you can use the following settings:

Import from CSV files

When your data is located in a CSV file, you have to import the data into Prism. You cannot copy

from these files and paste to Prism.

CSV stands for comma separated value. Originally this file type was designed to hold data from tables

with on each row data values that belong to different columns separated by commas, hence the

name. In CSV files that are made on an American version of Windows this still is the case. However,

in Europe the comma was already used as a decimal separator. This is why CSV files that are made on

a European Windows use the semicolon (;) as a column separator.

Page 18: Tutorial Prism

18

Import from such files is done in exactly the same manner as from Excel files with the exception that

you have to specify the role of the comma.

Note that you can't open a text file directly from Prism's Welcome dialog or with the File Open

command. To import a file, you must first create a new Prism project (or open an existing one), go to

a data table, position the insertion point, and then choose the Import command.

5.5.6. Create X-values of XY tables automatically

Often the X column of an XY table is a series of values that follow a mathematical formula, e.g.

increasing by 1... To create an X column like this you have to select the cell of the X column where

you want to start the series and choose:

Insert in Top menu -> Create Series

Insert a sequence of numbers ( ) in the Change section of the upper toolbar

This opens the Create Series window:

Note that you can use this for any column in any table but in practice you mostly use it for generating

X- values.

5.6. Open existing Prism Projects

To open an existing Prism Project you can choose one these two strategies:

Open File in Welcome dialog window -> browse to folder or file to open it

File in top menu -> Open

After you have used Prism a bit, you may see files listed under the heading Unsaved Files. When you

exit Prism, it asks you whether you want to save the changes to every open file. If you click No, Prism

still saves the changed file in a special location for four days, and shows it in the list of unsaved files.

Page 19: Tutorial Prism

19

5.7. Change data tables

5.7.1. Change table format

If you made a mistake during the creation of a table you can always change it afterwards e.g. you

want to change the number of sub-columns, you entered standard deviations but your table is

formatted for standard error of the mean…

To change the format of a table:

Table format in the upper left corner of the table

Change data table format ( ) in the change section of the upper toolbar

This opens the Format Data Table window, which contains two tabs:

1. Table Format where you can make general changes to the data table format

In Prism tables, the rows and columns can have names or titles as they are called in Prism.

In most cases you do not use row titles so there’s no point in adding or showing them. However,

when you want to label the data points on a graph, you have to add row titles because they are used

as labels for the data points.

2. Column Titles where you can change the names of the columns

Page 20: Tutorial Prism

20

Another, simpler way to change the title of a column is to place your cursor in the appropriate cell

and just type a name:

Column titles are more important than row titles. You can skip row titles but you have to add column

titles to a table since they are used to:

Identify data sets in a data table when choosing analyses and viewing results

Label the X axis of graphs

Create legends for graphs

5.7.2. Change the name of a table

You may change the name of the entire table. Each time you create a new table, Prism will give it a

default name, e.g. Data1, Data2, Data3.... If you want to give a meaningful name to a table, right click

its default name in the Navigator window and select Rename sheet.

5.7.3. Change column width

See the user guide: http://www.graphpad.com/guides/prism/6/user-guide/column_widths.htm

Page 21: Tutorial Prism

21

5.7.4. Change decimals

To change the decimals (= the number of digits after the decimal separator):

Change in top menu -> Decimal Format

Change decimal format ( ) in Change section of upper toolbar

You can find more details in the user guide: http://www.graphpad.com/guides/prism/6/user-

guide/using_decimal_format.htm

5.7.5. Sorting data

In a table you can either sort rows or sort columns. In most cases you want to sort the rows. Open

the table you want to sort and use the Sort button in the Change section of the upper toolbar:

Depending on the type of table you can select different items in the Sort drop down menu. Sort by X

Value is of course only available for XY tables. Sort by Row Title is only available for tables that

contain row titles. You can always reverse the order of the rows. Below you see the effect of

reversing the order of the rows.

Sorting of columns is not done in tables but you can do it in graphs so we will discuss it later in the

section on graphs.

5.7.6. Excluding data values

You can exclude data values from analyses and graphs:

Exclude ( ) button in the Change section of the upper toolbar

Excluded values are shown in blue italics in the table so they stay visible:

Page 22: Tutorial Prism

22

They are not included in analyses and they are not shown on graphs. From the point of view of

analyses and graphs, exclusion is the same as if you had deleted the value.

Note that you may only exclude data if you have a good reason for doing so!

Try Exercise 2A, 2B, 2C, 3, 4, 5, 6 and 7on the wiki page

6. Performing an analysis in Prism

Analysis is a broad concept in Prism. A lot of different things fall under the heading ‘Analysis’:

Data transformations e.g. normalizing data, log transformation…

Table transformations e.g. filtering a data set (= taking a subset according to some criteria)

Statistical analyses e.g. t-test, ANOVA…

Every ‘analysis’ in Prism starts from the Create New Analysis window. To open this window:

Insert in Top menu -> New Analysis

Analyze ( ) button in the upper toolbar

Page 23: Tutorial Prism

23

Selecting an analysis in this window opens a Parameters window that allows you to set the

parameters of the analysis. The Parameters window looks different for each analysis.

6.1. Transformations

In the Transform, Normalize… section you can choose mathematical transformations (Transform,

Normalize) or table transformations (Prune rows, Transpose X and Y).

Transformations generate results tables that are colored in green and are stored in the Results

section of the Navigator:

You can't edit these tables, but the data sets on green data tables can be graphed and analyzed

further like any other table. Just click the Analyze button again. So you can first transform your data

and do a statistical test on the results.

Page 24: Tutorial Prism

24

6.1.1. Data transformations

6.1.1.1. Standard mathematical transformations

Selecting the Transform option in the Transform, Normalize… section allows you to set the

parameters of the transformation:

Prism contains a long list of predefined transformations, called standard functions but you can also

define a transformation function yourself by selecting User-defined X or Y functions.

For example standardization is done by selecting the built-in transformation: Y = Zscore(Y).

All mathematical transformations that are routinely used for transforming non-normally distributed

data into normally distributed data:

Log transformation: Y = Log(Y)

Square transformation: Y = Y squared

Square root transformation: Y = sqrt(Y)

Reciprocal transformation: Y = 1/Y

Many of the functions include the constant K. You can enter a value for K on the dialog (red). You can

enter one value of K for all data sets or a separate value of K for each data set. To enter different K

values for each data set, choose a data set, enter K, choose another data set, enter its K, and so on.

Rather than entering the value of K, you can hook a constant (see section 7).

If you entered replicate Y values, Prism can transform each replicate or the mean of the replicates.

Page 25: Tutorial Prism

25

If you entered data as mean, SD (or SEM) and N, Prism will transform the error bars as well as the

mean if this is possible.

You can transform both X and Y values.

6.1.1.2. Transformations for pharmacology and biochemistry

Eadie-Hofstee, Hanes-Woolf and Lineweaver-Burk transforms are available for plotting enzyme-

kinetic results, Scatchard transforms to visualize radioligand binding and Hill plots for dose-response

data.

You should use these transforms only as a way to display data, not as a first step in analyzing data.

For analysis use nonlinear regression on the actual untransformed data.

6.1.1.3. Normalization

Selecting the Normalize option allows you to set the parameters of the normalization:

You define the range (min and max) of the rescaled data: the new scale is set between 0% and 100%.

You can define 0% as the smallest value in each column, the values in the first row or to a value that

you specify. Similarly, you can define 100% as the largest value in each column, the values in the last

row, a value you specify, or the sum of all the values in each column. For replicates, 0% and 100% are

defined by the mean of the replicates. It is not possible to normalize each replicate separately.

You can choose to express the normalized values as fractions or percentages.

Note that X-values cannot be normalized: they are simply copied to the results table. Errors are

normalized appropriately.

Page 26: Tutorial Prism

26

6.2. Table transformations

The Transform, Normalize… section contains table transformations (Prune rows, Transpose X and Y).

6.2.1. Filtering the data set

The Prune rows option can be used to filter the rows of a table in order to create a smaller table, a

subset that only contains rows that fulfill certain criteria. It means that you throw out the rows that

do not fulfill the criteria. Selecting the Prune rows option allows you to specify the criteria:

6.2.2. Transposing the data set

Transpose X and Y will switch the rows and the columns of a table: the rows become columns and

the columns become rows. You can specify titles for columns and row in the Parameters window.

Page 27: Tutorial Prism

27

6.3. Statistical analyses

The statistical analyses are subdivided into different sections according to the table type they can be

performed on. This is why some types of analyses, like Column statistics or Correlation, appear in

multiple sections: they can be performed on different table types:

Analyses generate red results tables that are stored in the results section of the Navigator:

You can perform statistical analyses on these results tables allowing further analysis. Just click the

Analyze button again.

Page 28: Tutorial Prism

28

6.3.1. Automatic detection of outliers

Instead of manually excluding data values (see section 5.7.6), you can ask Prism to do the outlier

detection and elimination. The Identify outliers option in the Column analyses section allows you to

set the parameters of the outlier detection:

Prism has three methods to perform outlier detection:

ROUT

Grubbs’ method

iterative Grubbs

If you are sure that you have no or only one outlier you have to use Grubbs’. If you want to allow the

possibility of finding more than one outlier, choose ROUT. So in practice, you will be always using

ROUT. GraphPad gives the advice not to use the iterative Grubbs’ method.

ROUT first fits a model to the data using a robust method where outliers have little impact. Then it

uses an outlier detection method, based on the false discovery rate, to decide which points are far

enough from the prediction of the model to be called outliers. A full description of the method can

be found in the paper of Motulsky and Brown, 2006 (http://www.biomedcentral.com/1471-

2105/7/123/abstract/).

There is no way to cleanly separate outliers from data values sampled from a Gaussian distribution.

There is always a chance that some true outliers will be missed, and that some "good values" will be

falsely identified as outliers. Therefore, you need to decide how aggressive you define outliers. In the

ROUT method, you have to specify the Q-value (= the maximum desired false discovery rate) e.g. if

you set Q to 1%, then you are aiming for no more than 1% of the identified outliers to be false and

thus for at least 99% identified outliers to actually be outliers.

Box plots can also be used to identify outliers: you can create a box plot in Prism (see section 8.2.4)

but the method is not implemented for automatic detection of outliers.

Remember: don’t remove outliers unless you have a good reason for doing so!

Page 29: Tutorial Prism

29

6.3.2. Calculating descriptive statistics

The Column statistics option in the XY analyses, Column analyses and Contingency table analyses

section allows you to define the statistics you want to calculate:

Column statistics can return the following set of values:

Minimum, Maximum

Q1, Median, Q3

Mean

Standard Deviation

Standard Error of Mean

95% confidence intervals

Coefficient of variation

Geometric mean

Skewness

Kurtosis

As you can see Prism doesn’t check the type of your data. If you enter nominal or ordinal data, it will

calculate means and standard deviations anyway.

Try Exercise 8 on the wiki page

Page 30: Tutorial Prism

30

6.3.3. Checking normality of the data

6.3.3.1. Via a statistical test

As you can see in the figure above, the Column statistics parameters window contains a section

entitled Test if the values come from a Gaussian distribution. This section contains statistical tests

to see if you data are drawn from a normal distribution.

Remember that the D’Agostino-Pearson omnibus test works for all data sets, with or without

duplicate values, this is why it’s recommended.

6.3.3.2. Via a QQ-plot

There is no direct way to create a QQ-plot in Prism but you can use the graph of the cumulative

frequency distribution. To calculate the frequency distribution, select the Frequency distribution

option in the Column analyses section to set the parameters of the analysis:

Select Cumulative frequency distribution in the Create section. If you choose to tabulate the results

as fractions or percentages (in the Tabulate section), Prism offers you the choice of plotting an XY

graph with probability Y axis (under Graph type in the New Graph section).

You can only create QQ-plots for column tables. Since QQ-plots can only be created for the results

of an Analysis and not via a Graph, this restriction cannot be circumvented.

Page 31: Tutorial Prism

31

6.3.3.3. Normality tests in Prism

Prism offers three tests to check whether your data is drawn from a normal (Gaussian) distribution in

the Test if the values come from a Gaussian distribution section of the parameters of the Column

Statistics.

The Shapiro-Wilk test does not work well when there are ties. When you have ties you should use

the D'Agostino-Pearson omnibus test. The Kolmogorov-Smirnov test is only included for compatibility

with older versions of Prism, and is not recommended. You can perform both the Shapiro-Wilk and

the D’agostino-Pearson test. Since both tests use a different method to check normality, they can

give different results!

Both tests return a p-value for H0: all values are sampled from a Gaussian distribution

p-value > 0.05: you have no good reason to believe that the data is not drawn from a

Gaussian distribution. So your data set passed the normality test.

p-value <= 0.05: the data are not sampled from a Gaussian distribution.

6.3.4. Comparing the mean or median to a hypothetical value

Prism offers a parametric t-test and a non-parametric Wilcoxon signed-rank test in the Inferences

section of the parameters of the Column Statistics. You can enter the hypothetical value to which

you wish to compare the mean (t-test) or median (Wilcoxon test). This value is often 0 or 100 (when

values are percentages) or 1 (when values are ratios).

Try Exercise 9 on the wiki page

Page 32: Tutorial Prism

32

6.3.5. Creating a histogram

Just like QQ-plots (see section 6.3.3.2), histograms are graphs that are created for the results of a

Frequency distribution analysis, which means that you can only create them for column tables.

Select the Frequency distribution option in the Column analyses section to set the parameters of the

frequency distribution analysis:

The Create and Tabulate sections allow you to choose to plot absolute (number of values), relative

(fractions or percentages) or cumulative frequencies.

Frequency versus cumulative frequency distribution in Prism.

To calculate the frequency distribution, continuous data must be made discrete by defining intervals

of data values or bins e.g. all values between 1.5 and 2.5 are combined in a single bin with center = 2

and width = 1. It means that you sum up the frequencies of all the values in your data set that fall

between 1.5 and 2.5 and plot the total frequency for that bin on the histogram. In the Bin range and

Bin width sections you can specify the range and the width of the bins.

Page 33: Tutorial Prism

33

If you don't create a cumulative distribution, Prism gives you two choices of Graph type in the New

Graph section illustrated below: a histogram with points or a histogram with bars:

Histogram with points versus histogram with bars in Prism.

Histograms with bars are recommended.

Try Exercise 10 on the wiki page

6.3.6. Comparing two groups

Prism offers several parametric and non-parametric tests for column and grouped tables via the t

tests (and non-parametric tests) option:

In the Parameters window you have to specify:

if you have paired or unpaired data

if your data come from normal distributions or not

if the variances between the groups are equal

Page 34: Tutorial Prism

34

If you choose an unpaired test, the Parameters window does not change.

In the Choose test section you can choose to perform an F-test as part of the t-test. This might seem

strange since you have to specify if the variances are equal before Prism starts the t-test. The results

table of the t-test will then also contain the results of the F-test. If you perform a t-test on the

example data for the unpaired t-test, the results of the F-test are at the bottom of the results table:

Page 35: Tutorial Prism

35

If the F test shows that the variances are not equal, it’s not a good idea to rerun the t-test but now

with Welch correction. It’s better either to try to transform the data so that the variances are equal

or to use the Welch test routinely.

If you choose a paired test, you get the following Parameters:

You can choose between a paired t-test and a ratio t-test in the Choose test section of the

Parameters window. Clicking OK generates the following Results table on the example data for a two

sample t-test:

Page 36: Tutorial Prism

36

Prism will test the effectiveness of pairing by calculating the Pearson correlation coefficient

between the control and treated group during the paired test. If the corresponding p-value is small,

the two groups are significantly correlated. This justifies the use of a paired test. If this p-value is

large, you should question whether it makes sense to use a paired test.

This is a bug in Prism!! The answer you see in the second column to the question “Significant

correlation? (P>0.05)” (in this example: Yes) is the answer to the question: Is p > 0.05? and not to the

question: Is the correlation significant ? So in the example above the p-value = 0.41 and thus p > 0.05

but this means that the correlation is not significant!

Try Exercise 11A on the wiki page

6.3.7. Multiple comparisons of two means in Prism

Prism allows you to perform one t-test per row of a grouped data table with replicates.

Select Multiple t tests - one per row in the Grouped analyses section of the Analyze Data window

Prism computes an unpaired t-test for each row and reports the corresponding p-value. There are

two ways to do this calculation:

Fewer assumptions: each row is analyzed individually, without assuming that data from

different rows are sampled from populations with identical variances. But as always when

doing a t-test, you do assume that in each row data from the two columns are sampled from

populations with the same variance. In this approach there are fewer degrees of freedom, so

less power, but you are making fewer assumptions.

More power. You assume that the data from both columns and rows are sampled from

populations with identical variances, so Prism computes one pooled variance. This gives you

more degrees of freedom and thus more power.

Page 37: Tutorial Prism

37

Choosing the right option is not easy. If the data in different rows represent different quantities,

perhaps measured in different units, there is no reason to assume that the scatter is the same in all

rows. So choose "fewer assumptions". If they represent different conditions and the data are

measurements of the same variable, you might assume equal variances and choose "more power".

Prism corrects for multiple comparisons either by using a more stringent definition of statistical

significance (Bonferroni correction) or by controlling the FDR via the method of Benjamini and

Hochberg.

6.3.8. Comparing means of three or more groups

When the groups are defined by a single factor, each group forms a column in a column table and the

analysis is done by selecting One-way ANOVA (and non-parametric) in the Column analyses section.

Groups do not need to have the same size. There’s an example column table for one-way ANOVA.

This opens the Parameters window where you can specify the characteristics of your data sets.

Prism offers four ways to compare three or more data:

1. Unpaired data, normally distributed: One-way ANOVA

2. Unpaired data, not normally distributed: Kruskal-Wallis test

3. Paired data, normally distributed: Repeated measures ANOVA

4. Paired data, not normally distributed: Friedman test

Only the one-way ANOVA can handle data in “mean, SD and N” format, the other three tests cannot.

If you describe your data accurately in the Parameters window, Prism will pick the correct test.

Page 38: Tutorial Prism

38

The Parameters window has three tabs:

1. Experimental design allows you to describe:

if you have paired or unpaired data

if your data sets come from normal distributions or not

2. Multiple comparisons:

ANOVA will only tell you if there is a difference between the groups. It will not tell you which groups

differ. For this you need to do post tests in which you do pairwise comparisons of group means. You

can choose to do all pairwise comparisons or you can compare each group to one control group:

Page 39: Tutorial Prism

39

So when the ANOVA reports a significant difference (p < 0.05) and you want to know which of the

groups are different, you have to choose a post test.

You choose a post test according to the comparisons you want to make:

All pairwise comparisons: Tukey’s post test. Takes into account the scatter of all groups

resulting in more degrees of freedom and thus giving the test more power to detect

differences.

Compare all groups to one control group but not to each other: Dunnett's post test: Takes

into account the scatter of all groups resulting in more degrees of freedom and thus giving

the test more power to detect differences.

You select a set of groups to compare: Bonferroni or Sidak. Bonferroni is generally not

recommended because it is very conservative so you are more likely to miss real differences

especially when you have many groups. So don't use this test with more than five groups.

Both tests compute adjusted p-values and confidence intervals. If you don’t need confidence

intervals use Holm-Sidak because it has more power than the other two tests. Note that you

should specify the pairs of interest before you collect the data. If you base your decision on

the data, it is not appropriate to use one of these tests for selected pairs. In that case, you

have to do all pairwise comparisons.

Fisher’s LSD test does NOT correct for multiple comparisons

Test for linear trend is used when the groups (columns) are arranged in natural order (e.g.

increasing dose) and you want to test if there is a trend e.g. values increase when you go

from left to right column.

3. The Options tab allows you to specify the method for multiple comparisons correction and the

content of the results that are generated by this analysis.

The tests that you can choose here depend on the choices that you have made in the Multiple

Comparisons tab. If you choose to compare every mean to a control mean, you can make the choices

listed above. If you choose to compare every mean with every other mean, you'll be choosing from

the list that is shown below.

Page 40: Tutorial Prism

40

One-way ANOVA

The analysis will generate two results tables:

1. The results table called ANOVA:

The P value tells you if H0 (the groups all have the same mean) is true. In this example, there are at

least two groups that are different (P < 0.05).

In the ANOVA Table:

SS of Treatment (between columns) represent the variation between groups

SS of Residual (within columns) represent the variation within groups

Each of these two measures is divides by its corresponding degrees of freedom (df) to generate the

MS you see in the table:

MS = SS/df

When you calculate the variance between groups: df = number of groups - 1

When you calculate the variance within groups: df = number of subjects - 1

The F statistic is calculated as the ratio of the MS:

If H0 is true, there is no difference between the groups and the variation between groups should be

more or less equal to the variation within groups so F = 1. So the larger F, the more the groups differ.

R square is the fraction of the total variance that is attributable to differences among group means. A

large R square means that most of the variation is caused by the treatment that defines the groups.

Page 41: Tutorial Prism

41

If each group has at least five values, Prism will test if the groups have equal variances using

Bartlett’s test and the Brown-Forsythe test. H0 states that they have equal variances.

2. The results table called multiple comparisons shows which groups differ

You see that the adjusted p-value is not reported because we haven’t explicitly asked to report it,

instead the test reports 95% confidence intervals for the differences between the groups. If you

want to know the adjusted p-values you can select this option in the Options tab:

When you select this option, the adjusted p values will be reported.

When the columns are ordered, e.g. increasing dose, you can test if the column means increase or

decrease systematically as you go from left to right column by selecting the Test for linear trend in

the Multiple comparisons tab:

Page 42: Tutorial Prism

42

This test performs a linear regression between column mean and column number. H0 states that

there is no linear trend. Prism reports the slope and the regression coefficient (R squared) of the

regression as well as the p-value for the linear trend:

Try Exercise 11B and 11C on the BITS wiki

Repeated measures ANOVA

Repeated-measures ANOVA compares the means of three or more groups of dependent data.

This test is based on the assumption that the variances of the differences between all possible pairs

of groups are equal. Equality of variances between sets of differences is also called sphericity. This

assumption is similar to the equality of variances assumption in regular one-way ANOVA but

repeated measures ANOVA, just like the paired t-test, starts with calculating differences between

pairs of data values. So these differences form the input data of the test rather than the individual

data values and this is why you assume that the resulting sets of differences have equal variances. If

this assumption is violated you can adjust the degrees of freedom to obtain a valid F statistic. The

Geisser-Greenhouse correction is a method for doing so.

Page 43: Tutorial Prism

43

The results table of the repeated measures ANOVA is very similar to the one generated for regular

one-way ANOVA.

Just as in the paired t-test, Prism tests if the matching was effective. For this test, H0 states that the

matching is not effective. So if the p-value is high you could consider an ordinary one-way ANOVA.

Another difference is that there are three sources of variability: between columns (groups), between

rows (individuals) and random.

For repeated measures ANOVA, you can use the same post tests as in regular one-way ANOVA.

Prism performs type I ANOVA, which basically means that you can only draw conclusions for the

groups that you have collected data from. Prism cannot perform type II ANOVA, in which you assume

that you have studied two or more groups from an infinite number of possible groups and you want

to draw conclusions that are valid for ALL the possible groups.

Kruskal-Wallis and Friedman test

Following the nonparametric Kruskal-Wallis or Friedman test, Prism can perform Dunn's post test for

comparing either all or selected pairs of groups. Although non-parametric, these tests were

developed for continuous data, thus expecting that each data value is unique. If you have ties in your

data, this expectation is not met and the test cannot calculate an exact p-value. Prism will use an

approximate method to calculate an approximate p-value.

6.3.9. Correlations

Prism calculates correlations for XY or Column tables. Remember: in an XY table you may not

calculate the correlation between X, a variable that you have manipulated, and Y, a variable that you

measured. You may only calculate correlations between two variables that you measured. However,

Prism doesn’t care about this and allows you to calculate correlations between X and Y columns.

To calculate correlations, open the Analyze data window and select correlation:

Page 44: Tutorial Prism

44

This opens the Parameters window:

If you have more than 2 columns, you can specify between which pairs of columns you want to

compute the correlation. You can choose between Pearson and Spearman correlation depending on

Page 45: Tutorial Prism

45

the distribution of your data. Prism also computes a P value for the correlation. If the p-value is small,

you can reject the hypothesis that the correlation is due to random sampling.

Try Exercise 12 on the wiki page

6.4. Choice of analysis

The table below shows which type of statistical analysis is available in Prism for each data table type.

Try Exercise 11D on the wiki page

6.5. Changing analysis results

6.5.1. Excluding columns

To remove columns from an analysis, first open the results table and choose

Analyze different data sets or a different table ( ) in the Change section of the upper toolbar

7. Information sheets

Info sheets are used to record experimental details and constants that you used in analyses. These

constants can be used (hooked) in analyses.

Page 46: Tutorial Prism

46

7.1. Create and edit an Info sheet

If you create a project, Prism will automatically generate an info sheet. If you want to create

additional info sheets:

New button on the upper toolbar -> New Info

Insert in top menu -> New Info

You can simply type info in the information sheet. For instance, suppose you want to use a certain

constant for transformation of your data, just go to an empty row and type transformation constant

at the left and its value at the right.

7.2. How to use Info Sheets

You can "hook" info sheet constants as constants for transformation or graphing (e.g. custom ticks,

axis limits…). The value you hooked is then used in that analysis or graphing. The link is live so the

results will be updated automatically if the constants are changed.

To hook a constant, click the hook ( ) icon. You will see it in many windows next to fields

requiring you to enter a value. For instance in the transform window:

When you click the hook icon, the Hook constant window opens:

Page 47: Tutorial Prism

47

You can select a constant from a list of the constants that you entered in the info sheet.

To insert an Info constant into a graph title, legend, or text object:

Click the info ( ) button in the Write section of the upper toolbar

8. Graphics

By default, Prism automatically creates one graph for each table you create, but you can plot

multiple graphs for a table. And you can plot data from multiple tables on one graph.

8.1. Create a graph

If you want to create an additional graph of a table, choose one of the following strategies:

Insert in Top menu -> New Graph of Existing Data

New in upper toolbar -> New Graph of Existing Data

There are different choices of graphs for different table types.

For each table type Prism displays all the choices on a row that you can horizontally scroll through.

Page 48: Tutorial Prism

48

Although Prism seems to imply that you can only create certain plots for certain table types, this is in

fact not the case. You can create all kinds of graphs for any table type.

You can specify the statistics that are plotted on your graph in the Plot dropdown menus:

When you select a graph type, its name is displayed below (green rectangle).

8.2. Graphs types

8.2.1. Pie chart

Prism links pie charts to Parts of tables. You can show the parts of table as a pie chart, a donut chart,

stacked bars or as a percentage plot.

8.2.2. Dot plots or scatter plots

Prism links dot plots to XY, Column and Grouped tables.

For XY tables with one Y column without replicates, the scatter plot is straight forward but you can

also generate scatter plots for XY tables with multiple Y columns as in the example below.

Page 49: Tutorial Prism

49

If you do have replicates, you can choose to plot the mean and error bars instead of the individual

data points. For the error bars you can choose between SD, SEM and 95% confidence intervals.

But you can also choose to plot individual data points: either Aligned or Staggered.

Aligned means that data points with the same X and Y values will be plotted on top of each other

whereas Staggered will plot them next to each other.

Page 50: Tutorial Prism

50

You cannot switch the X and Y-axis to generate a horizontal plot. For this you have to select Grouped

in the Graph family and choose the horizontal dot plot.

You have to plot the mean and error, Prism doesn’t allow you to plot the individual data points.

If you want to plot individual points for grouped tables, you can select a scatter plot in the Plot

individual values tab:

In the figure on the previous page the two groups, control and treated, are separated but you can

also group the data according to the second grouping variable.

Page 51: Tutorial Prism

51

At the left is an interleaved scatter plot, where the groups are plotted next to each other. You can

also superimpose the groups (put them on top of each other) as you can see at the right.

For column tables, the scatter plot can show every data point along with lines for mean and error

bars for each column but you can choose to leave out lines and error bars, which is often more clear.

Below is an example of a scatter plot for two columns showing individual data points AND the mean

(colored line) AND the error bars (black bars), generated in Prism.

You can also choose a horizontal dot plot displaying the mean and error, which is also very clear.

Page 52: Tutorial Prism

52

Try Exercise 13 on the wiki page

8.2.3. Bar charts

Prism links bar charts to XY, Column, Grouped and Contingency tables.

Bars in bar charts are placed on the graph in order with equal spacing. But sometimes, you want to

position each bar along the X-axis with a position determined by the X coordinate (e.g. time). Then

you need to create a bar chart for an XY table, called spikes plot in Prism:

This is the only bar chart in Prism that will place the bars according to a coordinate. In bar charts for

all other tables the X values are considered as groups labels and plotted with equal spacing.

For column tables, each column becomes a bar with equal spacing between the bars:

Page 53: Tutorial Prism

53

If descriptive statistics are available you can specify which statistics you want to plot.

For grouped tables each column represents a different type of bar. In the example below there are

three columns giving rise to three types of bars: cats, dogs and hamsters. Rows can be plotted along

the X or along the Y axis. Each row is a different instance of that bar, e.g. in the example below there

are four rows. For each row, three bars are plotted one for cats, one for dogs and one for hamsters.

Page 54: Tutorial Prism

54

A contingency table is exactly like a grouped table except that it doesn't have sub-columns for

replicate values so the bar chart will be similar to that of the grouped table except that it will lack

error bars.

8.2.4. Box plots

Prism links box plots to Column and Grouped tables.

Box plots are based on the following descriptive statistics: min, Q1, median, Q3, and max. These

statistics are also called Tukey’s five number summary, so this is what the Tukey in the Plot

dropdown menu points to. So the Tukey option creates a boxplot with whiskers at 1.5 * IQR from the

box and outliers.

The Min to Max option creates a box plot with whiskers at the minimum and maximum of the data

set. Normally, you would prefer Tukey over Min to Max but if a data set is very small it’s a good idea

to choose Min to Max and show all the data points on the plot.

You can change the order of the boxes by selecting a separate box plot instead of an interleaved one.

Try Exercise 14 on the wiki page

Page 55: Tutorial Prism

55

8.3. Choosing a graph for a table

The table below shows which types of graphs are available in Prism for each data table type.

8.4. Changing a graph

8.4.1. Changing the type of an existing graph

Prism automatically generates one graph if you import or enter a table. If this graph type is not the

one you want to make you can change it by opening the Change Graph Type window:

It opens automatically the first time you open a graph in the main window

Change in top menu -> Graph Type

Change Graph Type ( ) in the Change section of the upper toolbar

Page 56: Tutorial Prism

56

8.4.2. Changing features of a graph

Prism lets you customize every feature of a graph in the Format Graph window:

Format Graph ( ) in Change section of upper toolbar

Double-click any aspecific point on the graph (not a data point, axis, title…)

To change specific features you can:

Right click a specific part of the graph e.g. axis, legend, data point…

Change in Top menu -> feature that you want to change

8.4.2.1. Format graph window

In the Format Graph window you can change various aspects of the graph, e.g. the format of the

error bars, labeling data points with row titles (in Additional options section)…

The Format Graph window contains three tabs, the two important ones are:

Appearance allows you to specify what the graph should look like

Data Sets on graph allows you to specify the data shown on the graph

The Appearance tab contains the following sections:

Data Set determines to which data points in the graph, the changes will apply. You can choose to

change features for all data points or for specific subsets.

Page 57: Tutorial Prism

57

Appearance allows plotting different statistics or none. You can choose to show individual replicates

instead of error bars by selecting Each Replicate. To show error bars select Mean/Median and Error.

If you select to choose error bars: you can specify in the Plot dropdown menu which statistic you

want to use for the error bars (standard deviation, standard error of the mean, confidence intervals).

In the Show symbols section you can specify symbol type, size, and color.

Page 58: Tutorial Prism

58

If you pick an open symbol, you have to select a border thickness. Check the Clear option if you want

overlapping points to show through the open symbol. Use the Shape drop-down menu to select a

symbol. Use the More option to use any character from any font on your computer as a symbol.

Use Show bars/spikes/droplines if you want to drop vertical bars from your data points. The bar will

start at the X-axis or whatever Y value you choose and go up (or down) to the Y position of the point.

This is useful when you want to create a bar graph where each bar’s position is determined by its X

value. It is also useful when you want to combine points and bars on one graph as shown below.

In the Show error bars section you can specify the appearance of the error bars. Choose dotted or

solid lines to show an error envelope as in the graph on the left. Use the Show Area Fill button to add

fill between the limits of the error envelope as in the graph on the right.

In the Show connecting line/curve section you can choose the line's color, style, thickness, and

pattern. This section includes choices to have your connecting start either at the first data point or

the graph origin, whether to leave gaps in the connecting line next to the symbols, and whether to

plot lines connecting each replicate for repeated measures in corresponding data sets. Don't confuse

the connecting line – which always goes from data point to data point – with a best-fit curve or line

created by regression. If you have fit a curve through the data, Prism created the curve as a separate

data set. Add the data set to the plot.

The interface of the Format Graph window is different for different graph types and for the same

graph type on different table types. The example shown above is for scatter plots of an XY table,

whereas the Appearance section of a scatter plot of a column table looks like this:

Page 59: Tutorial Prism

59

Depending on the graph type, you can change different aspects of the graph, e.g. for graphs with

boxes you can change the appearance of the boxes, for graphs with dots you can change the

appearance of the symbols. If there are error bars on the graph, you can change their appearance

too. We will just show the example of the Bars section. The other sections are very similar.

In Bars or Bars and boxes (depending on the graph type) you can specify the color, border, pattern

and line width of the border of the bars/boxes:

The additional options section allows you to remove the legend and to label each data point on the

graph with the title of its row (provided you have added row titles of course).

The Data sets on graph tab allows you to

remove columns from the graph

replace columns on the graph

add columns to the graph

Page 60: Tutorial Prism

60

You may add columns from other data sets to the graph.

8.4.2.2. Right clicking parts of a graph

If you right click different parts of the graph you get different lists of features that you can change:

If you click an individual data point, you can change a feature of that individual symbol or bar:

-> Format this point -> Feature that you want to change

But you can also change a feature of the complete column that data point belongs to:

-> Format Entire Data Set -> Feature that you want to change

Or you can a feature of the entire table:

-> Format All Data Sets -> Feature that you want to change

Page 61: Tutorial Prism

61

8.4.2.3. Moving the legend of a graph

To move the legend, just click and drag it to another location.

8.4.2.4. Format Axes

To change the features of the X and Y axis open the Format Axes window by:

Right click an axis on the graph and choose Format Axes

Double click an axis

Click the Format Axes ( ) button in Change section of the upper toolbar

This window has five tabs. On the Frames and Origin tab you can change the Height and the Width of

the Axes.

The X-axis tab allows you to specify the appearance of the X-axis. In an XY-table the X values you

enter into the X column are plotted on the X-axis. The X axis, in this case, is numerical. If the X values

are not evenly spaced, then the points won't be equally spaced. In the X-axis tab you can change the

range, appearance and location of the ticks. To change the range of the X-axis: uncheck the

"Automatically determine the range and interval" box and enter the minimum and maximum value

that you want to plot on the axis. You can also hook a range limit to an info constant.

Page 62: Tutorial Prism

62

For Column tables, column titles are used as labels on the X-axis. For grouped tables, row titles are

used as labels on the X-axis. In these two cases X values are not numerical and they will be equally

spaced on the axis. For these table types, you can only change the appearance of the ticks in the X

axis tab.

The Y-axes tabs are very similar to the X-axis tab. Since Y-axes are always numerical you can change

the range, appearance and location of the ticks for all table types.

Page 63: Tutorial Prism

63

Another useful feature of this window is on the Titles & Fonts tab, where you can choose to show or

hide the titles of the graph and the axes and to change the direction of the title of the Y-axis.

Set this to horizontal since horizontal text is much easier to read than vertical text.

Try Exercise 15a, 15b and 15c on the wiki page

8.4.3. Color schemes

Rather than changing colors of every graph element separately, you can use color schemes. You can

use predefined color schemes or create your own: http://www.graphpad.com/guides/prism/6/user-

guide/using_changing_a_graphs_colors.htm

Page 64: Tutorial Prism

64

8.3.5. Add text to a graph

If you want to add text to a graph (e.g. characters indicating statistical significance…), you can click

the Text ( ) button in the Write section of the upper toolbar.

8.3.6. Changing the order of columns on a graph

Sorting columns is not done in data tables but you can do it in graphs. Open the graph you want to

change and use the Change data set order button in the Change section of the upper toolbar:

Choose to reverse order of data sets, this is the result:

8.4. Cloning a graph

Cloning a graph gives the same result as duplicating a family. Cloning means you make a copy of the

graph, along with the data table and any linked analyses using one of these two strategies:

Clone a graph in the Welcome dialog

-> Data Table (+ Graph) -> Clone a graph

Prism will give you the option of deleting the data and add your new data. You can clone from any

project that is open, used recently, or from projects that you saved as examples.

http://www.graphpad.com/guides/prism/6/user-guide/clone_a_graph.htm

8.5. Making graphs consistent

To make graphs look similar, you can use the Prism Magic (Make Graphs Consistent) tool:

First you have to go to the graph that you want to change

-> Magic ( ) button in the top toolbar

Then you have to choose the graph that you want to use as a template

-> Next

Page 65: Tutorial Prism

65

Select the properties of the template graph you want to apply to your current graph -> OK

8.6. Combining multiple plots

Layouts let you combine several graphs on a single page for printing or publishing, along with data or

results tables, text, and imported images. The graphs in a layout can be from one or several Prism

projects. You can send layouts directly to PowerPoint and Word.

9. Repeating analyses

We have already seen two strategies to easily repeat an analysis on new data (cloning a graph,

duplicating a family) but there is still another strategy that you can use. Suppose you've already

entered data onto an empty data table, it is too late to clone and too late to duplicate a family. Prism

provides a great tool to solve this problem: the Wand (Wizard to ANalyze Data). Use it to analyze

(and graph) the new table just like you already analyzed (and graphed) an existing table, see:

http://www.graphpad.com/guides/prism/6/user-guide/use_the_wand_to_repeat_analyse.htm

10. Export data

Use to export tables in various formats. Works for data tables, result tables and graphs.