Creating a new project and importing data in Prism
Go to parent GraphPad Prism statistical analyses
Contents
Exercise 1: Importing example data
Data in Prism is organized in a hierarchy. At the top of the hierarchy there are projects, which contain one or several data tables.
So at the start of your analysis you have to create a new project. Let's call it Training.
Open the example grouped data table for creating a grouped bar graph by entering replicate data. |
---|
One possibility for creating a new project is to use the top menu:
This will open the "Welcome" window where you specify which data set you want to use. You can use your own data (top - red) but Prism also includes a list of example data files (bottom - green).
Click Create.
You have created a new project and opened example data in this project but you haven’t named the project yet. To do this you have to save the project. We will do this via the top menu but there are also other ways for saving (see tutorial).
Type a name for the project, let's call it Training. Click Save.
|
So remember that in order to give a project a name, you have to save the project. As long as you do not save the project it has a default name Project 1.
Exercise 2A: Entering your own data
Before you can enter your data you have to create a new table to hold these data. So in the Training project create a new XY table, called Exercise2.
Enter values for:
- X: 12 24 7 21 18 5 14
- Y1: 5 3 4 4 5 4 5
- Y2: 5 5 2 5 18 1 1
Y2 is not a replicate of Y1, it contains measurements for another group of individuals.
Create the table. |
---|
Just like you can create a new project, you can also create a new data table. Again we will use the top menu for this:
This opens the New Data Table and Graph window.
When you create a new table the first thing you need to do is tell Prism which type of table you want to create (left - red).
In this exercise we will enter raw data for X and Y. Click Create.
You have entered the data but you haven't given a name for the table yet. Prism just gives it a default name like Data 2. Rename the table by right clicking its name in the navigator and select Rename Sheet.
|
So notice that you can precisely specify the details of your data set (number of replicates, raw data or not…)
Exercise 2B: Importing your own data in an XY table
Import the Galileo data set. It's a comma separated value file and it corresponds to an XY table in Prism. Csv files are plain text representations of tables. They consist of lines of text. Each line consists of a series of values, one value for each column of the table. All values are separated by a comma.
This file contains data recorded by Galileo in 1609 during his investigations of the trajectory of a falling body:
- init.h: initial height of the ball
- h.d: horizontal distance traveled
Import the data set. |
---|
So this time we do not want to enter the data ourselves, we will fetch the data from an existing file. First we have to create a new data table to hold the data (File -> New -> New data table and graph), see Exercise 2A for details. We import the data in this new data table. Again we use the top menu:
Then you just browse to the file you want to import, select it and click Open.
This opens the Import and Paste Special Choices window. Here you can specify exactly how Prism should interpret the file. The most important feature is specifying the meaning of commas. Since it's a csv file it means that commas are used to separate data values from different columns:
Click Import.
|
So remember that when you import a text file (.txt or .csv) you have to create a new data table first to hold the data and you have to specify the role of the commas.
Exercise 2C: Importing your own data in another table type
Import the cfb data set. The data set is a csv file containing a survey of people’s finances. For details on importing data from csv files see Exercise 2B.
First open the file in a text editor so that you know:
- the separator that was used
- the type of data table
Which character is used to separate the columns ? |
---|
As you can see a semicolon is used to separate the columns instead of a comma. This is also a valid separator for csv files. On American Windows a comma is used as a separator for columns while the European Windows uses a semicolon. |
You do see commas in the file.
What is the meaning of the commas in this file ? |
---|
As you can see the comma is used as a decimal separator in this file. American Windows uses a point (dot.) as a decimal separator while European Windows uses a comma. |
Is this an XY table ? |
---|
No, the first column does not contain X-values. Instead each column contains values for one specific variable. Each row contains the data values of one specific person. |
Import the file into Prism. |
---|
|
So remember that European Windows computers will generate csv files using a semicolon as column separator and a comma as decimal separator.
Exercise 3: Automatically generating values of an XY table
When the data values you want to use are defined by a mathematical function, it is possible to create them automatically in Prism using this mathematical function.
For instance create a new XY table, called Exercise3:
- X: automatically create X-values, start at 0 increment with 1 and stop at 22
- Y: automatically create Y-values, start at 5 increment with 1
Create the table. |
---|
First create a new XY table using New Data Table and Graph (see Exercise 2A). Once created you can fill it with data values:
This will open the Create Series window. Here you have to specify the function that will generate the series of values that you need.
This generates the table that you need:
Don't forget to rename the table as Exercise3. |