This is a worksheet for use with Lecture 7.
You have a video of me narrating these slides. Note that there are potentially minor discrepancies between the current set of slides and the one in the video. The slide numbers refer to the current set. I do not cover every single slide but you can code along!
If you answer correctly the colour of the box will change! (Don't worry about bonus questions, they are very much just that: a bonus!)
I would use factor analysis to explore whether similar items can be grouped together (True of False)
You can use stargazer to print a summary of the dataframe as on the slides. Or you can calculate these yourself.
please answer the following (3 decimals for all responses).
the means of tense =
the standard deviation of anxious =
the means of lax =
the standard deviation of quiet =
What is the difference between data measured on an interval scale and data measured on a ratio scale?
My answer:
Have a look at this website
We covered multivariate normality when we discussed OLS regression assumptions (True of False)
Have a look back at your slides, we covered this assumption when discussing MANOVA rather than OLS regression.
You can also calculate the multivariate normality test. What do you conclude?
You should have concluded that the assumption of multivariate normality is not upheld.
The code isn't shown for the plot. You can get the plot with this:
mvn(f_data, multivariatePlot = "qq")
Some of the output was not printed. Can you complete the following? (2 decimals)
relaxed =
"respnsi" =
"withdrw" =
Work out what you need to do from the previous slides. Remember that you can look up what dplyr's select does via the help function.
A factor loading of 0.80 means, generally speaking, that:
My answer:
A factor loading is:
My answer:
Which of the following is correct?
My answer:
Have a look at this website
Kaiser criterion for retaining factors is:
My answer:
What is 'minres' and abbreviation of (2 words, UK spelling)?
Have a look at this website
Have a look at the output VSS 1 extracts 5 factors but 3 is more reasonable as you can see in the plot.
From the output, what is the maximum achieved by VSS 2 (2 decimals)?
What does VSS test stand for? (3 words)
In case this was unclear, this is based on the 'M255.sav' dataset.
How many factors have you decided on? Do you agree with your neighbour, why not?
Have a look at here
As you can see everything is printed to screen here - but it does not show the sink() command. In week 6, we saw an example of closing the sink(). If you don't close the sink, things will continue to be printed to that file. This slide only prints the first part of the output.
You cannot see:
fa_5<-fa(f_data,3, fm = 'minres', rotate='varimax', fa = 'fa' sink('fa_5_output.txt') fa_5 sink()
How did you draw the plot?
How would you label the factors?
Also conduct VSS and Velicer MAP's test.
Varimax rotation could be used when:
My answer:
Have a look at here
Also note that this terminology, is not really clear - if you want to go down a wormhole - this explains the differences.
Please complete the following:
Item 3 primarily loads on Factor
Item 5 primarily loads on Factor
Item 6 primarily loads on Factor
Which of the following is true:
My answer:
Complete the exercise and submit via Blackboard!
Thanks to Lisa DeBruine for the webexercises package. Some of the multiple choice questions are from Psychology Express: Research methods, Discovering Statistics by Andy Field and from Statistics Without Maths for Psychology, 7th Edition. Please see general disclaimer.
sessionInfo()
## R version 4.3.2 (2023-10-31)
## Platform: aarch64-apple-darwin20 (64-bit)
## Running under: macOS Ventura 13.4
##
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0
##
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
##
## time zone: Europe/London
## tzcode source: internal
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] webexercises_1.1.0
##
## loaded via a namespace (and not attached):
## [1] digest_0.6.33 R6_2.5.1 fastmap_1.1.1 xfun_0.41
## [5] cachem_1.0.8 knitr_1.45 htmltools_0.5.7 rmarkdown_2.25
## [9] cli_3.6.1 sass_0.4.7 jquerylib_0.1.4 compiler_4.3.2
## [13] rstudioapi_0.15.0 tools_4.3.2 evaluate_0.23 bslib_0.5.1
## [17] yaml_2.3.7 jsonlite_1.8.7 rlang_1.1.3