[go: up one dir, main page]

0% found this document useful (0 votes)
57 views8 pages

Statistics For Computing II COM 216

The document discusses how to create and analyze a dataset using PSPP statistical software. It covers entering variables and data, assigning value labels, performing univariate and bivariate analyses, and exporting results. Univariate analysis involves studying the effect of one variable on another, while bivariate analyzes the relationship between two dependent variables.

Uploaded by

Isreal friday
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views8 pages

Statistics For Computing II COM 216

The document discusses how to create and analyze a dataset using PSPP statistical software. It covers entering variables and data, assigning value labels, performing univariate and bivariate analyses, and exporting results. Univariate analysis involves studying the effect of one variable on another, while bivariate analyzes the relationship between two dependent variables.

Uploaded by

Isreal friday
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Statistics for Computing II COM 216

CONTINUATION

3.0 Creating a Dataset Step

1: Entering Variables
First download and install PSPP. Upon opening PSPP, you will see a blank data table.
Because no variables have yet been defined, your column headings will all read "var,"
while the row headings will be ordered numerically.

In order to enter the variables for your dataset, you will need to switch from Data View to
Variable View.
You can do this by locating the Variable View tab at the bottom left-hand corner of your
screen, and clicking on it.

Once you are in Variable View, you will be able to enter the variables for your dataset.
You can enter names of the variables under the Name column, and press Tab to cause the
rest of the fields to propagate in accordance with default settings.

For the purpose of this note, lets create a simple dataset with two variables: the first
variable will be (1) height, and the second (2) sex. Click on the first cell under the Name
column, and enter "Height." PressTab, and then click on the second cell under the Name
column, entering the variable "Height." PressTab again. Now the names of your variables
have been successfully entered.

Step 2: Assigning Value Labels for Variables

Before assigning value, what is variable? And types of variables

A variable is a characteristic that can be measured and that can assume different values.
Height, age, income, province or country of birth, grades obtained at school and type of
housing are all examples of variables. Variables may be classified into two main
categories: categorical and numeric. Each category is then classified in two
subcategories: nominal or ordinal for categorical variables, discrete or continuous for
numeric variables. These types are briefly outlined in this section.
Types of variables
There are several types of variables, our focus are :
1. Categorical/numerical and
2. Continuous variables
Categorical variable: A categorical variable (also called qualitative variable) refers to a
characteristic that can’t be quantifiable. Categorical variables can be either nominal or
ordinal.

Nominal variables
A nominal variable is one that describes a name, label or category without natural order.
Sex {Gender, Religious etc}and type of dwelling are examples of nominal variables.

Ordinal variables
An ordinal variable is a variable whose values are defined by an order relation between the
different categories. the variable “behaviour” is ordinal because the category “Excellent” is
better than the category “Very good,” which is better than the category “Good,” etc. There
is some natural ordering, but it is limited since we do not know by how much “Excellent”
behaviour is better than “Very good” behaviour.

It is important to note that even if categorical variables are not quantifiable, they can
appear as numbers in a data set. Correspondence between these numbers and the categories
is established during data coding. To be able to identify the type of variable, it is important
to have access to the metadata (the data about the data) that should include the code set
used for each categorical variable. For instance, categories used in Table 4.2.2 could
appear as a number from 1 to 5: 1 for “very bad,” 2 for “bad,” 3 for “good,” 4 for “very
good” and 5 for “excellent.”

Continuous variables
A variable is said to be continuous if it can assume an infinite number of real values within
a given interval, (a running number). For instance, consider the height of a student. The
height can’t take any values. It can’t be negative and it can’t be higher than three metres.
But between 0 and 3, the number of possible values is theoretically infinite. A student may
be 1.6321748755 … metres tall. In practice, the methods used and the accuracy of the
measurement instrument will restrict the precision of the variable. The reported height
would be rounded to the nearest centimetre, so it would be 1.63 metres. The age, date etc
are another example of a continuous variable that is typically rounded down. Continuous
variables may be either numeric or discrete.

