generalizit


Namegeneralizit JSON
Version 0.0.3 PyPI version JSON
download
home_pageNone
SummaryGeneralizability theory fully crossed and nested
upload_time2024-12-06 00:14:36
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseNone
keywords generalizability theory crossed nested
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:

- `pandas`
- `numpy`
- `scipy`

## Usage

### Initializing GeneralizIT

```python
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

1. **Calculate ANOVA**
   ```python
   GT.calculate_anova()
   ```
2. **Compute G Coefficients**
   ```python
   GT.g_coeffs()
   ```
3. **Perform a D Study**
   ```python
   GT.calculate_d_study(levels={'Person': None, 'i': [4, 8], 'o': [1, 2]})
   ```
4. **Calculate Confidence Intervals**
   ```python
   GT.calculate_confidence_intervals(alpha=0.05)
   ```
5. **View Summaries**
   - ANOVA Summary:
     ```python
     GT.anova_summary()
     ```
   - G Coefficients Summary:
     ```python
     GT.g_coeff_summary()
     ```
   - D Study Summary:
     ```python
     GT.d_study_summary()
     ```
   - Confidence Intervals Summary:
     ```python
       GT.confidence_intervals_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.

 ```markdown
  | Person | i | o | Response |
  |--------|---|---|----------|
  |      1 | 1 | 1 |        2 |
  |      1 | 2 | 1 |        6 |
  |      1 | 3 | 1 |        7 |
  |      1 | 4 | 1 |        5 |
  |      1 | 1 | 2 |        2 |
  |      1 | 2 | 2 |        5 |
  |      1 | 3 | 2 |        5 |
  |      1 | 4 | 2 |        5 |
  ...
  |     10 | 1 | 1 |        6 |
  |     10 | 2 | 1 |        8 |
  |     10 | 3 | 1 |        7 |
  |     10 | 4 | 1 |        6 |
  |     10 | 1 | 2 |        6 |
  |     10 | 2 | 2 |        8 |
  |     10 | 3 | 2 |        8 |
  |     10 | 4 | 2 |        6 |
  ```
Conversely, if the design was nested such as `person x (rater:item)`, raters are nested under item and should be identified uniquely either by delineation `item1_rater1` or unique numbering as below:

``` markdown
| Person | item | rater | Response |
|--------|------|-------|----------|
|      1 |    1 |     1 |        2 |
|      1 |    1 |     2 |        6 |
|      1 |    1 |     3 |        7 |
|      1 |    1 |     4 |        5 |
|      1 |    2 |     5 |        2 |
|      1 |    2 |     6 |        5 |
|      1 |    2 |     7 |        5 |
|      1 |    2 |     8 |        5 |
|      1 |    3 |     9 |        6 |
|      1 |    3 |    10 |        8 |
|      1 |    3 |    11 |        7 |
|      1 |    3 |    12 |        6 |
|      2 |    1 |     1 |        6 |
|      2 |    1 |     2 |        8 |
|      2 |    1 |     3 |        8 |
|      2 |    1 |     4 |        6 |
...
```

