SlideShare una empresa de Scribd logo
1 de 43
Introduction to SPSS
          Dr Azmi Mohd Tamil
          Universiti Kebangsaan Malaysia
Why SPSS?


There are many statistical programs. Among
   them
•   SPSS
•   SAS
•   EpiInfo
Introduction
                     Programs
•   SPSS
      - Easy to use, point and click
           •   Similar to Microsoft Excel

      - Fairly powerful
Introduction
                     Programs
•   Statistical Analysis Software (SAS)
        - Very powerful
        - Not so easy to use
Introduction
                      Programs
•   Epi Info
        - Centers for Disease Control and Prevention
          (CDC)
        - Free software
        - http://www.cdc.gov/epiinfo/
Introduction
                      Programs
•   Other Programs
       - Sudaan
       - STATA
       - DBStats
Introduction
                       Programs
•   You should know how to use these programs:
        - SPSS
             •   Epi Info for special situations such as sample size
                 calculations

•   Easiest to use
•   Tell you everything you need to know 99% of the
    time
        - Biostatisticians exist for the remaining 1%
Too tough for you?


•   Use Microsoft Excel instead.
•   Instructions available from
    http://161.142.92.104/excel/
SPSS
  What does it stands for?
SPSS?

•   In 1968, Norman H. Nie, C. Hadlai (Tex) Hull and Dale H. Bent,
    developed a software system called “Statistical Package for the Social
    Sciences” (SPSS) at Stanford University. Statistical data were stored
    on punch cards, later on large computer plates for analysis on the
    mainframe running SPSS.
•   In 1983, the first SPSS PC version was developed. In this incarnation,
    SPSS stands for “Superior Performance Software System”.
•   The most current designation is “Statistical Product and Service
    Solution” and aims thereby at the integration between statistics and
    service.
Before using SPSS


•   What are data types and their relevance in
    using SPSS?
•   The association between data types and
    types of statistical test.
Data Collection


• Information is collected on certain
  characteristics, attributes and the qualities of
  interest from the samples
• These data may be quantitative or qualitative
  in nature.
Types of Variables

• Qualitative - categorised based on
  characteristics which differentiate it e.g.
  ethnic - Malay, Chinese, Indian etc.
  Qualitative variables can be classed into
  nominal & ordinal.
• Quantitative - numerical values collected by
  observation, by measurement or by counting.
  Can either be discrete or continuous.
Variable
                Classification
Qualitative                  Quantitative

• Nominal - no rank nor      • discrete - from counting
  specific order e.g.          ie no of children/wives
  ethnic; M, C, I & O.       • continuous - can be in
• Ordinal - has rank/order     fractions, from
  between categories but       measurement e.g. blood
  the difference cannot        pressure, haemoglobin
  be measured.                 level.
Types of Data
Table 1.1 Exam ples of types of data
                                Quantitative
Continuous                             Discrete
Blood pressure, height, w eight, age   Number of children
                                       Number of attacks of asthma per w eek
                                Categorical
Ordinal (Ordered categories)           Nom inal (Unordered categories)
Grade of breast cancer                 Sex (male/female)
Better, same, w orse                   Alive or dead
Disagree, neutral, agree               Blood group O, A, B, AB


  http://www.bmj.com/collections/statsbk/
Variables Types in SPSS

• Qualitative – known as string in SPSS
• Quantitative – known as numeric in SPSS
SO WHAT!


So what’s the big deal about data types?
Statistical Tests - Qualitative
Type of Data Dictates Type of Analysis -
             Quantitative
Learning to use SPSS
          Creating Variables
Data Editor – Data View
                     Title bar
Menu

Toolbar                             Variable
                                    names

                                    Data
                                    Rows




                                    Taskbar
Data Editor – Variable View
Variable Name
•   Unique
•   Not more than 8 characters
•   Consists of letters and numbers only
•   Begins with a letter instead of a number.
•   Try to give a label that means something
•   Cannot include words used as commands by SPSS
    (eg. all, ne, eq, to, le, lt, by, or, gt, and, not, ge, with)
Variable Type, Width & Decimal Point
•    String or numeric?
•    Width of characters? I advise not to exceed
     8 for string.
•    For numeric data, decide on the decimal
     point.
Defining Variables -Exercise
1. Go to Variable View.



2. At the first row of “Variable Name”, type
   “recordno”. Then click on “Type”. You’ll see
   the following requester form.
Defining Variables -Exercise
3. Choose type “string” and number of
   ‘characters’ as 3. Click on OK.
