Go to parent GraphPad Prism statistical analyses
For this exercise we will use data of the babies data set. This data set is a csv file containing a collection of data taken for each new mother in a Child and Health Development Study. This dataset was obtained from http://www.stat.berkeley.edu/users/statlabs/labs.html. The data set contains 1,236 measurements of 23 variables:
Click show for a full description of the data set.
|
- id
- pluralty: 5 = single fetus
- outcome: 1 = live birth that survived at least 28 days
- date: birth date where 1096=January 1,1961
- gestation: length of gestation in days where 999=unknown
- sex: infant’s sex where 1=male
- wt: birth weight in ounces
- parity: total number of previous pregnancies including fetal deaths and still births
- race: mother’s race where 0-5=white ; 6=mex ; 7=black ; 8=asian ; 9=mixed ; 10=unknown
- age: mother’s age in years at termination of pregnancy where 99=unknown
- ed: mother’s education where 0=less than 8th grade ; 1=8th-12th grade - did not graduate ; 2=HS graduate – no other schooling ; 3=HS+trade ; 4=HS+some college ; 5=College graduate ; 7=Trade school HS unclear ; 9=unknown
- ht: mother’s height in inches to the last completed inch where 99=unknown
- wt1: mother prepregnancy wt in pounds where 999=unknown
- drace: father’s race where the coding is the same as mother’s race
- dage: father’s age where the coding is the same as mother’s age
- ded: father’s education where the coding is the same as mother’s education
- dht: father’s height wwhere the coding is the same as for mother’s height
- dwt: father’s weight where the coding is the same as for mother’s weight
- marital: 1=married ; 2=legally separated ; 3=divorced ; 4=widowed ; 5=never married
- inc: family yearly income where 0=under 2500 ; 1=2500-4999 ; ... ; 8=12,500-14,999 ; 9=15000+ ; 98=unknown ; 99=not asked
- smoke: does mother smoke? where 0=never ; 1=smokes now ; 2=until current pregnancy ; 3=once did, not now ; 9=unknown
- time: If mother quit, how long ago? where 0=never smoked ; 1=still smokes ; 2=during current pregnancy ; 3=within 1 yr ; 4=1 to 2 years ago ; 5=2 to 3 yr ago ; 6=3 to 4 yrs ago ; 7=5 to 9yrs ago ; 8=10+yrs ago ; 9=quit and don’t know ; 98=unknown ; 99=not asked
- number: number of cigarettes smoked per day for past and current smokers where 0=never ; 1=1-4 ; 2=5-9 ; 3=10-14 ; 4=15-19 ; 5=20-29 ; 6=30-39 ; 7=40-60 ; 8=60+ ; 9=smoke but don’t know ; 98=unknown ; 99=not asked
|
We will make a scatter plot of babies' birth weight (wt) on the X-axis versus length of gestation (gestation) on the Y-axis. As you can see in the description of the file, the gestation column contains missing values which are represented by 999. Prism doesn't know that 999 represents missing values and will treat these values as data values. So we have to replace the 999 by empty cells (representation of missing values in Prism). We can do this during import.
Import the data set.
|
Open the file in a text editor to see that it uses comma's as decimal separators. Specify the role of the comma on the source tab.
As we have already explained in Exercise 11C: Comparing ordered groups in Prism you can define the symbols that were used as missing values in the Filter tab. So during the import the data set 999 as the symbol used to denote missing values.
On the Placement tab specify that column titles are stored in the first row:
Click Import.
|
For a scatter plot of gestation versus weight we need an XY table with wt as X column and gestation as Y column.
Make the appropriate XY table to generate a scatter plot.
|
- Create a new XY table
- Copy the wt column
- Paste Link the wt values in the X column of the new XY table
- Copy the gestation column
- Paste Link the gestation values in the Y column of the new XY table
- Give the new table a meaningful name
|
The graph that is automatically created by Prism is a scatter plot: