Lab1

advertisement
STAT – 319
Lab Manual [ Lab 1]
University of Hail
Course Coordinator: Miss Asiya Qureshi
Lab Instructor: Miss.Aljawharah Almuhana
LAB 1
Task of Lab 1
Task 1: Information about the Data Editor Menus
Task 2: Analyze Types of variables one by one.
Task 3: Example of Student Profile of your lab.
Prepared by Ms Asiya Qureshi
Page 1
STAT – 319
Lab Manual [ Lab 1]
The Data Editor displays the contents of the active data file. The information in the Data Editor
consists of variables and cases.
� In Data View, columns represent variables, and rows represent cases (observations).
� In Variable View, each row is a variable and each column is an attribute that is associated with
that variable.
Variables are used to represent the different types of data that you have compiled. A common
analogy is that of a survey. The response to each question on a survey is equivalent to a variable.
Variables come in many different types, including numbers, strings, currency, and dates.
Task 1: Information about the Menus:
Data Editor Menu:
File. Use the File menu to create a new SPSS file, open an existing file, or read in spreadsheet or
database files created by other software programs (e.g., Excel).
Edit. Use the Edit menu to modify or copy data and output files.
View. Choose which buttons are available in the window or how the window should look.
Prepared by Ms Asiya Qureshi
Page 2
STAT – 319
Lab Manual [ Lab 1]
Data. Use the Data menu to make changes to SPSS data files, such as merging files, transposing
variables, or creating subsets of cases for subset analysis.
Transform. Use the Transform menu to make changes to selected variables in the data file (e.g., to
recode a variable) and to compute new variables based on existing variables.
Analyze. Use the Analyze menu to select the various statistical procedures you want to use, such as
descriptive statistics, cross-tabulation, hypothesis testing and regression analysis.
Prepared by Ms Asiya Qureshi
Page 3
STAT – 319
Lab Manual [ Lab 1]
Graphs. Use the Graphs menu to display the data using bar charts, histograms, scatterplots,
boxplots, or other graphical displays . All graphs can be customized with the Chart Editor.
Utilities. Use the Utilities menu to view variable labels for each variable.
Add-ons. Information about other SPSS software.
Window. Choose which window you want to view.
Prepared by Ms Asiya Qureshi
Page 4
STAT – 319
Lab Manual [ Lab 1]
Help. Index of help topics, tutorials, SPSS home page, Statistics coach, and version of SPSS.
Task 2: Analyze Types of variables one by one
There are eight variable types allowed under SPSS. These are:
1.
2.
3.
4.
5.
6.
7.
8.
Numeric
Comma
Dot
Scientific Notation
Date
Dollar
Custom currency, and
String
Prepared by Ms Asiya Qureshi
Page 5
STAT – 319
Lab Manual [ Lab 1]
You will almost always use one of three types; numeric, string or date. A numeric variable is a
number. A date variable is a date, such as "04/14/2008" and a string variable is for character data
such as “Male” or “Single”.
•
•
Numeric
–
A variable whose values are numbers. Values are displayed in standard numeric
format.
–
The Data Editor accepts numeric values in standard format or in scientific notation.
Comma
–
A numeric variable whose values are displayed with commas delimiting every three
places, and with the period as a decimal delimiter.
–
The Data Editor accepts numeric values for comma variables with or without
commas, or in scientific notation.
•
Values cannot contain commas to the right of the decimal indicator.
Prepared by Ms Asiya Qureshi
Page 6
STAT – 319
•
Lab Manual [ Lab 1]
Dot
–
A numeric variable whose values are displayed with periods delimiting every three
places and with the comma as a decimal delimiter.
–
The Data Editor accepts numeric values for dot variables with or without periods, or
in scientific notation.
•
•
Scientific notation
–
A numeric variable whose values are displayed with an imbedded E and a signed
power-of-ten exponent.
–
The Data Editor accepts numeric values for such variables with or without an
exponent.
•
•
A numeric variable whose values are displayed in one of several calendar-date or
clock-time formats. Select a format from the list. You can enter dates with slashes,
hyphens, periods, commas, or blank spaces as delimiters. The century range for twodigit year values is determined by your Options settings (from the Edit menu, choose
Options and click the Data tab).
Custom currency
–
•
The exponent can be preceded either by E or D with an optional sign, or by
the sign alone--for example, 123, 1.23E2, 1.23D2, 1.23E+2, and even
1.23+2.
Date
–
•
Values cannot contain periods to the right of the decimal indicator.
A numeric variable whose values are displayed in one of the custom currency
formats that you have defined in the Currency tab of the Options dialog box. Defined
custom currency characters cannot be used in data entry but are displayed in the Data
Editor.
String
–
Values of a string variable are not numeric and therefore are not used in calculations.
–
They can contain any characters up to the defined length.
–
Uppercase and lowercase letters are considered distinct.
–
Also known as an alphanumeric variable.
Prepared by Ms Asiya Qureshi
Page 7
STAT – 319
Lab Manual [ Lab 1]
Task 3: Example:
Create Student Profile of your lab and define variables as:
1. Variable 1 is Name with Type String of width 12, labeling explaining that its name of
student.
2. Variable 2 is Id with Type Numeric of width 8, labeling explaining that its student
enrollment number.
3. Variable 3 is Date with Type Date of width 12, labeling explaining that its date of birth of
student.
4. Variable 4 is Fee with Type Dollar of width 9, labeling explaining that its student fee.
5. Variable 5 is Status with Type String of width 15, labeling explaining that its Martial
Status. Also Add value labels as S: Single and M: Married.
Enter data (All lab students information)
Prepared by Ms Asiya Qureshi
Page 8
Download