4. This is how it will be displayed in DATA
   EDITOR.
Practice Creating Variables

                            Type
Variable Names                                   Column Formatting
                   Type    Width (Decimal = 0)
Age              Numeric           3                     3
Race             String            1                     4
Residenc         String            8                     8
Marital          String            1                     7
Educate          String            1                     8
Typework         String            1
Learning to use SPSS
          Defining Labels
Coding & Labels
- Determine the coding to be used for each
  variable.
- For qualitative variables, it is recommended to
  use numerical-codes to represent the groups; eg.
  1 = male and 2 = female, this will also simplify
  the data entry process. The “danger” of using
  string/text is that a small “male” is different from a
  big “Male”,
- see Table I.
Coding for Dichotomous Variable

• It is advisable to use 1=present,
  0=absent or 1=higher risk,
  0=lower risk
• But for RR & OR calculation,
  better to code
  1=present, 2=absent.
Coding for Missing Value
• @ blank responses for qualitative variables
• Conventionally coded using a value that is
  not part of a valid response. For example;
  - Gender; M=1, F=2, MV=9
  - Ethnic in East Malaysia; Codes 1 till 14 for races,
    MV=99
Advantage of Coding
• Reduce time for “data entry”.
• Make analysis possible e.g. SPSS wont
  analyse string responses of more than 8
  characters
• Need a proper coding manual
• How to define variables and coding for
  application such as SPSS and Excel are
  available at the dept website
  http://161.142.92.104/excel
  http://161.142.92.104/spss
Defining Labels
•   But using coding, will cause you to end up with a dataset
    with cryptic output, hard to interpret.
                                          Crosstab

                                                          ill
                                                     F          T        Total
              vanilla   F   Count                    18              3        21
                            % within vanilla     85.7%          14.3%    100.0%
                        T   Count                    11             43        54
                            % within vanilla     20.4%          79.6%    100.0%
              Total         Count                    29             46        75
                            % within vanilla     38.7%          61.3%    100.0%



•   So SPSS allows you to define each value with a label, i.e.;
         -   1 = Male
         -   2 = Female
Defining Value Labels (1)


•   I will demonstrate how to
    define value label for
    ‘race’;
•   Click on the three dots on
    the right-hand side of the
    cell. This opens the
    Value Label dialogue
    box.
Defining Value Labels (2)
•   Click in the box marked Value.
    Type in 1. Click in the box marked
    Value Label. Type in Malay.
    Click on Add. You will then see in
    the summary box: 1=Malay.
•   Repeat for Chinese: Value: enter
    2, Value Label: enter Chinese,
    then click Add.
•   Repeat for Indian: Value: enter 3,
    Value Label: enter Indian, then
    click Add.
•   Repeat for Others: Value: enter 4,
    Value Label: enter Others, then
    click Add.
•   When you have finished defining
    all the possible values, click on
    Continue.
Defining Value Labels (3)
•   Test it out by going to
    Data Editor and enter
    the following values 1,
    2, 3 & 4 in the RACE
    column.


•   Click on the VALUE
    LABELS button
Practice Creating Value Labels
          Variables          Value Labels
Marital               1=single
                      2=married
                      3=divorced/widowed
Educatio              1=Nil
                      2=Primary
                      3=Secondary
                      4=Tertiary
Typework              1=Housewife
                      2=Office work
                      3=Fieldwork
Output With Value Labels
                                Crosstab

                                                ill
                                      False           True     Total
vanilla   False   Count                    18              3        21
                  % within vanilla     85.7%          14.3%    100.0%
          True    Count                    11             43        54
                  % within vanilla     20.4%          79.6%    100.0%
Total             Count                    29             46        75
                  % within vanilla     38.7%          61.3%    100.0%
Practice Data Entry
recordno   age   race     residenc   marital    educate    typework

   1       35    Malay      KB       Married   Secondary   Housewife

   2       24    Malay   PASIRMAS    Married   Secondary   Field work

   3       36    Malay      KB       Married   Secondary   Housewife

   4       21    Malay   BACHOK      Married   Secondary   Housewife

   5       21    Malay      KB       Married   Secondary   Field work

   6       20    Malay   KBKERIAN    Married   Secondary   Housewife

   7       34    Malay      KB       Married      Nil      Housewife

   8       29    Malay   BACHOK      Married   Secondary   Field work

   9       37    Malay      KB       Married   Secondary   Housewife

  10       30    Malay   BACHOK      Married   Secondary   Housewife

Más contenido relacionado

La actualidad más candente

Anova ancova manova_mancova
Anova  ancova manova_mancovaAnova  ancova manova_mancova
Anova ancova manova_mancova
Carlo Magno
 
T Test For Two Independent Samples
T Test For Two Independent SamplesT Test For Two Independent Samples
T Test For Two Independent Samples
shoffma5
 
Spss lecture notes
Spss lecture notesSpss lecture notes
Spss lecture notes
David mbwiga
 
Using Spss Transforming Variable - Compute
Using Spss Transforming Variable - ComputeUsing Spss Transforming Variable - Compute
Using Spss Transforming Variable - Compute
Dr Ali Yusob Md Zain
 

La actualidad más candente (20)

Statistical tests for data involving quantitative data
Statistical tests for data involving quantitative dataStatistical tests for data involving quantitative data
Statistical tests for data involving quantitative data
 
Basic guide to SPSS
Basic guide to SPSSBasic guide to SPSS
Basic guide to SPSS
 
Multiple Linear Regression II and ANOVA I
Multiple Linear Regression II and ANOVA IMultiple Linear Regression II and ANOVA I
Multiple Linear Regression II and ANOVA I
 
Anova ancova manova_mancova
Anova  ancova manova_mancovaAnova  ancova manova_mancova
Anova ancova manova_mancova
 
T Test For Two Independent Samples
T Test For Two Independent SamplesT Test For Two Independent Samples
T Test For Two Independent Samples
 
Mancova
MancovaMancova
Mancova
 
SPSS Data Cleaning and Management
SPSS Data Cleaning and ManagementSPSS Data Cleaning and Management
SPSS Data Cleaning and Management
 
Data analysis using spss
Data analysis using spssData analysis using spss
Data analysis using spss
 
Spss lecture notes
Spss lecture notesSpss lecture notes
Spss lecture notes
 
Spss series - data entry and coding
Spss series - data entry and codingSpss series - data entry and coding
Spss series - data entry and coding
 
3. descriptive study
3. descriptive study3. descriptive study
3. descriptive study
 
Using Spss Transforming Variable - Compute
Using Spss Transforming Variable - ComputeUsing Spss Transforming Variable - Compute
Using Spss Transforming Variable - Compute
 
Cohort study
Cohort studyCohort study
Cohort study
 
How to choose a right statistical test
How to choose a right statistical testHow to choose a right statistical test
How to choose a right statistical test
 
Data Analysis using SPSS: Part 1
Data Analysis using SPSS: Part 1Data Analysis using SPSS: Part 1
Data Analysis using SPSS: Part 1
 
Introduction to EpiData
Introduction to EpiDataIntroduction to EpiData
Introduction to EpiData
 
Repeated Measures ANOVA
Repeated Measures ANOVARepeated Measures ANOVA
Repeated Measures ANOVA
 
Manova
ManovaManova
Manova
 
Parametric test - t Test, ANOVA, ANCOVA, MANOVA
Parametric test  - t Test, ANOVA, ANCOVA, MANOVAParametric test  - t Test, ANOVA, ANCOVA, MANOVA
Parametric test - t Test, ANOVA, ANCOVA, MANOVA
 
Health promotion
Health promotionHealth promotion
Health promotion
 

Destacado (6)

How to run Pearson's Chi-square for SPSS
How to run Pearson's Chi-square for SPSSHow to run Pearson's Chi-square for SPSS
How to run Pearson's Chi-square for SPSS
 
How to run Student's t-test on SPSS
How to run Student's t-test on SPSSHow to run Student's t-test on SPSS
How to run Student's t-test on SPSS
 
How to run ANOVA on SPSS
How to run ANOVA on SPSSHow to run ANOVA on SPSS
How to run ANOVA on SPSS
 
How to draw Scatter plot on SPSS
How to draw Scatter plot on SPSSHow to draw Scatter plot on SPSS
How to draw Scatter plot on SPSS
 
How to run Simple Linear Regression on SPSS
How to run Simple Linear Regression on SPSSHow to run Simple Linear Regression on SPSS
How to run Simple Linear Regression on SPSS
 
Running Pearson's Correlation on SPSS
Running Pearson's Correlation on SPSSRunning Pearson's Correlation on SPSS
Running Pearson's Correlation on SPSS
 

Similar a Introduction to spss: define variables

SPSS an intro...
SPSS an intro...SPSS an intro...
SPSS an intro...
Jithin Zcs
 
