Skip to content

Exios66/Cronbach-Alpha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cronbach-Alpha

RUST - Psychometrics

Overview

Cronbach's Alpha is one of the most widely used measures of reliability in psychometric assessment and research. This implementation provides a robust and efficient way to calculate the coefficient using Rust's performance capabilities.

Features

  • Fast and efficient Cronbach's Alpha calculation
  • Support for multiple data formats
  • Handles missing values
  • Statistical validation checks
  • Clear error handling and reporting

Installation

Add this to your Cargo.toml:

[dependencies]
cronbach-alpha = "0.1.0"

Usage

use cronbach_alpha::calculate_alpha;

fn main() {
    // Example data matrix (items x participants)
    let data = vec![
        vec![5, 4, 3, 2],
        vec![4, 3, 2, 1],
        vec![5, 4, 3, 2],
    ];

    match calculate_alpha(&data) {
        Ok(alpha) => println!("Cronbach's Alpha: {:.3}", alpha),
        Err(e) => eprintln!("Error: {}", e),
    }
}

Mathematical Background

Cronbach's Alpha (α) is calculated using the formula:

α = (k / (k-1)) * (1 - Σσᵢ² / σₜ²)

Where:

  • k is the number of items
  • σᵢ² is the variance of each item
  • σₜ² is the variance of the total score

Requirements

  • Rust 1.56.0 or higher
  • Standard statistical libraries

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

References

  • Cronbach, L. J. (1951). Coefficient alpha and the internal structure of tests. Psychometrika, 16(3), 297-334.

  • Guidelines for reporting reliability and internal consistency statistics in psychological research

Author

Jack J. Burleson

Acknowledgments

  • The Rust community
  • Contributors to psychometric research

About

RUST - Psychometrics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published