This video provides a general overview of syntax for performing confirmatory factor analysis (CFA) by way of Stata command syntax. Knowing syntax can be useful in cases where you wish to test more complicated models that may be particularly burdensome if using the GUI to draw out your model.
In the video I reference the Stata user's manual (found at https://www.stata.com/manuals/sem.pdf) as the source of the examples and where to access links to the data. If you would rather access the data directly copy the following for each example and paste into the Command line:
For example 1 data (one-factor measurement model):
use https://www.stata-press.com/data/r16/sem_1fmm
For example 2 data (two-factor model):
use https://www.stata-press.com/data/r16/sem_2fmm
A copy of the Powerpoint referenced in the video can be downloaded here: https://drive.google.com/file/d/10X54ou6y0hE1Am_-Iusm86GYZ4qK5aai/view
Access Stata Do-file containing syntax for the examples in the presentation here:
https://drive.google.com/file/d/15GHpR3kkiOIhEm7hviJ2oJvCy-LsEBAl/view
Same syntax in text file:
https://drive.google.com/file/d/11GpWh1_Hd3Udwa8e94VBvRaZsvMVopfg/view
For example of CFA in Stata using the graphical user interface: https://www.youtube.com/watch?v=bYrO3tSwGik
Here is another video on using a couple of additional syntax options that could mean the difference between meaningful output and an error message: https://youtu.be/FHPTx5ySHo8