EXPLAIN SPSS-part1.pdf
EXPLAIN SPSS-part1.pdfEXPLAIN SPSS-part1.pdf
EXPLAIN SPSS-part1.pdf
ahmedMETWALLI12
 

Similar a Introduction to spss: define variables (20)

Data analysis using spss
Data analysis using spssData analysis using spss
Data analysis using spss
 
Spss (1)
Spss (1)Spss (1)
Spss (1)
 
Spss basic Dr Marwa Zalat
Spss basic Dr Marwa ZalatSpss basic Dr Marwa Zalat
Spss basic Dr Marwa Zalat
 
Descriptive Statistics
Descriptive StatisticsDescriptive Statistics
Descriptive Statistics
 
1. chapter i(pasw)
1. chapter i(pasw)1. chapter i(pasw)
1. chapter i(pasw)
 
RSS 2012 Data Entry SPSS
RSS 2012 Data Entry SPSSRSS 2012 Data Entry SPSS
RSS 2012 Data Entry SPSS
 
Software packages for statistical analysis - SPSS
Software packages for statistical analysis - SPSSSoftware packages for statistical analysis - SPSS
Software packages for statistical analysis - SPSS
 
SPSS an intro...
SPSS an intro...SPSS an intro...
SPSS an intro...
 
5 numerical descriptive statitics
5 numerical descriptive statitics5 numerical descriptive statitics
5 numerical descriptive statitics
 
An Introduction to SPSS
An Introduction to SPSSAn Introduction to SPSS
An Introduction to SPSS
 
data analysis techniques and statistical softwares
data analysis techniques and statistical softwaresdata analysis techniques and statistical softwares
data analysis techniques and statistical softwares
 
EXPLAIN SPSS-part1.pdf
EXPLAIN SPSS-part1.pdfEXPLAIN SPSS-part1.pdf
EXPLAIN SPSS-part1.pdf
 
Data Coding and Data Management using SPSS
Data Coding and Data Management using SPSSData Coding and Data Management using SPSS
Data Coding and Data Management using SPSS
 
Introduction to spss
Introduction to spssIntroduction to spss
Introduction to spss
 
FREQUENCIES.ppt
FREQUENCIES.pptFREQUENCIES.ppt
FREQUENCIES.ppt
 
InnerSoft STATS - Analyze
InnerSoft STATS - AnalyzeInnerSoft STATS - Analyze
InnerSoft STATS - Analyze
 
Introduction To SPSS
Introduction To SPSSIntroduction To SPSS
Introduction To SPSS
 
Fundamental of SPSS
Fundamental of SPSSFundamental of SPSS
Fundamental of SPSS
 
trs-3.ppt
trs-3.ppttrs-3.ppt
trs-3.ppt
 
trs-3.ppt
trs-3.ppttrs-3.ppt
trs-3.ppt
 

Más de Azmi Mohd Tamil

Más de Azmi Mohd Tamil (20)

Hybrid setup - How to conduct simultaneous face-to-face and online presentati...
Hybrid setup - How to conduct simultaneous face-to-face and online presentati...Hybrid setup - How to conduct simultaneous face-to-face and online presentati...
Hybrid setup - How to conduct simultaneous face-to-face and online presentati...
 
Audiovisual and technicalities from preparation to retrieval how to enhance m...
Audiovisual and technicalities from preparation to retrieval how to enhance m...Audiovisual and technicalities from preparation to retrieval how to enhance m...
Audiovisual and technicalities from preparation to retrieval how to enhance m...
 
Broadcast quality online teaching at zero budget
Broadcast quality online teaching at zero budgetBroadcast quality online teaching at zero budget
Broadcast quality online teaching at zero budget
 
Video for Teaching & Learning: OBS
Video for Teaching & Learning: OBSVideo for Teaching & Learning: OBS
Video for Teaching & Learning: OBS
 
Bengkel 21-12-2020 - Etika atas Talian & Alat Minima
Bengkel 21-12-2020 - Etika atas Talian & Alat MinimaBengkel 21-12-2020 - Etika atas Talian & Alat Minima
Bengkel 21-12-2020 - Etika atas Talian & Alat Minima
 
GIS & History of Mapping in Malaya (lecture notes circa 2009)
GIS & History of Mapping in Malaya (lecture notes circa 2009)GIS & History of Mapping in Malaya (lecture notes circa 2009)
GIS & History of Mapping in Malaya (lecture notes circa 2009)
 
