# 41. PCA for CB-SEM preparation

## Purpose

What exploratory component pattern appears before fitting the confirmatory wellbeing model?

## Practice study

- File: [student-wellbeing-cfa.csv](../samples/student-wellbeing-cfa.csv)
- Observations: 500
- Data type: deterministic synthetic instructional data
- Complexity: a realistic multivariable observed-data analysis

> **Installed 2.62.8 qualification note:** this tutorial uses the ordinary PCA route and is blocked by the same saved-project lifecycle as the standalone PCA tutorial. The dataset and variable roles remain valid preparation material, but no completed PCA result, report, export, or reopen claim is made for 2.62.8.

## Exact procedure

1. Start QuickPLS and choose **New Project**. Enter a readable project name such as **PCA for CB-SEM preparation Tutorial** and choose a local `.qpls` destination.

2. Open **Data**, choose **Import Data**, select **student-wellbeing-cfa.csv**, keep the detected header row, review the preview, and choose **Import**. Confirm 500 observations are available.

   ![PCA for CB-SEM preparation imported data](../screenshots/pca-for-cb-sem-preparation/01-data-ready.png)

3. This method does not require a latent-variable diagram. In its setup screen use these roles: Select all sixteen autonomy, competence, relatedness, and wellbeing indicators; exclude case_id.

4. Review the selected outcome, predictors, groups, or analysis variables. Remove case_id and every unused teaching/reference column from the analysis selection.

   ![PCA for CB-SEM preparation prepared model or variable roles](../screenshots/pca-for-cb-sem-preparation/02-variable-roles.png)

5. Check that every required role is populated with a numeric variable and that outcome/predictor selections do not overlap.

6. Use **Calculate → Principal Component Analysis**.

   ![PCA for CB-SEM preparation calculation setup](../screenshots/pca-for-cb-sem-preparation/03-calculation-setup.png)

7. Complete the method-specific settings:

- Use the scree plot and a documented retention rule; do not treat PCA as a replacement for CFA

8. Read **Readiness**, leave **Open Results when finished** selected, and choose **Start calculation** once. Wait for **Completed**; do not close the project while the result is being saved.

9. In **Results**, confirm **PCA for CB-SEM preparation** is selected and inspect these outputs in order:

1. Scree plot
2. Explained variance
3. Component loadings
4. Scores when requested

   ![PCA for CB-SEM preparation primary result](../screenshots/pca-for-cb-sem-preparation/04-results-primary.png)

   ![PCA for CB-SEM preparation secondary result](../screenshots/pca-for-cb-sem-preparation/05-results-secondary.png)

10. Choose **Save Report** to preserve the exact result. Use **Export** for the needed table/report format. Close and reopen the project once and confirm the saved result remains selectable.

## Reading guidance

- The data are deterministic synthetic teaching data. They are suitable for reproducing the workflow, not for substantive publication claims.