Numeric variables
A numeric variable (also called quantitative variable) is a quantifiable characteristic whose
values are numbers (except numbers which are codes standing up for categories).
Discrete variables
As opposed to a continuous variable, a discrete variable can assume only a finite number
of real values within a given interval. An example of a discrete variable would be the score
given by a judge to a gymnast in competition: the range is 0 to 10 and the score is always
given to one decimal (e.g. a score of 8.5). You can enumerate all possible values (0, 0.1,
0.2…) and see that the number of possible values is finite: it is 101! Another example of a
discrete variable is the number of people in a household for a household of size 20 or less.
The number of possible values is 20, because it’s not possible for a household to include a
number of people that would be a fraction of an integer like 2.27 for instance.
Assigning Value Labels for Variables
Now you may enter the value labels for your variables. In this instance, there are two
values under the variable "sex," namely "male" and "female." In assigning a value label, as
the name implies, we are simply associating a label (i.e., "male" or "female") to a
particular value (i.e., "1" or "2"). This is similar to how such values might appear on a
survey:

(1) Height (enter in inches):


(2) Sex (circle "1" or "2"):
1.Male
2.Female
In the above example, under the second (2) variable "Sex," the value "1" is assigned the
value label
"Male," while the value "2" is assigned the value label "Female."

To assign values for a particular variable, click on the cell under the Values column, and
click on the grey box in the right-hand corner of the cell.

A window will appear, prompting you to enter the value and the value label. For the first
value label, enter "1" in the value field, and then the first label (in this case "Male") in the
value label field. For the second value label, enter "2" in the value field, entering the
second label (in this case "Female") in the value label field.

After you have finished entering all your value labels, click OK. After returning to the
main screen, your Variable View changes

Now that the value labels for the variable "Sex" have been properly assigned, we can begin
entering our data by returning to the Data View. You can do this by clicking on the Data
View tab at the bottom left hand corner of your screen.
Step 3: Entering Data
After clicking on the Data View tab, you will return to the same screen that appeared
when you first opened the program, except now instead of the first and second columns
having the heading "var," they will have as headings "Height" and "Sex" respectively.

Now you can begin entering your data. In this example dataset, we are entering our data in
inches under the first column, and the values "1" and "2" for "Male" and "Female" under
the second column.

Step 4: Saving a Dataset


Now that you have entered your data, you can save your dataset.
To save, open the File menu and click on Save.

Navigate to the location where you want to save your dataset, and then click on the Save
button.

4.0 Univariate Analysis


A univariate analysis is the simplest form of quantitative statistical analysis. It involves the
study of the effects of an independent variable on a single dependent variable.

Performing and Exporting a Univariant Analysis

First, click on the Analyze menu to reveal the various statistical analyses that you can
perform. For the purpose of this note, we will be performing a frequency analysis.
Selecting this particular option allows you to analyze variables individually, rather than in
relation to another variable. Performing this analysis, you can measure individual
properties such as mean, median, mode, etc. To access this function, select Frequencies
under Descriptive Statistics.

Once the Frequencies window appears, you can add the variables you would like to
include in the analysis, moving them from the left list to the right by clicking the arrow. If
you decide you don't want to include a variable you have added after all, simply select the
variable in the right list, and click the arrow to move it back over to the left. Alternatively,
you can simply double-click on the variables to move them.

If you would like more statistical options, you can select them in the Statistics box on the
bottom right of the window. When you're finished, click OK.

The output window should then appear, displaying the results of your analysis. Clicking on
the + sign beside FREQUENCIES on the left will give you the option of viewing a
particular section of the analysis. Double-click on the section heading to jump to it.
You can also export or print your analysis upon its completion. To export, open the File
menu, and click on Export. Alternatively, you can delete the analysis by closing the
Output window.

Navigating to the directory where you would like to save the file, select what format in
which you would like the analysis to be saved.

When finished, click the Save button.


Note. If you do not close the output window after saving your analysis, any further
analyses performed will be added to the output window.

Notice how the second analysis has been added below the first, to the effect that if you
export or print the output window, both analyses will be printed in succession.

5.0 Bivariate Analysis


In a bivariate analysis, neither variable in a study is independent, meaning both variables
are dependent on one another. It is essentially a univariate analysis extended on two
separate variables.

Performing a Bivariant Analysis


Now that we have covered the basics of analyzing data, we will perform a bivariant
analysis on a larger dataset, namely "GSS 2008" or on the General Social Survey
download website.

Once the dataset has been opened, open the Analyze menu, and click on the Crosstabs
option under Descriptive Statistics.