Blended e-learning in UKMFolio
Blended e-learning in UKMFolioBlended e-learning in UKMFolio
Blended e-learning in UKMFolio
 
How to Compute & Recode SPSS Data
How to Compute & Recode SPSS DataHow to Compute & Recode SPSS Data
How to Compute & Recode SPSS Data
 
Introduction to Data Analysis With R and R Studio
Introduction to Data Analysis With R and R StudioIntroduction to Data Analysis With R and R Studio
Introduction to Data Analysis With R and R Studio
 
Hack#38 - How to Stream Zoom to Facebook & YouTube Without Using An Encoder o...
Hack#38 - How to Stream Zoom to Facebook & YouTube Without Using An Encoder o...Hack#38 - How to Stream Zoom to Facebook & YouTube Without Using An Encoder o...
Hack#38 - How to Stream Zoom to Facebook & YouTube Without Using An Encoder o...
 
Hack#37 - How to simultaneously live stream to 4 sites using a single hardwar...
Hack#37 - How to simultaneously live stream to 4 sites using a single hardwar...Hack#37 - How to simultaneously live stream to 4 sites using a single hardwar...
Hack#37 - How to simultaneously live stream to 4 sites using a single hardwar...
 
Cochran Mantel Haenszel Test with Breslow-Day Test & Quadratic Equation
Cochran Mantel Haenszel Test with Breslow-Day Test & Quadratic EquationCochran Mantel Haenszel Test with Breslow-Day Test & Quadratic Equation
Cochran Mantel Haenszel Test with Breslow-Day Test & Quadratic Equation
 
New Emerging And Reemerging Infections circa 2006
New Emerging And Reemerging Infections circa 2006New Emerging And Reemerging Infections circa 2006
New Emerging And Reemerging Infections circa 2006
 
Hacks#36 -Raspberry Pi 4 Mini Computer
Hacks#36 -Raspberry Pi 4 Mini ComputerHacks#36 -Raspberry Pi 4 Mini Computer
Hacks#36 -Raspberry Pi 4 Mini Computer
 
Hack#35 How to FB Live using a Video Encoder
Hack#35 How to FB Live using a Video EncoderHack#35 How to FB Live using a Video Encoder
Hack#35 How to FB Live using a Video Encoder
 
Hack#34 - Online Teaching with Microsoft Teams
Hack#34 - Online Teaching with Microsoft TeamsHack#34 - Online Teaching with Microsoft Teams
Hack#34 - Online Teaching with Microsoft Teams
 
Hack#33 How To FB-Live
Hack#33 How To FB-LiveHack#33 How To FB-Live
Hack#33 How To FB-Live
 
Skype for Business for UKM
Skype for Business for UKM Skype for Business for UKM
Skype for Business for UKM
 
Introduction to Structural Equation Modeling
Introduction to Structural Equation ModelingIntroduction to Structural Equation Modeling
Introduction to Structural Equation Modeling
 
Safe computing (circa 2004)
Safe computing (circa 2004)Safe computing (circa 2004)
Safe computing (circa 2004)
 

Último

College Call Girls in Haridwar 9667172968 Short 4000 Night 10000 Best call gi...
College Call Girls in Haridwar 9667172968 Short 4000 Night 10000 Best call gi...College Call Girls in Haridwar 9667172968 Short 4000 Night 10000 Best call gi...
College Call Girls in Haridwar 9667172968 Short 4000 Night 10000 Best call gi...
perfect solution
 
Call Girls Bhubaneswar Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Bhubaneswar Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Bhubaneswar Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Bhubaneswar Just Call 9907093804 Top Class Call Girl Service Avail...
Dipal Arora
 
Call Girls Aurangabad Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Aurangabad Just Call 8250077686 Top Class Call Girl Service AvailableCall Girls Aurangabad Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Aurangabad Just Call 8250077686 Top Class Call Girl Service Available
Dipal Arora
 

Último (20)

Pondicherry Call Girls Book Now 9630942363 Top Class Pondicherry Escort Servi...
Pondicherry Call Girls Book Now 9630942363 Top Class Pondicherry Escort Servi...Pondicherry Call Girls Book Now 9630942363 Top Class Pondicherry Escort Servi...
Pondicherry Call Girls Book Now 9630942363 Top Class Pondicherry Escort Servi...
 
Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...
Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...
Book Paid Powai Call Girls Mumbai 𖠋 9930245274 𖠋Low Budget Full Independent H...
 
Call Girls Gwalior Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Gwalior Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Gwalior Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Gwalior Just Call 9907093804 Top Class Call Girl Service Available
 
