Lab 8 - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

Lab 8

Description:

Produces correlation matrix for specified (continuous) variables. ... Score on a knowledge test, 'knwldge' Score on an iq test, 'iq' ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 26
Provided by: TimWi4
Category:
Tags: iq | lab | score

less

Transcript and Presenter's Notes

Title: Lab 8


1
Lab 8
  • Correlation with Listwise and Pairwise Deletion

2
Reporting Correlations in APA
  • r (28) .30, p lt .05
  • r (28) .06, ns

3
Proc Corr
  • Produces correlation matrix for specified
    (continuous) variables.
  • Produces Pearson correlations (unless you request
    Spearman).
  • Can perform pairwise or listwise deletion.
  • Provides descriptive statistics

4
Listwise Deletion
  • Proc Corr NOMISS
  • Var var1 var2 var3
  • Run

5
Listwise Deletion Output
6
Pairwise Deletion
  • Proc Corr
  • Var var1 var2 var3
  • Run
  • Maximizes cases per comparison.
  • Comparisons will probably be based on slightly
    different cases.

7
Pairwise Deletion Output
8
Example
  • 4 variables
  • Commitment (commit) intention to remain in a
    relationship
  • Satisfaction (satis) satisfaction with the
    relationship
  • Investment size (invest) amount of time and
    personal resources that the person has put into
    the relationship
  • Alternative value attractiveness of the
    alternatives to the relationship

9
Data and program
  • Proc corr nomiss
  • Var commit satis invest altern
  • Proc corr
  • Var commit satis invest altern
  • Run
  • Data d1
  • Input _at_1 (commit) (2.) _at_4 (satis) (2.) _at_7
    (invest) (2.) _at_10 (altern) (2.)
  • Cards
  • 20 20 28 21
  • 10 5 31
  • 30 33 24 11
  • 10 15 36
  • 22 18 33 16
  • 31 29 33 12
  • 6 10 12 29
  • 11 12 30
  • 25 23 34 12
  • 10 7 14 32

10
Descriptive Statistics with Proc Corr Listwise
(nomiss)
  • The CORR Procedure
  • 4 Variables commit
    satis invest altern
  • Simple
    Statistics
  • Variable N Mean Std Dev Sum
    Minimum Maximum
  • commit 7 20.57143 9.51940 144.00000
    6.00000 31.00000
  • satis 7 20.00000 9.41630
    140.00000 7.00000 33.00000
  • invest 7 25.42857 9.19886 178.00000
    12.0000 34.00000
  • altern 7 19.00000 8.60233 133.00000
    11.0000 32.00000

11
Listwise (nomiss) Output
  • N 7 Prob gt r under H0 Rho0
  • commit satis
    invest altern
  • commit 1.00000 0.94826 0.81706
    -0.95251
  • 0.0011
    0.0248 0.0009
  • satis 0.94826 1.00000
    0.65998 -0.92796
  • 0.0011
    0.1067 0.0026
  • invest 0.81706 0.65998
    1.00000 -0.84669
  • 0.0248 0.1067
    0.0162
  • altern -0.95251 -0.92796
    -0.84669 1.00000
  • 0.0009 0.0026
    0.0162

12
Descriptive Statistics with Proc Corr Pairwise
  • 4 Variables commit
    satis invest altern
  • Simple Statistics
  • Variable N Mean Std Dev
    Sum Minimum Maximum
  • commit 9 18.33333 9.36750 165.000
    6.00000 31.00000
  • satis 9 18.00000 9.08295
    162.000 7.00000 33.00000
  • invest 9 22.00000 10.77033
    198.000 5.00000 34.00000
  • altern 10 23.00000 9.64941
    230.000 11.00000 36.00000

13
Pairwise (default) Output
  • Prob gt r under H0 Rho0 Number of
    Observations
  • commit satis
    invest altern
  • commit 1.00000 0.95266 0.82621
    -0.96011
  • 0.0003
    0.0115 lt.0001
  • 9 8
    8 9
  • satis 0.95266 1.00000
    0.71057 -0.91786
  • 0.0003
    0.0482 0.0005
  • 8 9
    8 9
  • invest 0.82621 0.71057
    1.00000 -0.85022
  • 0.0115 0.0482
    0.0037
  • 8 8
    9 9
  • altern -0.96011 -0.91786
    -0.85022 1.00000
  • lt.0001 0.0005
    0.0037
  • 9 9
    9 10

14
Correlation w/ Categorical Vars
  • Can separate analysis by categorical variables.
    Will give independent samples correlations.
  • Just like the BY statement in Proc GLM.
  • Proc Corr
  • var Var1 Var2 Var2
  • by categoricalVariable
  • Run