When the Crosstabs window appears, right-click in the box on the left and uncheck Prefer
variable labels, in order to make the variables easier to spot. Then, select the variable
"Sex," and clicking on the top arrow, move it from the box on the left to the Row box on
the top right. Going back to the left box again, select the variable "Zodiac," and click on
the bottom arrow to move it over to the Columns box on the bottom right. Remember, the
dependent variable goes into the Columns box, while the independent variable always goes
into the Row box. When finished, click OK.
The results of your analysis will then appear in your output window.
Performing a Linear Regression
Under the Analyze tab, choose Regression, then select Linear from the two choices.

To conduct a Regression you need to separate the variables from the left list and organize
them into the independent and dependent variable boxes on the right, as shown in Fig. 4-
16 below.

This is the linear regression output window.

Changing the Cell Display


From the Crosstabs window, you can also change the cell display by clicking on the Cells
button.
From here, you can select whatever display options you would like, and then click
Continue.

More Statistical Options


Also from the Crosstabs window, you can select a wider variety of statistical options, by
clicking on the Statistics button.
Since the "Chi-square" (Chisq) function is one of the more commonly used functions, we
will select it, and click Continue.
The output window will appear, displaying the results of your chi-square test.

Recoding the Dataset


Analysis may also be performed by recoding the dataset, particularly if the amount of data
is very substantial, in order to make it easier to work with.

To recode a large dataset into different variables, first open the Transform menu, and then
select Recode into Different Variables.

Once the window appears, select the variable you would like to recode, and then click on
the arrow to move it to the Variables box on the right. In this case, we will select
"Zodiac."

After the variable has been moved over to the right, click on the Old and New Values
button.

You may now enter the old and new values for your variable. In addition, you can also
select a range of values, assigning a new value to that range. In this example, we will first
input a range of 1 through 6 in the Old Value column, and assign a new value of 1 on the
right. Then, click Add.
Then enter the second recoded variable, entering 7 through 9 under the range of the old
value, entering a new value of 2, and click Add again. When finished, click on Continue.

Now that the variable has been recoded, you will need to assign a name to it, in this
example we will use the name "RecZodiac." Then, click Change.

You will notice that the new name appears under the New column in the Variables box.
Click OK when finished.

Using our newly-recoded variable, we will now perform a frequency analysis of "age" and
"RecZodiac."
Access the Frequencies window by clicking on Analyze from the main menu, and
selecting the Frequencies option under Descriptive Statistics (see Fig. 4-8). When the
window appears, first select the "Age" variable, clicking the arrow to move it to the
Variable(s) box on the right.
Then, do the same for the "RecZodiac" variable. When finished, click OK.
The results of your analysis will then appear in the output window.

6.0 Multivariate Analysis


A multivariate analysis is based on the statistical principle of multivariate statistics, which
involves observation and analysis of more than one statistical outcome variable at a time.
Performing a Factor Analysis To conduct a factor analysis, click the "Analyze" drop-down
menu then choose the Factor Analysis option as shown in figure 4-11 below.

From the factor analysis window, choose each and every variable you would like to
include in the data set then simply choose ok to return results in the output window.

This is the extraction window. It grants numerous options such as to change the matrix
type, display type and the maxium iterations for convergences.

This window allows you to adjust the axis rotation. Make sure whichever method you
choose, the Display rotated solution box is checked so it displays properly in the output
window.
This is the factor analysis output window.

7.0 Copying Tables to Microsoft Word


Exporting data from your statistical analysis
In this section of the note, we will cover how to export the contents of your statistical
analysis, so that it the table in the output window can be inserted into a Word document.
Because it is difficult to copy tables in PSPP directly from the output window and directly
into a Word document, the output must be exported
first as an .odt (OpenDocument) file and opened in Word. From there, the table can be
copied from the .odt file, and then pasted into your document.
In order to copy your output to Microsoft Word, first open the File menu, and click on
Export.
Click on the arrow to the right to reveal a drop-down menu, where you can select the type
of file you would like to export the output as. Select OpenDocument (*.odt), and then
click on Save. Saving it with this file extension allows Word to be able to open it.

In Microsoft Word, open the .odt file that was just saved. Select the table, and copying it
from the file, paste it into your document.

You might also like