Night 7k to 12k Navi Mumbai Call Girl Photo 👉 BOOK NOW 9833363713 👈 ♀️ night ...
Night 7k to 12k Navi Mumbai Call Girl Photo 👉 BOOK NOW 9833363713 👈 ♀️ night ...Night 7k to 12k Navi Mumbai Call Girl Photo 👉 BOOK NOW 9833363713 👈 ♀️ night ...
Night 7k to 12k Navi Mumbai Call Girl Photo 👉 BOOK NOW 9833363713 👈 ♀️ night ...
 
(Rocky) Jaipur Call Girl - 09521753030 Escorts Service 50% Off with Cash ON D...
(Rocky) Jaipur Call Girl - 09521753030 Escorts Service 50% Off with Cash ON D...(Rocky) Jaipur Call Girl - 09521753030 Escorts Service 50% Off with Cash ON D...
(Rocky) Jaipur Call Girl - 09521753030 Escorts Service 50% Off with Cash ON D...
 
Premium Call Girls Cottonpet Whatsapp 7001035870 Independent Escort Service
Premium Call Girls Cottonpet Whatsapp 7001035870 Independent Escort ServicePremium Call Girls Cottonpet Whatsapp 7001035870 Independent Escort Service
Premium Call Girls Cottonpet Whatsapp 7001035870 Independent Escort Service
 
Call Girls Jabalpur Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Jabalpur Just Call 8250077686 Top Class Call Girl Service AvailableCall Girls Jabalpur Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Jabalpur Just Call 8250077686 Top Class Call Girl Service Available
 
College Call Girls in Haridwar 9667172968 Short 4000 Night 10000 Best call gi...
College Call Girls in Haridwar 9667172968 Short 4000 Night 10000 Best call gi...College Call Girls in Haridwar 9667172968 Short 4000 Night 10000 Best call gi...
College Call Girls in Haridwar 9667172968 Short 4000 Night 10000 Best call gi...
 
Call Girls Bhubaneswar Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Bhubaneswar Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Bhubaneswar Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Bhubaneswar Just Call 9907093804 Top Class Call Girl Service Avail...
 
Top Quality Call Girl Service Kalyanpur 6378878445 Available Call Girls Any Time
Top Quality Call Girl Service Kalyanpur 6378878445 Available Call Girls Any TimeTop Quality Call Girl Service Kalyanpur 6378878445 Available Call Girls Any Time
Top Quality Call Girl Service Kalyanpur 6378878445 Available Call Girls Any Time
 
Call Girls Horamavu WhatsApp Number 7001035870 Meeting With Bangalore Escorts
Call Girls Horamavu WhatsApp Number 7001035870 Meeting With Bangalore EscortsCall Girls Horamavu WhatsApp Number 7001035870 Meeting With Bangalore Escorts
Call Girls Horamavu WhatsApp Number 7001035870 Meeting With Bangalore Escorts
 
Manyata Tech Park ( Call Girls ) Bangalore ✔ 6297143586 ✔ Hot Model With Sexy...
Manyata Tech Park ( Call Girls ) Bangalore ✔ 6297143586 ✔ Hot Model With Sexy...Manyata Tech Park ( Call Girls ) Bangalore ✔ 6297143586 ✔ Hot Model With Sexy...
Manyata Tech Park ( Call Girls ) Bangalore ✔ 6297143586 ✔ Hot Model With Sexy...
 
Call Girls Dehradun Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Dehradun Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Dehradun Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Dehradun Just Call 9907093804 Top Class Call Girl Service Available
 
Call Girls Aurangabad Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Aurangabad Just Call 8250077686 Top Class Call Girl Service AvailableCall Girls Aurangabad Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Aurangabad Just Call 8250077686 Top Class Call Girl Service Available
 
All Time Service Available Call Girls Marine Drive 📳 9820252231 For 18+ VIP C...
All Time Service Available Call Girls Marine Drive 📳 9820252231 For 18+ VIP C...All Time Service Available Call Girls Marine Drive 📳 9820252231 For 18+ VIP C...
All Time Service Available Call Girls Marine Drive 📳 9820252231 For 18+ VIP C...
 
Call Girls Ludhiana Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 9907093804 Top Class Call Girl Service Available
 
Call Girls Bareilly Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Bareilly Just Call 8250077686 Top Class Call Girl Service AvailableCall Girls Bareilly Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Bareilly Just Call 8250077686 Top Class Call Girl Service Available
 
