Test - Bartlett Test of Sphericity
Jump to navigation
Jump to search
Conduct a Bartlett's test for sphericity on a set of variables.
How to run this test
- In Displayr, go to Insert > More > Test > Bartlett Test of Sphericity. In Q, go to Create > Test > Bartlett Test of Sphericity
- Specify the variables to use under Inputs > Input Variables
- Adjust the options (noted below)
You should use numeric variables as inputs. If you use categorical or ordinal variables, they will be coerced to numeric based on their values for the purposes of running the test.
Example
An example output is shown below:
Options
INPUTS
- Input Variables The variables that you would like to analyze.
- Missing data See Missing Data Options.
- Variable names Display Variable Names in the output, instead of Variable Labels.
- More decimal places Display numeric values with 8 decimal places.
Additional Properties
When using this feature you can obtain additional information that is stored by the R code which produces the output.
- To do so, select Create > R Output.
- In the R CODE, paste: item = YourReferenceName
- Replace YourReferenceName with the name of your item. (eg: 'bartlett.test'). You can find this by selecting the item and then going to Properties > General > Name from the object inspector on the right.
- Below the first line of code, you can paste in snippets from below or type in str(item) to see a list of available information.
For a more in-depth discussion on extracting information from objects in R, checkout our blog post here.
Acknowledgements
The function cortest.bartlett from the R package psych is used to conduct the Bartlett test.
Code
▶ Show Code
▶ Show Code