UNPKG

als-statistics

Version:

A powerful and lightweight JavaScript library for descriptive statistics, regression, clustering, outlier detection, and noise analysis using a flexible table/column architecture.

34 lines (24 loc) 649 B
## 📏 Cronbach's Alpha Cronbach’s Alpha measures internal consistency — how closely related a set of numeric items are. ### 🔹 Use Cases - Questionnaires and surveys - Psychometric analysis - Testing item reliability ### 🔹 Usage ```js const table = Statistics.newTable({ Q1: [4, 5, 3, 4, 5], Q2: [3, 4, 2, 3, 4], Q3: [5, 3, 4, 5, 2] }); const alpha = table.cronbachAlpha; console.log(alpha.alpha); // Example: 0.74 ``` ### 🔹 Item Deletion Diagnostics ```js console.log(alpha.perColumn); // { Q1: 0.65, Q2: 0.68, Q3: 0.71 } ``` ### 🔹 Notes - Requires 2+ numeric columns. - If all responses are identical, `alpha = 0`.