Call Girls Varanasi Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Varanasi Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Varanasi Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Varanasi Just Call 9907093804 Top Class Call Girl Service Available
 
Call Girls Tirupati Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Tirupati Just Call 8250077686 Top Class Call Girl Service AvailableCall Girls Tirupati Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Tirupati Just Call 8250077686 Top Class Call Girl Service Available
 
Best Rate (Hyderabad) Call Girls Jahanuma ⟟ 8250192130 ⟟ High Class Call Girl...
Best Rate (Hyderabad) Call Girls Jahanuma ⟟ 8250192130 ⟟ High Class Call Girl...Best Rate (Hyderabad) Call Girls Jahanuma ⟟ 8250192130 ⟟ High Class Call Girl...
Best Rate (Hyderabad) Call Girls Jahanuma ⟟ 8250192130 ⟟ High Class Call Girl...
 

Introduction to spss: define variables

  • 1. Introduction to SPSS Dr Azmi Mohd Tamil Universiti Kebangsaan Malaysia
  • 2. Why SPSS? There are many statistical programs. Among them • SPSS • SAS • EpiInfo
  • 3. Introduction Programs • SPSS - Easy to use, point and click • Similar to Microsoft Excel - Fairly powerful
  • 4.
  • 5. Introduction Programs • Statistical Analysis Software (SAS) - Very powerful - Not so easy to use
  • 6.
  • 7. Introduction Programs • Epi Info - Centers for Disease Control and Prevention (CDC) - Free software - http://www.cdc.gov/epiinfo/
  • 8.
  • 9. Introduction Programs • Other Programs - Sudaan - STATA - DBStats
  • 10. Introduction Programs • You should know how to use these programs: - SPSS • Epi Info for special situations such as sample size calculations • Easiest to use • Tell you everything you need to know 99% of the time - Biostatisticians exist for the remaining 1%
  • 11. Too tough for you? • Use Microsoft Excel instead. • Instructions available from http://161.142.92.104/excel/
  • 12. SPSS What does it stands for?
  • 13. SPSS? • In 1968, Norman H. Nie, C. Hadlai (Tex) Hull and Dale H. Bent, developed a software system called “Statistical Package for the Social Sciences” (SPSS) at Stanford University. Statistical data were stored on punch cards, later on large computer plates for analysis on the mainframe running SPSS. • In 1983, the first SPSS PC version was developed. In this incarnation, SPSS stands for “Superior Performance Software System”. • The most current designation is “Statistical Product and Service Solution” and aims thereby at the integration between statistics and service.
  • 14. Before using SPSS • What are data types and their relevance in using SPSS? • The association between data types and types of statistical test.
  • 15. Data Collection • Information is collected on certain characteristics, attributes and the qualities of interest from the samples • These data may be quantitative or qualitative in nature.
  • 16. Types of Variables • Qualitative - categorised based on characteristics which differentiate it e.g. ethnic - Malay, Chinese, Indian etc. Qualitative variables can be classed into nominal & ordinal. • Quantitative - numerical values collected by observation, by measurement or by counting. Can either be discrete or continuous.
  • 17. Variable Classification Qualitative Quantitative • Nominal - no rank nor • discrete - from counting specific order e.g. ie no of children/wives ethnic; M, C, I & O. • continuous - can be in • Ordinal - has rank/order fractions, from between categories but measurement e.g. blood the difference cannot pressure, haemoglobin be measured. level.
  • 18. Types of Data Table 1.1 Exam ples of types of data Quantitative Continuous Discrete Blood pressure, height, w eight, age Number of children Number of attacks of asthma per w eek Categorical Ordinal (Ordered categories) Nom inal (Unordered categories) Grade of breast cancer Sex (male/female) Better, same, w orse Alive or dead Disagree, neutral, agree Blood group O, A, B, AB http://www.bmj.com/collections/statsbk/
  • 19. Variables Types in SPSS • Qualitative – known as string in SPSS • Quantitative – known as numeric in SPSS
  • 20. SO WHAT! So what’s the big deal about data types?
  • 21. Statistical Tests - Qualitative
  • 22. Type of Data Dictates Type of Analysis - Quantitative
  • 23. Learning to use SPSS Creating Variables
  • 24. Data Editor – Data View Title bar Menu Toolbar Variable names Data Rows Taskbar
  • 25. Data Editor – Variable View
  • 26. Variable Name • Unique • Not more than 8 characters • Consists of letters and numbers only • Begins with a letter instead of a number. • Try to give a label that means something • Cannot include words used as commands by SPSS (eg. all, ne, eq, to, le, lt, by, or, gt, and, not, ge, with)
  • 27. Variable Type, Width & Decimal Point • String or numeric? • Width of characters? I advise not to exceed 8 for string. • For numeric data, decide on the decimal point.
  • 28. Defining Variables -Exercise 1. Go to Variable View. 2. At the first row of “Variable Name”, type “recordno”. Then click on “Type”. You’ll see the following requester form.
  • 29. Defining Variables -Exercise 3. Choose type “string” and number of ‘characters’ as 3. Click on OK. 4. This is how it will be displayed in DATA EDITOR.
  • 30. Practice Creating Variables Type Variable Names Column Formatting Type Width (Decimal = 0) Age Numeric 3 3 Race String 1 4 Residenc String 8 8 Marital String 1 7 Educate String 1 8 Typework String 1
  • 31. Learning to use SPSS Defining Labels
  • 32. Coding & Labels - Determine the coding to be used for each variable. - For qualitative variables, it is recommended to use numerical-codes to represent the groups; eg. 1 = male and 2 = female, this will also simplify the data entry process. The “danger” of using string/text is that a small “male” is different from a big “Male”, - see Table I.
  • 33.
  • 34. Coding for Dichotomous Variable • It is advisable to use 1=present, 0=absent or 1=higher risk, 0=lower risk • But for RR & OR calculation, better to code 1=present, 2=absent.
  • 35. Coding for Missing Value • @ blank responses for qualitative variables • Conventionally coded using a value that is not part of a valid response. For example; - Gender; M=1, F=2, MV=9 - Ethnic in East Malaysia; Codes 1 till 14 for races, MV=99
  • 36. Advantage of Coding • Reduce time for “data entry”. • Make analysis possible e.g. SPSS wont analyse string responses of more than 8 characters • Need a proper coding manual • How to define variables and coding for application such as SPSS and Excel are available at the dept website http://161.142.92.104/excel http://161.142.92.104/spss
  • 37. Defining Labels • But using coding, will cause you to end up with a dataset with cryptic output, hard to interpret. Crosstab ill F T Total vanilla F Count 18 3 21 % within vanilla 85.7% 14.3% 100.0% T Count 11 43 54 % within vanilla 20.4% 79.6% 100.0% Total Count 29 46 75 % within vanilla 38.7% 61.3% 100.0% • So SPSS allows you to define each value with a label, i.e.; - 1 = Male - 2 = Female
  • 38. Defining Value Labels (1) • I will demonstrate how to define value label for ‘race’; • Click on the three dots on the right-hand side of the cell. This opens the Value Label dialogue box.
  • 39. Defining Value Labels (2) • Click in the box marked Value. Type in 1. Click in the box marked Value Label. Type in Malay. Click on Add. You will then see in the summary box: 1=Malay. • Repeat for Chinese: Value: enter 2, Value Label: enter Chinese, then click Add. • Repeat for Indian: Value: enter 3, Value Label: enter Indian, then click Add. • Repeat for Others: Value: enter 4, Value Label: enter Others, then click Add. • When you have finished defining all the possible values, click on Continue.
  • 40. Defining Value Labels (3) • Test it out by going to Data Editor and enter the following values 1, 2, 3 & 4 in the RACE column. • Click on the VALUE LABELS button
  • 41. Practice Creating Value Labels Variables Value Labels Marital 1=single 2=married 3=divorced/widowed Educatio 1=Nil 2=Primary 3=Secondary 4=Tertiary Typework 1=Housewife 2=Office work 3=Fieldwork
  • 42. Output With Value Labels Crosstab ill False True Total vanilla False Count 18 3 21 % within vanilla 85.7% 14.3% 100.0% True Count 11 43 54 % within vanilla 20.4% 79.6% 100.0% Total Count 29 46 75 % within vanilla 38.7% 61.3% 100.0%
  • 43. Practice Data Entry recordno age race residenc marital educate typework 1 35 Malay KB Married Secondary Housewife 2 24 Malay PASIRMAS Married Secondary Field work 3 36 Malay KB Married Secondary Housewife 4 21 Malay BACHOK Married Secondary Housewife 5 21 Malay KB Married Secondary Field work 6 20 Malay KBKERIAN Married Secondary Housewife 7 34 Malay KB Married Nil Housewife 8 29 Malay BACHOK Married Secondary Field work 9 37 Malay KB Married Secondary Housewife 10 30 Malay BACHOK Married Secondary Housewife