15
Example with Gender added, 1female, 2male
  • Proc corr
  • Var commit satis invest altern
  • By gender
  • Run
  • Data d1
  • Input _at_1 (commit) (2.) _at_4 (satis) (2.) _at_7
    (invest) (2.) _at_10 (altern) (2.) _at_13 (gender)
    (1.)
  • Cards
  • 20 20 28 21 1
  • 10 5 31 1
  • 30 33 24 11 1
  • 10 15 36 1
  • 22 18 33 16 1
  • 31 29 33 12 2
  • 6 10 12 29 2
  • 11 12 30 2
  • 25 23 34 12 2
  • 10 7 14 32 2

16
Female (gender 1) Descriptive Statistics
  • --------------------------- gender1
    -----------------------------
  • 4 Variables commit
    satis invest altern
  • Simple
    Statistics
  • Variable N Mean Std Dev Sum
    Mini Maxi
  • commit 4 20.500 8.22598 82.0
    10.00 30.00
  • satis 4 20.250 9.53502 81.0
    10.00 33.00
  • invest 5 21.000 11.11306 105.0
    5.00 33.00
  • alte 5 23.000 10.36822 115.00
    11.00 36.00

17
Female (gender 1) Correlation Output
  • Prob gt r under H0 Rho0 Number of
    Observations
  • commit satis
    invest altern
  • commit 1.00000 0.95135
    0.69889 -0.98468
  • 0.1994
    0.3011 0.0153
  • 4 3
    4 4
  • satis 0.95135 1.00000
    0.32591 -0.87387
  • 0.1994
    0.6741 0.1261
  • 3 4
    4 4
  • invest 0.69889 0.32591
    1.00000 -0.73770
  • 0.3011 0.6741
    0.1548
  • 4 4
    5 5
  • altern -0.98468 -0.87387 -0.73770
    1.00000
  • 0.0153 0.1261
    0.1548
  • 4 4
    5 5

18
Female (gender 1) Descriptive Statistics
  • Variable N Mean Std Dev Sum Min
    Maximum
  • commit 5 16.60000 10.78425 83.00 6.000
    31.00000
  • satis 5 16.20000 9.36483 81.00
    7.00 29.00000
  • invest 4 23.25000 11.87083 93.00 12.00
    34.00000
  • altern 5 23.00000 10.09950 115.0 12.00
    32.00000

19
Female (gender 1) Correlation Output
  • Number of Observations
  • commit satis
    invest altern
  • commit 1.00000 0.96888 0.96849
    -0.94798
  • 0.0066
    0.0315 0.0141
  • 5 5
    4 5
  • satis 0.96888 1.00000
    0.94622 -0.96479
  • 0.0066
    0.0538 0.0079
  • 5 5
    4 5
  • invest 0.96849 0.94622
    1.00000 -0.98271
  • 0.0315 0.0538
    0.0173
  • 4 4
    4 4
  • altern -0.94798 -0.96479
    -0.98271 1.00000
  • 0.0141 0.0079
    0.0173
  • 5 5
    4 5

20
Plotting scatterplots
  • Proc plot
  • Plot commitsatis commitaltern commitinvest
  • Run
  • Data d1
  • Input _at_1 (commit) (2.) _at_4 (satis) (2.) _at_7
    (invest) (2.) _at_10 (altern) (2.)
  • Cards
  • 20 20 28 21
  • 10 5 31
  • 30 33 24 11
  • 10 15 36
  • 22 18 33 16
  • 31 29 33 12
  • 6 10 12 29
  • 11 12 30
  • 25 23 34 12
  • 10 7 14 32

21
Scatterplot commitsatis
  • Plot of commitsatis. Legend A 1 obs, B 2
    obs, etc.
  • (NOTE 2 obs had missing values.)
  • commit
  • 30 A
    A
  • A
  • A
  • 20 A
  • 10 A A
  • A
  • 0

  • 0 10 20 30
    40
  • satis

22
Scatterplot commitaltern
  • Plot of commitaltern. Legend A 1 obs, B 2
    obs, etc.
  • (NOTE 1 obs had missing values.)
  • commit
  • 30 A A
  • A
  • A
  • 20 A
  • 10 A A A
  • A
  • 0

  • 10 15 20 25 30
    35 40
  • altern

23
Scatterplot commitaltern
  • Plot of commitinvest. Legend A 1 obs, B
    2 obs, etc.
  • (NOTE 2 obs had missing values.)
  • commit
  • 30 A
    A

  • A

  • A
  • 20 A
  • 10 A A
  • A
  • 0
  • 0 10 20 30
    40
  • invest

24
Comparing Dependent Correlations
  • Use the Hotelling-William test when one variable
    is in common (Example in lecture notes)
  • Use the Steiger test when no variables are in
    common (Example in lecture notes)

25
In Class Example
  • Download lab8.sas from Brannicks website.
  • 3 variables
  • Age, age
  • Score on a knowledge test, knwldge
  • Score on an iq test, iq
  • Perform a proc corr, listwise and pairwise.
  • Are there significant differences in the
    variables and are the pairwise and listwise
    results different?
Write a Comment
User Comments (0)
About PowerShow.com