1 / 17

Factor Analysis with STATA

Factor Analysis with STATA. Megie Okumura, MD MAS Bonnie Halpern- Felsher , PhD. First steps. Open your dataset Look at your data What’s your n? What are your variables? Do they make sense to you (can they scale)? Now lets eyeball the data. Contains data from factorpractice.dta

catori
Download Presentation

Factor Analysis with STATA

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Factor Analysis with STATA Megie Okumura, MD MAS Bonnie Halpern-Felsher, PhD

  2. First steps • Open your dataset • Look at your data • What’s your n? • What are your variables? • Do they make sense to you (can they scale)? • Now lets eyeball the data Contains data from factorpractice.dta obs: 228 vars: 24 2 Dec 2012 00:02 size: 7,524

  3. Correlation Coefficients pwcorr T2Q61 T2Q48 T2Q54 T2Q60 T2Q63 T2Q51 T2Q66 T2Q56 T2Q59 /// > T2Q64 T2Q58 T2Q65 T2Q67 T2Q62 T2Q49 T2Q53 T2Q55 T2Q57 T2Q47 T2Q52 | T2Q61 T2Q48 T2Q54 T2Q60 T2Q63 T2Q51 T2Q66 -------------+--------------------------------------------------------------- T2Q61 | 1.0000 T2Q48 | 0.5314 1.0000 T2Q54 | -0.4690 -0.4539 1.0000 T2Q60 | 0.6125 0.3943 -0.3513 1.0000 T2Q63 | -0.3940 -0.2740 0.3550 -0.4696 1.0000 T2Q51 | 0.3951 0.5577 -0.4355 0.2762 -0.2649 1.0000 T2Q66 | 0.3446 0.4207 -0.3109 0.3154 -0.3077 0.3222 1.0000 T2Q56 | -0.2312 -0.1587 0.4882 -0.2022 0.2432 -0.1280 -0.1969 T2Q59 | 0.2433 0.3543 -0.1595 0.2335 -0.2009 0.2000 0.2372 T2Q64 | 0.2382 0.1918 -0.1691 0.1389 0.0117 0.2242 0.1968 T2Q58 | 0.3230 0.3665 -0.1634 0.1993 -0.1868 0.3450 0.2759 T2Q65 | 0.1512 0.2074 -0.1497 -0.0023 -0.0550 0.1532 0.2999 T2Q67 | 0.2607 0.3169 -0.2421 0.1518 -0.2497 0.2549 0.3681 T2Q62 | 0.2401 0.2347 -0.1380 0.1464 -0.0208 0.2180 0.0866 T2Q49 | 0.3449 0.4767 -0.1767 0.2485 -0.1055 0.3276 0.2959 T2Q53 | 0.0080 0.0439 0.0222 -0.0274 -0.0536 0.1326 -0.0357 T2Q55 | 0.0675 0.0334 -0.0218 -0.0288 -0.1806 0.0886 0.0587 T2Q57 | 0.2496 0.2746 -0.2105 0.2120 -0.2132 0.1875 0.1196 T2Q47 | 0.1883 0.2173 -0.0443 0.0746 -0.0004 0.0750 0.0380 T2Q52 | 0.1517 0.0822 -0.0351 -0.0075 -0.0092 0.2039 0.1372

  4. Looking at the variables

  5. Factor Analysis Factor analysis/correlation Number of obs = 203 Method: principal factors Retained factors = 10 Rotation: (unrotated) Number of params = 155 -------------------------------------------------------------------------- Factor | Eigenvalue Difference Proportion Cumulative -------------+------------------------------------------------------------ Factor1 | 4.59003 2.99854 0.6339 0.6339 Factor2 | 1.59149 0.90474 0.2198 0.8536 Factor3 | 0.68676 0.25487 0.0948 0.9485 Factor4 | 0.43189 0.02867 0.0596 1.0081 Factor5 | 0.40322 0.02800 0.0557 1.0638 Factor6 | 0.37522 0.04941 0.0518 1.1156 Factor7 | 0.32581 0.09739 0.0450 1.1606 Factor8 | 0.22842 0.09876 0.0315 1.1922 Factor9 | 0.12966 0.08858 0.0179 1.2101 Factor10 | 0.04109 0.04237 0.0057 1.2157 Factor11 | -0.00128 0.05673 -0.0002 1.2156 Factor12 | -0.05801 0.00922 -0.0080 1.2076 Factor13 | -0.06723 0.02577 -0.0093 1.1983 Factor14 | -0.09300 0.06191 -0.0128 1.1854 Factor15 | -0.15491 0.01814 -0.0214 1.1640 Factor16 | -0.17305 0.01980 -0.0239 1.1401 Factor17 | -0.19285 0.03364 -0.0266 1.1135 Factor18 | -0.22649 0.03687 -0.0313 1.0822 Factor19 | -0.26336 0.06873 -0.0364 1.0459 Factor20 | -0.33208 . -0.0459 1.0000 --------------------------------------------------------------------------

  6. Humm.. That’s a lot of factors • We can decrease the number through • Praying (or Magic 8 ball) • Eyeballing • Scree plots • Parallel Analyses

  7. Scree plot –scree-

  8. Parallel Analysis-fapara, reps(10)-

  9. Parallel Analysis –paran-

  10. Ok, now for the loadings

  11. Orthogonal Rotation: completely independent (-rotate-) Rotated factor loadings (pattern matrix) and unique variances ----------------------------------------------------------- Variable | Factor1 Factor2 Factor3 | Uniqueness -------------+------------------------------+-------------- T2Q61 | 0.6623 0.1518 0.2520 | 0.4748 T2Q48 | 0.5937 0.1671 0.4267 | 0.4375 T2Q54_r | 0.6934 0.0779 -0.0135 | 0.5129 T2Q60 | 0.6480 -0.0253 0.1412 | 0.5596 T2Q63_r | 0.5991 0.0575 -0.0016 | 0.6377 T2Q51 | 0.5207 0.2781 0.2390 | 0.5944 T2Q66 | 0.4839 0.2333 0.0778 | 0.7054 T2Q56_r | 0.4486 -0.0883 -0.0782 | 0.7848 T2Q59 | 0.2343 0.0917 0.5119 | 0.6747 T2Q64 | 0.0962 0.5848 0.1892 | 0.6130 T2Q58 | 0.2527 0.5003 0.3677 | 0.5506 T2Q65 | 0.0886 0.6656 0.0426 | 0.5473 T2Q67 | 0.2746 0.4976 0.1382 | 0.6579 T2Q62 | 0.1148 0.5112 0.0974 | 0.7160 T2Q49 | 0.2670 0.2344 0.5383 | 0.5840 T2Q53 | -0.0642 0.4142 0.0658 | 0.8200 T2Q55 | 0.0014 0.3534 0.1992 | 0.8354 T2Q57 | 0.2426 0.1809 0.4299 | 0.7236 T2Q47 | 0.0014 0.0969 0.4538 | 0.7847 T2Q52 | 0.0231 0.2550 0.1307 | 0.9174 -----------------------------------------------------------

  12. Rotating Factors (Intuitively) F2 F2 2 3 3 2 1 1 F1 4 4 F1 • Factor 1 Factor 2 • x1 0.5 0.5 • x2 0.8 0.8 • x3 -0.7 0.7 • x4 -0.5 -0.5 • Factor 1 Factor 2 • x1 0 0.6 • x2 0 0.9 • x3 -0.9 0 • x4 0 -0.9

  13. Factor Loadings Factor loadings (pattern matrix) and unique variances ---------------------------------------------------------------------------------------------- Variable | Factor1 Factor2 Factor3 Factor4 Factor5 Factor6 Factor7 Factor8 -------------+-------------------------------------------------------------------------------- T2Q61 | 0.6727 -0.2697 0.0036 -0.0078 0.0808 0.2040 -0.1619 0.0214 T2Q48 | 0.7107 -0.1762 0.1626 0.2125 -0.1422 0.1018 0.0381 -0.0475 T2Q54 | -0.5358 0.4005 0.1989 0.0209 0.2387 0.1655 0.1437 0.0367 T2Q60 | 0.5199 -0.4124 -0.0086 -0.0384 0.2800 0.2171 -0.1188 -0.0028 T2Q63 | -0.4624 0.3510 0.1588 0.1534 -0.2508 0.0800 -0.1730 0.1314 T2Q51 | 0.6298 -0.0883 -0.0339 0.0164 -0.2403 0.0731 0.1098 -0.1355 T2Q66 | 0.5065 -0.1311 -0.1447 0.2008 0.0746 -0.0664 0.2547 0.1813 T2Q56 | -0.2430 0.3746 0.1258 0.1276 0.1725 0.2553 0.0939 -0.0564 T2Q59 | 0.4504 0.0229 0.3492 -0.0110 0.0775 -0.1362 0.0853 -0.0256 T2Q64 | 0.4591 0.4013 -0.1230 0.0303 0.0613 -0.0486 -0.2223 0.0784 T2Q58 | 0.6099 0.2760 0.0352 -0.2145 -0.0560 0.1118 0.0970 0.1523 T2Q65 | 0.4287 0.4334 -0.2847 0.1869 0.0534 -0.0622 -0.0294 0.0706 T2Q67 | 0.5197 0.2104 -0.1666 0.1026 0.1072 -0.1328 0.0527 0.0255 T2Q62 | 0.3926 0.3161 -0.1730 -0.0687 -0.0722 0.1502 -0.1260 -0.0722 T2Q49 | 0.5601 0.1105 0.3000 0.1872 -0.0607 0.0000 0.0436 -0.0521 T2Q53 | 0.1984 0.3563 -0.1171 -0.0658 0.0092 0.0624 0.0231 -0.2103 T2Q55 | 0.2751 0.2979 0.0114 -0.1291 0.0991 -0.1915 0.0380 -0.2027 T2Q57 | 0.4653 0.0645 0.2361 -0.2866 0.0671 -0.1277 -0.0622 0.1290 T2Q47 | 0.2582 0.1666 0.3476 0.0778 0.0069 -0.1027 -0.1603 -0.0092 T2Q52 | 0.2085 0.1977 -0.0079 -0.2507 -0.1858 0.1499 0.1694 0.0840 ----------------------------------------------------------------------------------------------

  14. Lets clean it up a bit • Rotated factor loadings (pattern matrix) and unique variances • ----------------------------------------------------------- • Variable | Factor1 Factor2 Factor3 | Uniqueness • -------------+------------------------------+-------------- • T2Q61 | 0.6623 | 0.4748 • T2Q48 | 0.5937 0.4267 | 0.4375 • T2Q54_r | 0.6934 | 0.5129 • T2Q60 | 0.6480 | 0.5596 • T2Q63_r | 0.5991 | 0.6377 • T2Q51 | 0.5207 | 0.5944 • T2Q66 | 0.4839 | 0.7054 • T2Q56_r | 0.4486 | 0.7848 • T2Q59 | 0.5119 | 0.6747 • T2Q64 | 0.5848 | 0.6130 • T2Q58 | 0.5003 0.3677 | 0.5506 • T2Q65 | 0.6656 | 0.5473 • T2Q67 | 0.4976 | 0.6579 • T2Q62 | 0.5112 | 0.7160 • T2Q49 | 0.5383 | 0.5840 • T2Q53 | 0.4142 | 0.8200 • T2Q55 | 0.3534 | 0.8354 • T2Q57 | 0.4299 | 0.7236 • T2Q47 | 0.4538 | 0.7847 • T2Q52 | | 0.9174 • -----------------------------------------------------------

  15. Oblique rotation (-rotate, promax-) • Rotated factor loadings (pattern matrix) and unique variances • ----------------------------------------------------------- • Variable | Factor1 Factor2 Factor3 | Uniqueness • -------------+------------------------------+-------------- • T2Q61 | 0.6119 0.0359 0.2069 | 0.4748 • T2Q48 | 0.4997 -0.0025 0.4153 | 0.4375 • T2Q54_r | 0.7134 0.0424 -0.0914 | 0.5129 • T2Q60 | 0.6460 -0.1245 0.1204 | 0.5596 • T2Q63_r | 0.6155 0.0221 -0.0647 | 0.6377 • T2Q51 | 0.4502 0.1932 0.1721 | 0.5944 • T2Q66 | 0.4538 0.2013 -0.0045 | 0.7054 • T2Q56_r | 0.4961 -0.1050 -0.1073 | 0.7848 • T2Q59 | 0.1173 -0.0912 0.5637 | 0.6747 • T2Q64 | -0.0226 0.5874 0.0724 | 0.6130 • T2Q58 | 0.1121 0.4188 0.2915 | 0.5506 • T2Q65 | -0.0091 0.7302 -0.1201 | 0.5473 • T2Q67 | 0.1863 0.4938 0.0190 | 0.6579 • T2Q62 | 0.0273 0.5349 -0.0195 | 0.7160 • T2Q49 | 0.1259 0.0583 0.5572 | 0.5840 • T2Q53 | -0.1385 0.4493 -0.0186 | 0.8200 • T2Q55 | -0.0915 0.3296 0.1488 | 0.8354 • T2Q57 | 0.1318 0.0374 0.4442 | 0.7236 • T2Q47 | -0.1126 -0.0483 0.5127 | 0.7847 • T2Q52 | -0.0402 0.2407 0.0901 | 0.9174 • -----------------------------------------------------------

  16. How well does the scale hold together? . alpha T2Q64 T2Q58 T2Q65 T2Q67 T2Q62 T2Q53 T2Q55 Test scale = mean(unstandardized items) Average interitem covariance: .1934146 Number of items in the scale: 7 Scale reliability coefficient: 0.7258 . alpha T2Q61 T2Q48 T2Q54_r T2Q60 T2Q63_r T2Q51 T2Q66 T2Q56_r Test scale = mean(unstandardized items) Average interitem covariance: .3217901 Number of items in the scale: 8 Scale reliability coefficient: 0.8130

  17. Oblique: cleaning it up a bit ----------------------------------------------------------- Variable | Factor1 Factor2 Factor3 | Uniqueness -------------+------------------------------+-------------- T2Q61 | 0.6119 | 0.4748 T2Q48 | 0.4997 0.4153 | 0.4375 T2Q54_r | 0.7134 | 0.5129 T2Q60 | 0.6460 | 0.5596 T2Q63_r | 0.6155 | 0.6377 T2Q51 | 0.4502 | 0.5944 T2Q66 | 0.4538 | 0.7054 T2Q56_r | 0.4961 | 0.7848 T2Q59 | 0.5637 | 0.6747 T2Q64 | 0.5874 | 0.6130 T2Q58 | 0.4188 | 0.5506 T2Q65 | 0.7302 | 0.5473 T2Q67 | 0.4938 | 0.6579 T2Q62 | 0.5349 | 0.7160 T2Q49 | 0.5572 | 0.5840 T2Q53 | 0.4493 | 0.8200 T2Q55 | 0.3296 | 0.8354 T2Q57 | 0.4442 | 0.7236 T2Q47 | 0.5127 | 0.7847 T2Q52 | | 0.9174 ----------------------------------------------------------- (blanks represent abs(loading)<.3)

More Related