### 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_data` method 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**!

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "generalizit",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "generalizability theory, crossed, nested",
    "author": null,
    "author_email": "Tyler Smith <tyler.js.smith111@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/72/1f/150eb1c1e9dc0cd18c5547de3a83b85ddf6c58d7face85b00c5026579856/generalizit-0.0.3.tar.gz",
    "platform": null,
    "description": "# GeneralizIT: Generalizability Theory Analysis in Python\n\n## Overview\n\nGeneralizIT 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.\n\nIt is particularly useful for researchers and practitioners who work with multi-faceted designs and want to quantify the reliability and generalizability of their measurements.\n\n## Features\n\n- **Support for Various Designs:** Handles different research designs (e.g., crossed, nested).\n- **Automated Data Cleaning:** Prepares your data by dropping unnecessary columns and normalizing names.\n- **ANOVA Calculation:** Produces ANOVA tables specific to your design.\n- **G Coefficients:** Computes generalizability coefficients to assess reliability.\n- **D Studies:** Performs decision studies with customizable levels for facets.\n- **Summaries:** Provides concise summaries for ANOVA, G coefficients, and D studies.\n\n## Installation\n\nTo use this library, the following dependencies are installed alongside the package:\n\n- `pandas`\n- `numpy`\n- `scipy`\n\n## Usage\n\n### Initializing GeneralizIT\n\n```python\nfrom generalizit import GeneralizIT\n\n# Initialize with:\n# - `data`: A pandas DataFrame containing your data.\n# - `input_str`: A string describing the research design (e.g., \"Person x i x o\").\n# - `response`: The column name for the response variable.\nGT = GeneralizIT(data=formatted_df, input_str='Person x i x o', response='Response')\n```\n\n### Example Workflow\n\n1. **Calculate ANOVA**\n   ```python\n   GT.calculate_anova()\n   ```\n2. **Compute G Coefficients**\n   ```python\n   GT.g_coeffs()\n   ```\n3. **Perform a D Study**\n   ```python\n   GT.calculate_d_study(levels={'Person': None, 'i': [4, 8], 'o': [1, 2]})\n   ```\n4. **Calculate Confidence Intervals**\n   ```python\n   GT.calculate_confidence_intervals(alpha=0.05)\n   ```\n5. **View Summaries**\n   - ANOVA Summary:\n     ```python\n     GT.anova_summary()\n     ```\n   - G Coefficients Summary:\n     ```python\n     GT.g_coeff_summary()\n     ```\n   - D Study Summary:\n     ```python\n     GT.d_study_summary()\n     ```\n   - Confidence Intervals Summary:\n     ```python\n       GT.confidence_intervals_summary()\n       ```\n\n### Input Data Format\n\nThe input data must be a pandas DataFrame where each column represents a facet, and one column is the response variable.\n\n ```markdown\n  | Person | i | o | Response |\n  |--------|---|---|----------|\n  |      1 | 1 | 1 |        2 |\n  |      1 | 2 | 1 |        6 |\n  |      1 | 3 | 1 |        7 |\n  |      1 | 4 | 1 |        5 |\n  |      1 | 1 | 2 |        2 |\n  |      1 | 2 | 2 |        5 |\n  |      1 | 3 | 2 |        5 |\n  |      1 | 4 | 2 |        5 |\n  ...\n  |     10 | 1 | 1 |        6 |\n  |     10 | 2 | 1 |        8 |\n  |     10 | 3 | 1 |        7 |\n  |     10 | 4 | 1 |        6 |\n  |     10 | 1 | 2 |        6 |\n  |     10 | 2 | 2 |        8 |\n  |     10 | 3 | 2 |        8 |\n  |     10 | 4 | 2 |        6 |\n  ```\nConversely, if the design was nested such as `person x (rater:item)`, raters are nested under item and should be identified uniquely either by delineation `item1_rater1` or unique numbering as below:\n\n``` markdown\n| Person | item | rater | Response |\n|--------|------|-------|----------|\n|      1 |    1 |     1 |        2 |\n|      1 |    1 |     2 |        6 |\n|      1 |    1 |     3 |        7 |\n|      1 |    1 |     4 |        5 |\n|      1 |    2 |     5 |        2 |\n|      1 |    2 |     6 |        5 |\n|      1 |    2 |     7 |        5 |\n|      1 |    2 |     8 |        5 |\n|      1 |    3 |     9 |        6 |\n|      1 |    3 |    10 |        8 |\n|      1 |    3 |    11 |        7 |\n|      1 |    3 |    12 |        6 |\n|      2 |    1 |     1 |        6 |\n|      2 |    1 |     2 |        8 |\n|      2 |    1 |     3 |        8 |\n|      2 |    1 |     4 |        6 |\n...\n```\n\n### Example Datasets\n\n#### Synthetic Data from Brennan (2001)\n\nThe package includes examples of synthetic data used to demonstrate the functionality of the library. You can adapt these examples to your own datasets.\n\n## Research Design Syntax\n\nThe `input_str` parameter specifies the research design. Supported formats include:\n\n- **Crossed Designs:** `\"Person x i x o\"`\n- **Nested Designs:** `\"Person x (r:t)\"`\n\n## Output\n\n- **ANOVA Table:** Provides variance component estimates for each facet.\n- **G Coefficients:** Estimates the reliability of measurements across facets.\n- **D Studies:** Offers predictions of generalizability for specified facet levels.\n\n## Notes\n\n- Ensure your data is preprocessed to include only the necessary facets and the response variable.\n- Column names should match those specified in the research design.\n- Use the `_clean_data` method to automate column renaming and pruning.\n\n## License\n\nThis library is licensed under the MIT License.\n\n## Contributions\n\nContributions to improve functionality or expand supported designs are welcome! Please fork the repository and create a pull request.\n\n## Contact\n\nFor questions or support, raise an issue in the github repo!\n\n---\n\nHappy analyzing with **GeneralizIT**!\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Generalizability theory fully crossed and nested",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://pypi.org/project/generalizit",
        "Issues": "https://pypi.org/project/generalizit/issues"
    },
    "split_keywords": [
        "generalizability theory",
        " crossed",
        " nested"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "02e91bd19fd9180ee43d7cb8863bb01abf0a7bc75c80b2136c1bfd6f8a921603",
                "md5": "c4e996ef95296a703d37dc74a8d81791",
                "sha256": "870ab25289203cdbee0810649a802cb7b95b10561dca11afdf3e6c91aeba2396"
            },
            "downloads": -1,
            "filename": "generalizit-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c4e996ef95296a703d37dc74a8d81791",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 38030,
            "upload_time": "2024-12-06T00:14:35",
            "upload_time_iso_8601": "2024-12-06T00:14:35.510130Z",
            "url": "https://files.pythonhosted.org/packages/02/e9/1bd19fd9180ee43d7cb8863bb01abf0a7bc75c80b2136c1bfd6f8a921603/generalizit-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "721f150eb1c1e9dc0cd18c5547de3a83b85ddf6c58d7face85b00c5026579856",
                "md5": "0f76bcd2f7b2505080444569802d3e3e",
                "sha256": "3222c78c2e8bb7f997c05039309b003c8cebb49cb021bd34a0a2c12efcae0b53"
            },
            "downloads": -1,
            "filename": "generalizit-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "0f76bcd2f7b2505080444569802d3e3e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 29072,
            "upload_time": "2024-12-06T00:14:36",
            "upload_time_iso_8601": "2024-12-06T00:14:36.550668Z",
            "url": "https://files.pythonhosted.org/packages/72/1f/150eb1c1e9dc0cd18c5547de3a83b85ddf6c58d7face85b00c5026579856/generalizit-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-06 00:14:36",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "generalizit"
}
        
Elapsed time: 0.71535s