Propensity score matching for python and graphical plots
Project description
GeneralizIT: Generalizability Theory Analysis in Python
Overview
GeneralizIT is a Python-based library designed for conducting Generalizability Theory (GT) analyses. The library supports multiple research designs and provides tools to calculate ANOVA tables, generalizability coefficients (G coefficients), and decision (D) studies.
It is particularly useful for researchers and practitioners who work with multi-faceted designs and want to quantify the reliability and generalizability of their measurements.
Features
- Support for Various Designs: Handles different research designs (e.g., crossed, nested).
- Automated Data Cleaning: Prepares your data by dropping unnecessary columns and normalizing names.
- ANOVA Calculation: Produces ANOVA tables specific to your design.
- G Coefficients: Computes generalizability coefficients to assess reliability.
- D Studies: Performs decision studies with customizable levels for facets.
- Summaries: Provides concise summaries for ANOVA, G coefficients, and D studies.
Installation
To use this library, the following dependencies are installed alongside the package:
pandasnumpyrescipyitertoolstypingunittestitertools
Usage
Initializing GeneralizIT
from generalizit import GeneralizIT
# Initialize with:
# - `data`: A pandas DataFrame containing your data.
# - `input_str`: A string describing the research design (e.g., "Person x i x o").
# - `response`: The column name for the response variable.
GT = GeneralizIT(data=formatted_df, input_str='Person x i x o', response='Response')
Example Workflow
- Calculate ANOVA
GT.calculate_anova()
- Compute G Coefficients
GT.g_coeffs()
- Perform a D Study
GT.calculate_d_study(levels={'Person': None, 'i': [4, 8], 'o': [1, 2]})
- View Summaries
- ANOVA Summary:
GT.anova_summary()
- G Coefficients Summary:
GT.g_coeff_summary()
- D Study Summary:
GT.d_study_summary()
- ANOVA Summary:
Input Data Format
The input data must be a pandas DataFrame where each column represents a facet, and one column is the response variable.
For example:
| Person | i | o | Response |
|---|---|---|---|
| 1 | 1 | 1 | 5 |
| 1 | 2 | 1 | 7 |
| ... |
Example Datasets
Synthetic Data from Brennan (2001)
The package includes examples of synthetic data used to demonstrate the functionality of the library. You can adapt these examples to your own datasets.
Research Design Syntax
The input_str parameter specifies the research design. Supported formats include:
- Crossed Designs:
"Person x i x o" - Nested Designs:
"Person x (r:t)"
Output
- ANOVA Table: Provides variance component estimates for each facet.
- G Coefficients: Estimates the reliability of measurements across facets.
- D Studies: Offers predictions of generalizability for specified facet levels.
Notes
- Ensure your data is preprocessed to include only the necessary facets and the response variable.
- Column names should match those specified in the research design.
- Use the
_clean_datamethod to automate column renaming and pruning.
License
This library is licensed under the MIT License.
Contributions
Contributions to improve functionality or expand supported designs are welcome! Please fork the repository and create a pull request.
Contact
For questions or support, raise an issue in the github repo!
Happy analyzing with GeneralizIT!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file generalizit-0.0.1.tar.gz.
File metadata
- Download URL: generalizit-0.0.1.tar.gz
- Upload date:
- Size: 31.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1ca8f0498d47f9d83e75bb53cc80498b8dfafb9fabfce4dc254845ce5a53ba6
|
|
| MD5 |
70dfddef38fb3d56adc57a6a34154c7e
|
|
| BLAKE2b-256 |
36d57edc5c02f61b60e84f8f55ee6d4443ece5a265e2c5025ad5496c038bb3e4
|
File details
Details for the file generalizit-0.0.1-py3-none-any.whl.
File metadata
- Download URL: generalizit-0.0.1-py3-none-any.whl
- Upload date:
- Size: 43.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
935f5fc602320b9c1aabaae5f6fd64548d99b219ebf2e42f7339f70f587b7429
|
|
| MD5 |
aedd188bdfd08db73cf4e949251cc41b
|
|
| BLAKE2b-256 |
a93c2ac2583307f808705754d8d9a894ab3fa7ea6ca675a9e7e3139970073c64
|