From Julie Butler and Peggy Kerns PERMA & EPOCH
Items
How much of the time do you feel you are making progress towards accomplishing your goals? (Acomplishment)
How often do you become absorbed in what you are doing? (Engagement)
In general, how often do you feel joyful? (Positive Emotion)
To what extent do you receive help and support from others when you need it? (Relationship)
In general, how often do you feel anxious? (Negative Emotion)
How often do you achieve the important goals you have set for yourself? (Acomplishment)
In general, how often do you feel positive? (Positive Emotion)
In general, to what extent do you feel excited and interested in things? (Enagagement)
How lonely do you feel in your daily life? (Lonely -single item)
In general, how often do you feel angry? (Negative Emotion)
To what extent have you been feeling loved? (Relationship)
How often are you able to handle your responsibilities? (Acomplishment)
How satisfied are you with your personal relationships? (Relationship)
In general, how often do you feel sad? (Nagative Emotion)
How often do you lose track of time while doing something you enjoy? (Engagement)
In general, to what extent do you feel contented? (Positive Emotion)
Taking all things together, how happy would you say you are? (Happiness -single item)
library(lavaan)
## This is lavaan 0.5-18
## lavaan is BETA software! Please report any bugs.
library(semPlot)
library(dplyr)
##
## Attaching package: 'dplyr'
##
## The following objects are masked from 'package:stats':
##
## filter, lag
##
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(GPArotation)
library(psych)
data <- read.csv("~/Psychometric_study_data/allsurveysYT1.csv")
View(data)
seven.model= 'Acomplishment =~ PERMA_1 + PERMA_6 + PERMA_12
Engagement =~ PERMA_2 + PERMA_8 + PERMA_15
Positive Emotion =~ PERMA_3 + PERMA_7 + PERMA_16
Relationship =~ PERMA_4 + PERMA_11 + PERMA_13
Negative Emotion =~ PERMA_5 + PERMA_10 + PERMA_14
Lonely =~ PERMA_9
Happy =~ PERMA_17'
one.model= 'One =~ PERMA_1 + PERMA_2 + PERMA_3 + PERMA_4 + PERMA_5 + PERMA_6 + PERMA_7 + PERMA_8 + PERMA_9 +
PERMA_10 + PERMA_11 + PERMA_12 + PERMA_13 + PERMA_14 + PERMA_15 + PERMA_16 + PERMA_17'
seven.fit=cfa(seven.model, data=data, missing="fiml")
## Warning in lav_data_full(data = data, group = group, group.label = group.label, : lavaan WARNING: some cases are empty and will be removed:
## 14 15 16 20 25 26 27 28 29 32 33 34 35 37 39 41 42 44 51 55 56 59 60 66 70 73 74 75 76 77 78 80 81 83 84 87 88 90 91 92 93 96 98 99 101 104 106 107 108 111 112 114 116 118 119 121 124 126 127 128 130 131 132 133 134 138 142 144 147 149 150 151 153 156 159 160 169 170 171 172 174 175 178 179 184 185 186 188 190 191 193 195 196 202 204 208 213 214 215 216 219 220 221 224 226 229 231 234 237 238 240 243 244 248 252 254 255 256 258 259 261 264 265 266 268 269 270 271 272 273 274 275 276 277 278 279 280 281 283 284 285 288 289 290 293 294 301 302 303 304 305 306 307 308 309 310 311 312 314 320 321 322 323 324 325 326 327 328 329 331 332 333 334 335 336 338 340 348 349 350 351 352 356 357 358 359 360 361 363 364 366 367 368 369 371 372 374 376 377 378 379 380 382 385 386 389 390 394 395 397 399 443 444 445 446 447 448 449 450 452 453 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 485 486 488 489 490 491 492 493 494 495 496 497 498 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670
one.fit=cfa(one.model, data=data, missing = "fiml")
## Warning in lav_data_full(data = data, group = group, group.label = group.label, : lavaan WARNING: some cases are empty and will be removed:
## 14 15 16 20 25 26 27 28 29 32 33 34 35 37 39 41 42 44 51 55 56 59 60 66 70 73 74 75 76 77 78 80 81 83 84 87 88 90 91 92 93 96 98 99 101 104 106 107 108 111 112 114 116 118 119 121 124 126 127 128 130 131 132 133 134 138 142 144 147 149 150 151 153 156 159 160 169 170 171 172 174 175 178 179 184 185 186 188 190 191 193 195 196 202 204 208 213 214 215 216 219 220 221 224 226 229 231 234 237 238 240 243 244 248 252 254 255 256 258 259 261 264 265 266 268 269 270 271 272 273 274 275 276 277 278 279 280 281 283 284 285 288 289 290 293 294 301 302 303 304 305 306 307 308 309 310 311 312 314 320 321 322 323 324 325 326 327 328 329 331 332 333 334 335 336 338 340 348 349 350 351 352 356 357 358 359 360 361 363 364 366 367 368 369 371 372 374 376 377 378 379 380 382 385 386 389 390 394 395 397 399 443 444 445 446 447 448 449 450 452 453 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 485 486 488 489 490 491 492 493 494 495 496 497 498 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670
semPaths(seven.fit, whatLabels = "std", layout = "tree")
semPaths(one.fit, whatLabels = "std", layout = "tree")
#summaries
summary(seven.fit, standardized = TRUE, rsquare=TRUE)
## lavaan (0.5-18) converged normally after 200 iterations
##
## Used Total
## Number of observations 237 670
##
## Number of missing patterns 1
##
## Estimator ML
## Minimum Function Test Statistic 134.168
## Degrees of freedom 100
## P-value (Chi-square) 0.013
##
## Parameter estimates:
##
## Information Observed
## Standard Errors Standard
##
## Estimate Std.err Z-value P(>|z|) Std.lv Std.all
## Latent variables:
## Acomplishment =~
## PERMA_1 1.000 1.921 0.765
## PERMA_6 0.791 0.092 8.569 0.000 1.520 0.602
## PERMA_12 0.802 0.089 8.981 0.000 1.541 0.632
## Engagement =~
## PERMA_2 1.000 1.558 0.646
## PERMA_8 0.997 0.127 7.847 0.000 1.553 0.664
## PERMA_15 0.657 0.124 5.289 0.000 1.024 0.393
## PositiveEmotion =~
## PERMA_3 1.000 1.739 0.747
## PERMA_7 1.172 0.095 12.299 0.000 2.037 0.789
## PERMA_16 0.920 0.093 9.879 0.000 1.599 0.658
## Relationship =~
## PERMA_4 1.000 1.371 0.480
## PERMA_11 1.443 0.225 6.416 0.000 1.979 0.689
## PERMA_13 1.244 0.208 5.978 0.000 1.706 0.586
## NegativeEmotion =~
## PERMA_5 1.000 1.424 0.443
## PERMA_10 0.695 0.277 2.513 0.012 0.990 0.293
## PERMA_14 1.027 0.437 2.353 0.019 1.463 0.438
## Lonely =~
## PERMA_9 1.000 3.710 1.000
## Happy =~
## PERMA_17 1.000 2.569 1.000
##
## Covariances:
## Acomplishment ~~
## Engagement 2.556 0.385 6.634 0.000 0.854 0.854
## PositiveEmotn 2.961 0.394 7.517 0.000 0.886 0.886
## Relationship 2.210 0.415 5.328 0.000 0.839 0.839
## NegativeEmotn -0.422 0.360 -1.174 0.241 -0.154 -0.154
## Lonely -1.491 0.554 -2.691 0.007 -0.209 -0.209
## Happy 2.755 0.436 6.314 0.000 0.558 0.558
## Engagement ~~
## PositiveEmotn 2.355 0.348 6.761 0.000 0.869 0.869
## Relationship 1.851 0.365 5.077 0.000 0.866 0.866
## NegativeEmotn -0.028 0.305 -0.092 0.927 -0.013 -0.013
## Lonely -0.092 0.479 -0.193 0.847 -0.016 -0.016
## Happy 2.284 0.387 5.909 0.000 0.570 0.570
## PositiveEmotion ~~
## Relationship 2.062 0.374 5.509 0.000 0.865 0.865
## NegativeEmotn -0.861 0.351 -2.455 0.014 -0.348 -0.348
## Lonely -1.635 0.491 -3.330 0.001 -0.253 -0.253
## Happy 3.600 0.441 8.162 0.000 0.806 0.806
## Relationship ~~
## NegativeEmotn -0.504 0.297 -1.695 0.090 -0.258 -0.258
## Lonely -1.024 0.437 -2.343 0.019 -0.201 -0.201
## Happy 2.579 0.458 5.627 0.000 0.732 0.732
## NegativeEmotion ~~
## Lonely 1.490 0.645 2.309 0.021 0.282 0.282
## Happy -1.241 0.441 -2.816 0.005 -0.339 -0.339
## Lonely ~~
## Happy -1.994 0.633 -3.153 0.002 -0.209 -0.209
##
## Intercepts:
## PERMA_1 6.485 0.163 39.775 0.000 6.485 2.584
## PERMA_6 7.051 0.164 42.982 0.000 7.051 2.792
## PERMA_12 7.810 0.158 49.321 0.000 7.810 3.204
## PERMA_2 7.624 0.157 48.686 0.000 7.624 3.162
## PERMA_8 7.519 0.152 49.516 0.000 7.519 3.216
## PERMA_15 8.451 0.169 49.878 0.000 8.451 3.240
## PERMA_3 6.899 0.151 45.636 0.000 6.899 2.964
## PERMA_7 7.105 0.168 42.361 0.000 7.105 2.752
## PERMA_16 6.481 0.158 41.093 0.000 6.481 2.669
## PERMA_4 7.122 0.186 38.389 0.000 7.122 2.494
## PERMA_11 7.498 0.186 40.208 0.000 7.498 2.612
## PERMA_13 6.992 0.189 36.941 0.000 6.992 2.400
## PERMA_5 6.519 0.209 31.245 0.000 6.519 2.030
## PERMA_10 5.759 0.220 26.195 0.000 5.759 1.702
## PERMA_14 5.890 0.217 27.112 0.000 5.890 1.761
## PERMA_9 6.055 0.241 25.124 0.000 6.055 1.632
## PERMA_17 7.283 0.167 43.643 0.000 7.283 2.835
## Acomplishment 0.000 0.000 0.000
## Engagement 0.000 0.000 0.000
## PositiveEmotn 0.000 0.000 0.000
## Relationship 0.000 0.000 0.000
## NegativeEmotn 0.000 0.000 0.000
## Lonely 0.000 0.000 0.000
## Happy 0.000 0.000 0.000
##
## Variances:
## PERMA_1 2.609 0.355 2.609 0.414
## PERMA_6 4.067 0.425 4.067 0.638
## PERMA_12 3.569 0.381 3.569 0.600
## PERMA_2 3.384 0.398 3.384 0.582
## PERMA_8 3.052 0.355 3.052 0.558
## PERMA_15 5.756 0.566 5.756 0.846
## PERMA_3 2.393 0.269 2.393 0.442
## PERMA_7 2.518 0.304 2.518 0.378
## PERMA_16 3.339 0.334 3.339 0.566
## PERMA_4 6.279 0.616 6.279 0.770
## PERMA_11 4.327 0.551 4.327 0.525
## PERMA_13 5.579 0.596 5.579 0.657
## PERMA_5 8.288 1.186 8.288 0.803
## PERMA_10 10.476 1.122 10.476 0.914
## PERMA_14 9.045 1.266 9.045 0.809
## PERMA_9 0.000 0.000 0.000
## PERMA_17 0.000 0.000 0.000
## Acomplishment 3.692 0.588 1.000 1.000
## Engagement 2.429 0.500 1.000 1.000
## PositiveEmotn 3.023 0.472 1.000 1.000
## Relationship 1.880 0.525 1.000 1.000
## NegativeEmotn 2.029 1.071 1.000 1.000
## Lonely 13.765 1.264 1.000 1.000
## Happy 6.599 0.606 1.000 1.000
##
## R-Square:
##
## PERMA_1 0.586
## PERMA_6 0.362
## PERMA_12 0.400
## PERMA_2 0.418
## PERMA_8 0.442
## PERMA_15 0.154
## PERMA_3 0.558
## PERMA_7 0.622
## PERMA_16 0.434
## PERMA_4 0.230
## PERMA_11 0.475
## PERMA_13 0.343
## PERMA_5 0.197
## PERMA_10 0.086
## PERMA_14 0.191
## PERMA_9 1.000
## PERMA_17 1.000
summary(one.fit, standardized = TRUE, rsquare=TRUE)
## lavaan (0.5-18) converged normally after 40 iterations
##
## Used Total
## Number of observations 237 670
##
## Number of missing patterns 1
##
## Estimator ML
## Minimum Function Test Statistic 225.764
## Degrees of freedom 119
## P-value (Chi-square) 0.000
##
## Parameter estimates:
##
## Information Observed
## Standard Errors Standard
##
## Estimate Std.err Z-value P(>|z|) Std.lv Std.all
## Latent variables:
## One =~
## PERMA_1 1.000 1.762 0.702
## PERMA_2 0.754 0.095 7.953 0.000 1.329 0.551
## PERMA_3 0.978 0.094 10.398 0.000 1.723 0.740
## PERMA_4 0.734 0.111 6.592 0.000 1.294 0.453
## PERMA_5 -0.220 0.125 -1.759 0.079 -0.387 -0.121
## PERMA_6 0.756 0.098 7.704 0.000 1.332 0.527
## PERMA_7 1.130 0.103 10.932 0.000 1.991 0.771
## PERMA_8 0.848 0.092 9.251 0.000 1.494 0.639
## PERMA_9 -0.467 0.145 -3.228 0.001 -0.823 -0.222
## PERMA_10 -0.184 0.132 -1.399 0.162 -0.324 -0.096
## PERMA_11 1.036 0.114 9.107 0.000 1.824 0.636
## PERMA_12 0.816 0.095 8.567 0.000 1.437 0.589
## PERMA_13 0.912 0.115 7.959 0.000 1.607 0.552
## PERMA_14 -0.242 0.130 -1.859 0.063 -0.427 -0.128
## PERMA_15 0.451 0.102 4.419 0.000 0.795 0.305
## PERMA_16 0.932 0.096 9.741 0.000 1.641 0.676
## PERMA_17 1.074 0.104 10.319 0.000 1.892 0.736
##
## Intercepts:
## PERMA_1 6.485 0.163 39.775 0.000 6.485 2.584
## PERMA_2 7.624 0.157 48.686 0.000 7.624 3.162
## PERMA_3 6.899 0.151 45.636 0.000 6.899 2.964
## PERMA_4 7.122 0.186 38.389 0.000 7.122 2.494
## PERMA_5 6.519 0.209 31.245 0.000 6.519 2.030
## PERMA_6 7.051 0.164 42.982 0.000 7.051 2.792
## PERMA_7 7.105 0.168 42.361 0.000 7.105 2.752
## PERMA_8 7.519 0.152 49.516 0.000 7.519 3.216
## PERMA_9 6.055 0.241 25.124 0.000 6.055 1.632
## PERMA_10 5.759 0.220 26.195 0.000 5.759 1.702
## PERMA_11 7.498 0.186 40.208 0.000 7.498 2.612
## PERMA_12 7.810 0.158 49.321 0.000 7.810 3.204
## PERMA_13 6.992 0.189 36.941 0.000 6.992 2.400
## PERMA_14 5.890 0.217 27.112 0.000 5.890 1.761
## PERMA_15 8.451 0.169 49.878 0.000 8.451 3.240
## PERMA_16 6.481 0.158 41.093 0.000 6.481 2.669
## PERMA_17 7.283 0.167 43.643 0.000 7.283 2.835
## One 0.000 0.000 0.000
##
## Variances:
## PERMA_1 3.196 0.330 3.196 0.507
## PERMA_2 4.046 0.391 4.046 0.696
## PERMA_3 2.447 0.261 2.447 0.452
## PERMA_4 6.484 0.613 6.484 0.795
## PERMA_5 10.167 0.936 10.167 0.985
## PERMA_6 4.603 0.442 4.603 0.722
## PERMA_7 2.704 0.299 2.704 0.405
## PERMA_8 3.233 0.321 3.233 0.592
## PERMA_9 13.088 1.209 13.088 0.951
## PERMA_10 11.352 1.044 11.352 0.991
## PERMA_11 4.913 0.489 4.913 0.596
## PERMA_12 3.878 0.379 3.878 0.653
## PERMA_13 5.906 0.571 5.906 0.696
## PERMA_14 11.004 1.013 11.004 0.984
## PERMA_15 6.172 0.574 6.172 0.907
## PERMA_16 3.201 0.325 3.201 0.543
## PERMA_17 3.020 0.322 3.020 0.458
## One 3.104 0.521 1.000 1.000
##
## R-Square:
##
## PERMA_1 0.493
## PERMA_2 0.304
## PERMA_3 0.548
## PERMA_4 0.205
## PERMA_5 0.015
## PERMA_6 0.278
## PERMA_7 0.595
## PERMA_8 0.408
## PERMA_9 0.049
## PERMA_10 0.009
## PERMA_11 0.404
## PERMA_12 0.347
## PERMA_13 0.304
## PERMA_14 0.016
## PERMA_15 0.093
## PERMA_16 0.457
## PERMA_17 0.542
correl = residuals(seven.fit, type="cor")
correl
## $type
## [1] "cor.bollen"
##
## $cor
## PERMA_1 PERMA_6 PERMA_12 PERMA_2 PERMA_8 PERMA_15 PERMA_3 PERMA_7
## PERMA_1 0.000
## PERMA_6 0.004 0.000
## PERMA_12 -0.005 0.002 0.000
## PERMA_2 -0.040 -0.021 0.026 0.000
## PERMA_8 0.064 0.025 0.044 -0.054 0.000
## PERMA_15 -0.104 -0.080 -0.057 0.138 0.001 0.000
## PERMA_3 -0.052 -0.047 0.003 -0.046 0.040 -0.030 0.000
## PERMA_7 0.009 -0.004 0.013 -0.037 0.041 -0.019 0.042 0.000
## PERMA_16 0.063 0.045 -0.006 0.021 0.008 -0.009 -0.018 -0.046
## PERMA_4 0.052 -0.033 0.018 0.030 0.019 -0.030 -0.095 0.047
## PERMA_11 0.002 -0.040 -0.066 -0.027 0.005 -0.081 0.019 -0.072
## PERMA_13 0.018 0.031 0.031 0.055 -0.019 0.054 0.058 -0.081
## PERMA_5 0.017 0.024 -0.032 0.017 -0.059 0.075 0.023 0.024
## PERMA_10 -0.043 0.041 -0.048 -0.009 -0.002 0.061 -0.072 0.039
## PERMA_14 -0.015 0.092 -0.024 0.065 -0.084 0.075 -0.056 0.015
## PERMA_9 0.031 -0.028 -0.029 0.072 -0.076 0.023 0.007 0.015
## PERMA_17 0.017 -0.070 0.032 -0.031 0.057 -0.072 0.012 0.007
## PERMA_16 PERMA_4 PERMA_11 PERMA_13 PERMA_5 PERMA_10 PERMA_14
## PERMA_1
## PERMA_6
## PERMA_12
## PERMA_2
## PERMA_8
## PERMA_15
## PERMA_3
## PERMA_7
## PERMA_16 0.000
## PERMA_4 0.055 0.000
## PERMA_11 0.100 -0.020 0.000
## PERMA_13 0.063 -0.025 0.026 0.000
## PERMA_5 -0.037 0.035 -0.060 0.037 0.000
## PERMA_10 -0.036 -0.002 -0.003 -0.034 0.058 0.000
## PERMA_14 0.057 0.102 -0.024 0.016 -0.011 -0.039 0.000
## PERMA_9 -0.036 0.024 -0.034 0.033 0.003 -0.027 0.012
## PERMA_17 -0.031 0.003 0.035 -0.054 0.031 0.044 -0.058
## PERMA_9 PERMA_17
## PERMA_1
## PERMA_6
## PERMA_12
## PERMA_2
## PERMA_8
## PERMA_15
## PERMA_3
## PERMA_7
## PERMA_16
## PERMA_4
## PERMA_11
## PERMA_13
## PERMA_5
## PERMA_10
## PERMA_14
## PERMA_9 0.000
## PERMA_17 0.000 0.000
##
## $mean
## PERMA_1 PERMA_6 PERMA_12 PERMA_2 PERMA_8 PERMA_15 PERMA_3 PERMA_7
## 0 0 0 0 0 0 0 0
## PERMA_16 PERMA_4 PERMA_11 PERMA_13 PERMA_5 PERMA_10 PERMA_14 PERMA_9
## 0 0 0 0 0 0 0 0
## PERMA_17
## 0
View(correl$cor)
correl1 = residuals(one.fit, type="cor")
correl1
## $type
## [1] "cor.bollen"
##
## $cor
## PERMA_1 PERMA_2 PERMA_3 PERMA_4 PERMA_5 PERMA_6 PERMA_7 PERMA_8
## PERMA_1 0.000
## PERMA_2 -0.004 0.000
## PERMA_3 -0.065 -0.034 0.000
## PERMA_4 0.042 0.049 -0.120 0.000
## PERMA_5 0.049 0.080 -0.003 0.034 0.000
## PERMA_6 0.095 0.020 -0.039 -0.029 0.047 0.000
## PERMA_7 0.004 -0.019 0.060 0.025 -0.005 0.010 0.000
## PERMA_8 0.050 0.023 -0.001 0.006 0.014 0.029 0.004 0.000
## PERMA_9 0.027 0.184 -0.018 0.028 0.102 -0.037 -0.014 0.055
## PERMA_10 -0.010 0.041 -0.077 0.005 0.176 0.064 0.032 0.057
## PERMA_11 -0.002 0.008 -0.006 0.023 -0.063 -0.027 -0.092 -0.005
## PERMA_12 0.065 0.050 -0.015 0.006 -0.004 0.072 0.000 0.026
## PERMA_13 0.007 0.079 0.028 0.006 0.037 0.035 -0.107 -0.035
## PERMA_14 0.023 0.132 -0.075 0.106 0.167 0.118 -0.007 -0.006
## PERMA_15 -0.061 0.224 -0.001 -0.005 0.110 -0.039 0.015 0.067
## PERMA_16 0.036 0.018 -0.027 0.022 -0.057 0.040 -0.047 -0.044
## PERMA_17 -0.072 -0.068 0.069 0.020 -0.031 -0.123 0.075 -0.035
## PERMA_9 PERMA_10 PERMA_11 PERMA_12 PERMA_13 PERMA_14 PERMA_15
## PERMA_1
## PERMA_2
## PERMA_3
## PERMA_4
## PERMA_5
## PERMA_6
## PERMA_7
## PERMA_8
## PERMA_9 0.000
## PERMA_10 0.035 0.000
## PERMA_11 -0.032 0.005 0.000
## PERMA_12 -0.031 -0.020 -0.075 0.000
## PERMA_13 0.037 -0.026 0.079 0.017 0.000
## PERMA_14 0.108 0.076 -0.021 0.009 0.021 0.000
## PERMA_15 0.085 0.088 -0.041 -0.025 0.085 0.112 0.000
## PERMA_16 -0.053 -0.038 0.063 -0.036 0.024 0.043 0.009
## PERMA_17 -0.046 0.016 0.072 -0.049 -0.031 -0.112 -0.072
## PERMA_16 PERMA_17
## PERMA_1
## PERMA_2
## PERMA_3
## PERMA_4
## PERMA_5
## PERMA_6
## PERMA_7
## PERMA_8
## PERMA_9
## PERMA_10
## PERMA_11
## PERMA_12
## PERMA_13
## PERMA_14
## PERMA_15
## PERMA_16 0.000
## PERMA_17 0.002 0.000
##
## $mean
## PERMA_1 PERMA_2 PERMA_3 PERMA_4 PERMA_5 PERMA_6 PERMA_7 PERMA_8
## 0 0 0 0 0 0 0 0
## PERMA_9 PERMA_10 PERMA_11 PERMA_12 PERMA_13 PERMA_14 PERMA_15 PERMA_16
## 0 0 0 0 0 0 0 0
## PERMA_17
## 0
View(correl1$cor)
zcorrels = residuals(seven.fit, type = "standardized")
View(zcorrels$cov)
zcorrels1 = residuals(one.fit, type = "standardized")
View(zcorrels1$cov)
modindices(seven.fit, sort. = TRUE, minimum.value = 3.84)
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 1 Acomplishment =~ PERMA_8 14.005 1.085 2.084 0.892 0.892
## 2 Relationship =~ PERMA_16 13.571 1.491 2.044 0.842 0.842
## 3 PositiveEmotion =~ PERMA_8 12.667 0.826 1.436 0.614 0.614
## 4 PERMA_2 ~~ PERMA_15 12.522 1.184 1.184 0.188 0.188
## 5 NegativeEmotion =~ PERMA_8 9.005 -0.502 -0.714 -0.306 -0.306
## 6 PERMA_2 ~~ PERMA_8 8.970 -1.277 -1.277 -0.227 -0.227
## 7 Acomplishment =~ PERMA_15 8.685 -0.842 -1.617 -0.620 -0.620
## 8 Relationship =~ PERMA_7 8.147 -1.251 -1.716 -0.664 -0.664
## 9 PERMA_3 ~~ PERMA_4 8.065 -0.790 -0.790 -0.119 -0.119
## 10 PERMA_7 ~~ PERMA_11 7.182 -0.733 -0.733 -0.099 -0.099
## 11 Relationship =~ PERMA_8 6.389 0.881 1.208 0.517 0.517
## 12 PERMA_3 ~~ PERMA_7 5.919 0.603 0.603 0.100 0.100
## 13 Engagement =~ PERMA_11 5.551 -0.904 -1.408 -0.491 -0.491
## 14 PERMA_16 ~~ PERMA_11 5.490 0.672 0.672 0.096 0.096
## 15 Acomplishment =~ PERMA_16 5.433 0.471 0.906 0.373 0.373
## 16 PERMA_7 ~~ PERMA_13 5.431 -0.670 -0.670 -0.089 -0.089
## 17 Relationship =~ PERMA_15 5.273 -0.824 -1.130 -0.433 -0.433
## 18 PositiveEmotion =~ PERMA_15 5.241 -0.545 -0.948 -0.363 -0.363
## 19 PERMA_14 ~~ PERMA_17 4.825 -0.994 -0.994 -0.116 -0.116
## 20 NegativeEmotion =~ PERMA_15 4.687 0.378 0.538 0.206 0.206
## 21 Lonely =~ PERMA_8 4.649 -0.090 -0.335 -0.143 -0.143
## 22 Happy =~ PERMA_13 4.550 -0.267 -0.686 -0.235 -0.235
## 23 PositiveEmotion =~ PERMA_2 4.438 -0.495 -0.860 -0.357 -0.357
## 24 PERMA_3 ~~ PERMA_13 4.432 0.572 0.572 0.084 0.084
## 25 Happy =~ PERMA_8 4.424 0.167 0.430 0.184 0.184
## 26 NegativeEmotion =~ PERMA_11 4.375 -0.462 -0.658 -0.229 -0.229
## 27 PERMA_1 ~~ PERMA_15 4.335 -0.622 -0.622 -0.095 -0.095
## 28 Acomplishment =~ PERMA_11 4.171 -0.628 -1.206 -0.420 -0.420
## 29 PositiveEmotion =~ PERMA_6 3.924 -0.499 -0.867 -0.343 -0.343
## 30 Happy =~ PERMA_6 3.862 -0.146 -0.374 -0.148 -0.148
## 31 PERMA_1 ~~ PERMA_3 3.857 -0.422 -0.422 -0.072 -0.072
## 32 PERMA_7 ~~ PERMA_16 3.855 -0.477 -0.477 -0.076 -0.076
modindices(one.fit, sort. = TRUE, minimum.value = 3.84)
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 1 PERMA_2 ~~ PERMA_15 19.996 1.497 1.497 0.238 0.238
## 2 PERMA_6 ~~ PERMA_17 13.196 -0.972 -0.972 -0.150 -0.150
## 3 PERMA_2 ~~ PERMA_9 12.803 1.738 1.738 0.194 0.194
## 4 PERMA_7 ~~ PERMA_13 12.281 -1.031 -1.031 -0.137 -0.137
## 5 PERMA_3 ~~ PERMA_4 11.461 -0.959 -0.959 -0.144 -0.144
## 6 PERMA_7 ~~ PERMA_11 11.118 -0.915 -0.915 -0.123 -0.123
## 7 PERMA_7 ~~ PERMA_17 10.735 0.742 0.742 0.112 0.112
## 8 PERMA_3 ~~ PERMA_17 7.794 0.587 0.587 0.098 0.098
## 9 PERMA_14 ~~ PERMA_17 7.597 -1.106 -1.106 -0.129 -0.129
## 10 PERMA_5 ~~ PERMA_10 7.515 1.916 1.916 0.176 0.176
## 11 PERMA_1 ~~ PERMA_17 7.229 -0.631 -0.631 -0.098 -0.098
## 12 PERMA_3 ~~ PERMA_7 6.968 0.540 0.540 0.090 0.090
## 13 PERMA_5 ~~ PERMA_14 6.877 1.805 1.805 0.168 0.168
## 14 PERMA_1 ~~ PERMA_6 6.848 0.710 0.710 0.112 0.112
## 15 PERMA_2 ~~ PERMA_14 6.315 1.117 1.117 0.139 0.139
## 16 PERMA_1 ~~ PERMA_3 5.927 -0.516 -0.516 -0.088 -0.088
## 17 PERMA_11 ~~ PERMA_17 5.757 0.680 0.680 0.092 0.092
## 18 PERMA_6 ~~ PERMA_14 4.897 1.046 1.046 0.124 0.124
## 19 PERMA_2 ~~ PERMA_17 4.234 -0.518 -0.518 -0.084 -0.084
## 20 PERMA_11 ~~ PERMA_13 4.110 0.760 0.760 0.091 0.091
## 21 PERMA_11 ~~ PERMA_12 4.017 -0.613 -0.613 -0.088 -0.088
fitmeasures(seven.fit)
## npar fmin chisq
## 70.000 0.283 134.168
## df pvalue baseline.chisq
## 100.000 0.013 1262.734
## baseline.df baseline.pvalue cfi
## 136.000 0.000 0.970
## tli nnfi rfi
## 0.959 0.959 0.855
## nfi pnfi ifi
## 0.894 0.657 0.971
## rni logl unrestricted.logl
## 0.970 -9211.899 -9144.815
## aic bic ntotal
## 18563.797 18806.561 237.000
## bic2 rmsea rmsea.ci.lower
## 18584.686 0.038 0.018
## rmsea.ci.upper rmsea.pvalue rmr
## 0.054 0.889 0.311
## rmr_nomean srmr srmr_bentler
## 0.327 0.041 0.041
## srmr_bentler_nomean srmr_bollen srmr_bollen_nomean
## 0.043 0.041 0.043
## srmr_mplus srmr_mplus_nomean cn_05
## 0.041 0.043 220.644
## cn_01 gfi agfi
## 240.895 0.988 0.979
## pgfi mfi ecvi
## 0.581 0.930 NA
fitmeasures(one.fit)
## npar fmin chisq
## 51.000 0.476 225.764
## df pvalue baseline.chisq
## 119.000 0.000 1262.734
## baseline.df baseline.pvalue cfi
## 136.000 0.000 0.905
## tli nnfi rfi
## 0.892 0.892 0.796
## nfi pnfi ifi
## 0.821 0.719 0.907
## rni logl unrestricted.logl
## 0.905 -9257.697 -9144.815
## aic bic ntotal
## 18617.393 18794.264 237.000
## bic2 rmsea rmsea.ci.lower
## 18632.612 0.062 0.049
## rmsea.ci.upper rmsea.pvalue rmr
## 0.074 0.062 0.460
## rmr_nomean srmr srmr_bentler
## 0.485 0.055 0.055
## srmr_bentler_nomean srmr_bollen srmr_bollen_nomean
## 0.058 0.055 0.058
## srmr_mplus srmr_mplus_nomean cn_05
## 0.055 0.058 153.700
## cn_01 gfi agfi
## 166.653 0.982 0.974
## pgfi mfi ecvi
## 0.687 0.798 NA
PermaTR<-select(data, PERMA_1 , PERMA_6 , PERMA_12, PERMA_2 , PERMA_8 , PERMA_15 ,PERMA_3 , PERMA_7 , PERMA_16 , PERMA_4 , PERMA_11 , PERMA_13 , PERMA_5 , PERMA_10 , PERMA_14, PERMA_9 , PERMA_17)
colnames(PermaTR) <- c("1","2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17")
PermaTR<-tbl_df(PermaTR)
PermaTR
## Source: local data frame [670 x 17]
##
## 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
## 1 6 9 9 8 7 7 7 7 8 9 11 8 2 13 3 13 8
## 2 9 9 11 7 11 7 9 9 9 11 11 11 13 2 13 2 11
## 3 2 13 2 3 3 5 2 3 5 2 3 2 13 13 4 3 3
## 4 9 9 11 9 6 11 7 7 7 8 7 7 4 3 13 2 7
## 5 8 6 9 6 7 8 8 4 9 7 11 7 4 7 4 2 9
## 6 8 9 9 6 6 6 7 7 8 6 9 7 6 5 3 3 8
## 7 7 7 9 5 8 9 9 7 9 8 11 11 4 3 6 1 7
## 8 7 7 11 8 9 8 11 9 8 5 9 7 4 5 3 2 8
## 9 5 5 5 5 7 7 5 5 5 5 7 5 5 5 4 5 6
## 10 7 7 8 9 9 9 9 9 8 11 8 9 2 2 2 2 9
## .. . .. .. . .. .. .. . . .. .. .. .. .. .. .. ..
#Target Roration
Targ_key <- make.keys(17,list(f1=1:3,f2=4:6, f3=7:9, f4=10:12, f5=13:15, f6=16, f7=17))
Targ_key <- scrub(Targ_key,isvalue=1) #fix the 0s, allow the NAs to be estimated
Targ_key <- list(Targ_key)
Perma_cor <- corFiml(PermaTR) # convert the raw data to correlation matrix uisng FIML
out_targetQ <- fa(Perma_cor,7,rotate="TargetQ", n.obs = 670, Target=Targ_key) #TargetT for orthogonal rotation
out_targetQ[c("loadings", "score.cor", "TLI", "RMSEA","uniquenesses")]
## $loadings
##
## Loadings:
## MR1 MR3 MR2 MR4 MR5 MR7 MR6
## 1 0.846 0.480
## 2 0.887 -0.147 -0.472
## 3 0.310 0.183 0.183
## 4 0.665 0.156
## 5 0.246 0.217 0.201
## 6 -0.110 0.121 0.538
## 7 0.859 0.118
## 8 0.203 0.519 0.199 -0.228 0.395
## 9 0.227 0.141 0.326 -0.133 0.112
## 10 0.117 -0.101 0.211 0.165 0.317
## 11 0.615 0.176
## 12 0.119 0.202 0.420
## 13 0.113 0.750
## 14 -0.103 0.304 0.171
## 15 -0.177 0.211 0.221
## 16 -0.105 0.238 0.133 -0.140 0.111
## 17 0.356 0.317 0.454
##
## MR1 MR3 MR2 MR4 MR5 MR7 MR6
## SS loadings 1.821 1.317 1.060 0.905 0.774 0.615 0.489
## Proportion Var 0.107 0.077 0.062 0.053 0.046 0.036 0.029
## Cumulative Var 0.107 0.185 0.247 0.300 0.346 0.382 0.411
##
## $score.cor
## [,1] [,2] [,3] [,4] [,5] [,6]
## [1,] 1.0000000 0.6517600 0.42209816 0.6238968 -0.14501702 0.37541828
## [2,] 0.6517600 1.0000000 0.40164102 0.6439615 -0.26258967 0.36262289
## [3,] 0.4220982 0.4016410 1.00000000 0.4427165 0.08837512 0.25891489
## [4,] 0.6238968 0.6439615 0.44271654 1.0000000 -0.21445272 0.37665465
## [5,] -0.1450170 -0.2625897 0.08837512 -0.2144527 1.00000000 -0.03506908
## [6,] 0.3754183 0.3626229 0.25891489 0.3766547 -0.03506908 1.00000000
##
## $TLI
## [1] 0.9694932
##
## $RMSEA
## RMSEA lower upper confidence
## 0.03426712 0.01964488 0.04667311 0.10000000
##
## $uniquenesses
## 1 2 3 4 5 6
## 0.004999981 0.059650115 0.648825414 0.415489594 0.600265403 0.703317154
## 7 8 9 10 11 12
## 0.137827800 0.195878018 0.516483125 0.713541287 0.433101748 0.599760026
## 13 14 15 16 17
## 0.525056260 0.881583058 0.849595555 0.853397516 0.291440910
out_targetQ
## Factor Analysis using method = minres
## Call: fa(r = Perma_cor, nfactors = 7, n.obs = 670, rotate = "TargetQ",
## Target = Targ_key)
## Standardized loadings (pattern matrix) based upon correlation matrix
## MR1 MR3 MR2 MR4 MR5 MR7 MR6 h2 u2 com
## 1 0.85 0.01 -0.04 0.07 -0.02 0.03 0.48 1.00 0.005 1.6
## 2 0.89 0.02 -0.04 0.00 0.08 -0.15 -0.47 0.94 0.060 1.6
## 3 0.31 0.18 0.18 0.01 -0.10 0.03 0.02 0.35 0.649 2.6
## 4 0.04 0.04 0.66 0.16 -0.01 -0.04 0.01 0.58 0.415 1.1
## 5 0.25 0.22 0.20 0.08 -0.03 0.09 0.04 0.40 0.600 3.6
## 6 -0.11 0.12 0.54 0.02 0.07 -0.04 0.01 0.30 0.703 1.2
## 7 0.01 0.86 0.04 0.12 -0.03 -0.10 0.01 0.86 0.138 1.1
## 8 0.20 0.52 0.20 -0.23 -0.07 0.40 -0.04 0.80 0.196 3.1
## 9 0.23 0.05 0.14 0.33 -0.13 0.11 -0.02 0.48 0.516 3.0
## 10 0.12 -0.10 0.21 0.16 -0.01 0.32 0.02 0.29 0.714 2.9
## 11 0.06 -0.02 0.04 0.61 -0.08 0.18 -0.03 0.57 0.433 1.2
## 12 0.12 0.09 0.20 0.42 0.00 -0.09 0.00 0.40 0.600 1.9
## 13 0.05 0.11 -0.04 0.06 0.75 0.05 0.09 0.47 0.525 1.1
## 14 0.01 -0.10 0.02 0.00 0.30 0.17 -0.08 0.12 0.882 2.0
## 15 0.08 -0.18 0.21 -0.05 0.22 -0.07 -0.05 0.15 0.850 3.7
## 16 -0.10 -0.09 0.24 -0.09 0.13 -0.14 0.11 0.15 0.853 4.2
## 17 -0.06 0.36 -0.01 0.32 -0.04 0.45 -0.05 0.71 0.291 2.8
##
## MR1 MR3 MR2 MR4 MR5 MR7 MR6
## SS loadings 2.11 1.74 1.30 1.27 0.84 0.82 0.49
## Proportion Var 0.12 0.10 0.08 0.07 0.05 0.05 0.03
## Cumulative Var 0.12 0.23 0.30 0.38 0.43 0.48 0.50
## Proportion Explained 0.25 0.20 0.15 0.15 0.10 0.10 0.06
## Cumulative Proportion 0.25 0.45 0.60 0.75 0.85 0.94 1.00
##
## With factor correlations of
## MR1 MR3 MR2 MR4 MR5 MR7 MR6
## MR1 1.00 0.48 0.46 0.47 -0.25 0.38 -0.03
## MR3 0.48 1.00 0.34 0.55 -0.35 0.35 0.01
## MR2 0.46 0.34 1.00 0.35 -0.01 0.26 0.01
## MR4 0.47 0.55 0.35 1.00 -0.34 0.24 0.05
## MR5 -0.25 -0.35 -0.01 -0.34 1.00 -0.27 -0.04
## MR7 0.38 0.35 0.26 0.24 -0.27 1.00 0.10
## MR6 -0.03 0.01 0.01 0.05 -0.04 0.10 1.00
##
## Mean item complexity = 2.3
## Test of the hypothesis that 7 factors are sufficient.
##
## The degrees of freedom for the null model are 136 and the objective function was 5.33 with Chi Square of 3530.06
## The degrees of freedom for the model are 38 and the objective function was 0.1
##
## The root mean square of the residuals (RMSR) is 0.02
## The df corrected root mean square of the residuals is 0.03
##
## The harmonic number of observations is 670 with the empirical chi square 56.78 with prob < 0.026
## The total number of observations was 670 with MLE Chi Square = 66.72 with prob < 0.0027
##
## Tucker Lewis Index of factoring reliability = 0.969
## RMSEA index = 0.034 and the 90 % confidence intervals are 0.02 0.047
## BIC = -180.56
## Fit based upon off diagonal values = 1
## Measures of factor score adequacy
## MR1 MR3 MR2 MR4 MR5
## Correlation of scores with factors 0.99 0.94 0.84 0.86 0.79
## Multiple R square of scores with factors 0.98 0.89 0.70 0.74 0.62
## Minimum correlation of possible factor scores 0.96 0.77 0.41 0.48 0.24
## MR7 MR6
## Correlation of scores with factors 0.83 0.96
## Multiple R square of scores with factors 0.69 0.93
## Minimum correlation of possible factor scores 0.38 0.86