ItemResponseCalc


NameItemResponseCalc JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryStatistical Analysis of Questionnaire Response Data
upload_time2023-09-06 12:17:06
maintainer
docs_urlNone
authorArne Leijon
requires_python>=3.9
licenseMIT License
keywords questionnaire item response theory irt ordinal ratings bayesian
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Package **ItemResponseCalc** implements probabilistic Bayesian analysis
of responses from a questionnaire designed to measure individual `traits', 
i.e., preferences, judgments, or capabilities.

The analysis is based on *Item Response Theory (IRT)*.
This is a family of probabilistic models designed to handle responses to test instruments for any purpose in social, psychological, or educational research.
The analysis model estimates individual parameters numerically on an objective *interval scale*,
although the raw input data are *subjective*
and indicate only an *ordinal* judgment for each item in the questionnaire.

This implementation uses the *Graded Response Model* (Samejima, 1997; Fox, 2010), 
applied with a logistic distribution for the latent random variable assumed to determine each response.
This model treats subjects' responses
as determined by the outcome of a latent individual trait variable,
i.e., somewhat similar to the latent internal "sensation"
variable assumed to determine responses in psycho-physical experiments.

Another model for similar data might be the Partial Credits Model (Masters, 1982; Fox, 2010),
which belongs to the Rasch family.

## Data Collection
The present package version can only handle discrete *ordinal* response data.
The response alternatives must represent a natural order, e.g., 
`strongly disagree`, `disagree`, `no opinion`, `agree`, `strongly agree`.

This package *does not include* functions to administer the data collection;
it can only use existing recorded data.
The present version *does not include* functions to validate the statistical properties of the questionnaire itself,
and thus cannot help in the design of a questionnaire.
It can only analyze recorded response data sets obtained from an existing test instrument.

The package can analyze response data with the following features:

1. The questionnaire may include several items.

1. The items may be designed to measure either 
	a single trait, or several traits.
	The analysis will automatically determine how many traits are needed
	to effectively model the complete set of response data.
    	The analysis results will show estimated values for each trait.
   	 
 1. Separate model parameters are estimated for the traits of individual respondents, 
 	and for the response scale of each item.
	The analysis results will show which items are associated with each trait.
	The results also show how the trait scale corresponds to the ordinal responses for each item.
 
1. The number of response alternatives may differ among questionnaire items.
	Each item must have at least two response alternatives,
	even if one alternative is not explicitly shown in the questionnaire. 
	(For example, if an item requires a Yes/No answer, 
	only the Yes alternative might be shown as a tick box, 
	and the absence of a tick mark is interpreted as a No answer.) 
	
1. Data for one or more distinct *Participant Groups* may be included.
	The analysis will show predicted differences between the populations
	from which the groups are recruited.
	The statistical credibility is calculated *jointly* for all population differences,
	automatically accounting for the effects of multiple comparisons.	
    
1. The analysis model can use input data stored in various file formats. 
    Package Pandas is used to access the data. 
	The response alternatives for each item may be encoded in different ways 
	in each input source.

1. The user may specify inclusion criteria for respondent records,
	separately for each input file.

1. If an input data file includes respondent labels,
	the program checks for duplicate IDs, 
    and only the last record from each respondent will be used. Otherwise, all input records are treated as independent, 
	assumed to be given by different respondents.

The Bayesian model is hierarchical.
The package can estimate predictive distributions of traits for
* a random individual in each population represented by a group of respondents,
* the mean of each population represented by a group of respondents.

All results are saved in files with figures and tables, with user-selectable formats. 

## Package Documentation
General information and version history is given in the package doc-string that may be accessed by command
`help(ItemResponseCalc)`.

Specific information about the organization and accepted formats of input data files
is presented in the doc-string of module item_response_data, accessible 
via `help(ItemResponseCalc.item_response_data)`.

After running an analysis, the logging output file briefly explains
the analysis results presented in figures and tables.

## Usage
1. Install the most recent package version:
    `python3 -m pip install --upgrade ItemResponseCalc`

1. Copy the template script `run_irt.py`, rename it, and
    edit the copy as suggested in the template, to specify
    - your questionnaire and response alternatives,
    - the respondent groups and corresponding input data sources,
    - a directory where all output result files will be stored.

1. Run your edited script: `python3 run_my_irt.py`.

## Requirements
This package requires Python 3.9 or newer, with recent versions of 
Numpy, Scipy, Pandas, and Matplotlib, 
as well as a support package samppy, and openpyxl for reading xlsx files.
The pip installer will check and install these required packages if needed.

Input data can be accessed from sources in any format 
that package Pandas can handle.
Some file formats may require additional help packages to be installed manually.

Pandas can also extract data from an SQL database, 
but then the SQLAlchemy package might need to be installed manually.


## References
A. Leijon (2023). 
*Analysis of Ordinal Response Data using 
Bayesian Item Response Theory package ItemResponseCalc*.
Technical report with all math details.
Contact the author for a copy.

A. Leijon, H. Dillon, L. Hickson, M. Kinkel, S. E. Kramer, and P. Nordqvist (2020). 
Analysis of data from the international outcome inventory for hearing aids (IOI-HA) using Bayesian item response theory. 
*Int J Audiol* 60(2):81–88.
[download](https://www.tandfonline.com/doi/full/10.1080/14992027.2020.1813338)

J.-P. Fox (2010). *Bayesian Item Response Modeling: Theory and Applications*. Statistics for Social and Behavioral Sciences. Springer.

G. N. Masters (1982). A Rasch model for partial credit scoring. *Psychometrika*, 47(2):149–174.

F. Samejima (1997). Graded response model. In W. J. v. D. Linden and R. K. Hambleton, eds., *Handbook of Modern Item Response Theory*, p. 85–100. Springer, New York.


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "ItemResponseCalc",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "Questionnaire,Item Response Theory,IRT,Ordinal Ratings,Bayesian",
    "author": "Arne Leijon",
    "author_email": "leijon@kth.se",
    "download_url": "https://files.pythonhosted.org/packages/92/c8/ff45f3371fd1acf53cb7f323f2e0d6b86a67cc84dcea044ec142903a87e4/ItemResponseCalc-1.0.0.tar.gz",
    "platform": null,
    "description": "Package **ItemResponseCalc** implements probabilistic Bayesian analysis\nof responses from a questionnaire designed to measure individual `traits', \ni.e., preferences, judgments, or capabilities.\n\nThe analysis is based on *Item Response Theory (IRT)*.\nThis is a family of probabilistic models designed to handle responses to test instruments for any purpose in social, psychological, or educational research.\nThe analysis model estimates individual parameters numerically on an objective *interval scale*,\nalthough the raw input data are *subjective*\nand indicate only an *ordinal* judgment for each item in the questionnaire.\n\nThis implementation uses the *Graded Response Model* (Samejima, 1997; Fox, 2010), \napplied with a logistic distribution for the latent random variable assumed to determine each response.\nThis model treats subjects' responses\nas determined by the outcome of a latent individual trait variable,\ni.e., somewhat similar to the latent internal \"sensation\"\nvariable assumed to determine responses in psycho-physical experiments.\n\nAnother model for similar data might be the Partial Credits Model (Masters, 1982; Fox, 2010),\nwhich belongs to the Rasch family.\n\n## Data Collection\nThe present package version can only handle discrete *ordinal* response data.\nThe response alternatives must represent a natural order, e.g., \n`strongly disagree`, `disagree`, `no opinion`, `agree`, `strongly agree`.\n\nThis package *does not include* functions to administer the data collection;\nit can only use existing recorded data.\nThe present version *does not include* functions to validate the statistical properties of the questionnaire itself,\nand thus cannot help in the design of a questionnaire.\nIt can only analyze recorded response data sets obtained from an existing test instrument.\n\nThe package can analyze response data with the following features:\n\n1. The questionnaire may include several items.\n\n1. The items may be designed to measure either \n\ta single trait, or several traits.\n\tThe analysis will automatically determine how many traits are needed\n\tto effectively model the complete set of response data.\n    \tThe analysis results will show estimated values for each trait.\n   \t \n 1. Separate model parameters are estimated for the traits of individual respondents, \n \tand for the response scale of each item.\n\tThe analysis results will show which items are associated with each trait.\n\tThe results also show how the trait scale corresponds to the ordinal responses for each item.\n \n1. The number of response alternatives may differ among questionnaire items.\n\tEach item must have at least two response alternatives,\n\teven if one alternative is not explicitly shown in the questionnaire. \n\t(For example, if an item requires a Yes/No answer, \n\tonly the Yes alternative might be shown as a tick box, \n\tand the absence of a tick mark is interpreted as a No answer.) \n\t\n1. Data for one or more distinct *Participant Groups* may be included.\n\tThe analysis will show predicted differences between the populations\n\tfrom which the groups are recruited.\n\tThe statistical credibility is calculated *jointly* for all population differences,\n\tautomatically accounting for the effects of multiple comparisons.\t\n    \n1. The analysis model can use input data stored in various file formats. \n    Package Pandas is used to access the data. \n\tThe response alternatives for each item may be encoded in different ways \n\tin each input source.\n\n1. The user may specify inclusion criteria for respondent records,\n\tseparately for each input file.\n\n1. If an input data file includes respondent labels,\n\tthe program checks for duplicate IDs, \n    and only the last record from each respondent will be used. Otherwise, all input records are treated as independent, \n\tassumed to be given by different respondents.\n\nThe Bayesian model is hierarchical.\nThe package can estimate predictive distributions of traits for\n* a random individual in each population represented by a group of respondents,\n* the mean of each population represented by a group of respondents.\n\nAll results are saved in files with figures and tables, with user-selectable formats. \n\n## Package Documentation\nGeneral information and version history is given in the package doc-string that may be accessed by command\n`help(ItemResponseCalc)`.\n\nSpecific information about the organization and accepted formats of input data files\nis presented in the doc-string of module item_response_data, accessible \nvia `help(ItemResponseCalc.item_response_data)`.\n\nAfter running an analysis, the logging output file briefly explains\nthe analysis results presented in figures and tables.\n\n## Usage\n1. Install the most recent package version:\n    `python3 -m pip install --upgrade ItemResponseCalc`\n\n1. Copy the template script `run_irt.py`, rename it, and\n    edit the copy as suggested in the template, to specify\n    - your questionnaire and response alternatives,\n    - the respondent groups and corresponding input data sources,\n    - a directory where all output result files will be stored.\n\n1. Run your edited script: `python3 run_my_irt.py`.\n\n## Requirements\nThis package requires Python 3.9 or newer, with recent versions of \nNumpy, Scipy, Pandas, and Matplotlib, \nas well as a support package samppy, and openpyxl for reading xlsx files.\nThe pip installer will check and install these required packages if needed.\n\nInput data can be accessed from sources in any format \nthat package Pandas can handle.\nSome file formats may require additional help packages to be installed manually.\n\nPandas can also extract data from an SQL database, \nbut then the SQLAlchemy package might need to be installed manually.\n\n\n## References\nA. Leijon (2023). \n*Analysis of Ordinal Response Data using \nBayesian Item Response Theory package ItemResponseCalc*.\nTechnical report with all math details.\nContact the author for a copy.\n\nA. Leijon, H. Dillon, L. Hickson, M. Kinkel, S. E. Kramer, and P. Nordqvist (2020). \nAnalysis of data from the international outcome inventory for hearing aids (IOI-HA) using Bayesian item response theory. \n*Int J Audiol* 60(2):81\u201388.\n[download](https://www.tandfonline.com/doi/full/10.1080/14992027.2020.1813338)\n\nJ.-P. Fox (2010). *Bayesian Item Response Modeling: Theory and Applications*. Statistics for Social and Behavioral Sciences. Springer.\n\nG. N. Masters (1982). A Rasch model for partial credit scoring. *Psychometrika*, 47(2):149\u2013174.\n\nF. Samejima (1997). Graded response model. In W. J. v. D. Linden and R. K. Hambleton, eds., *Handbook of Modern Item Response Theory*, p. 85\u2013100. Springer, New York.\n\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Statistical Analysis of Questionnaire Response Data",
    "version": "1.0.0",
    "project_urls": null,
    "split_keywords": [
        "questionnaire",
        "item response theory",
        "irt",
        "ordinal ratings",
        "bayesian"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ec7ac5d55ab583a3c0090bb62cfda8dbc784ccb4f59395fee9197f5ec61a05ff",
                "md5": "f22f751263b878ea657a366996fce192",
                "sha256": "d960bc98e8c5a03e00fa3f68ae8682580a0b6ed8a06bba43ba4e9ad1d5da4209"
            },
            "downloads": -1,
            "filename": "ItemResponseCalc-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f22f751263b878ea657a366996fce192",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 94995,
            "upload_time": "2023-09-06T12:17:04",
            "upload_time_iso_8601": "2023-09-06T12:17:04.227772Z",
            "url": "https://files.pythonhosted.org/packages/ec/7a/c5d55ab583a3c0090bb62cfda8dbc784ccb4f59395fee9197f5ec61a05ff/ItemResponseCalc-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "92c8ff45f3371fd1acf53cb7f323f2e0d6b86a67cc84dcea044ec142903a87e4",
                "md5": "5d40896a6cb581a3ee36fc6fa68d0dfd",
                "sha256": "8a1cd448a4341696e03cdec2cab876217dce542a797dc5a90bcf1713efc9a321"
            },
            "downloads": -1,
            "filename": "ItemResponseCalc-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "5d40896a6cb581a3ee36fc6fa68d0dfd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 85838,
            "upload_time": "2023-09-06T12:17:06",
            "upload_time_iso_8601": "2023-09-06T12:17:06.194687Z",
            "url": "https://files.pythonhosted.org/packages/92/c8/ff45f3371fd1acf53cb7f323f2e0d6b86a67cc84dcea044ec142903a87e4/ItemResponseCalc-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-06 12:17:06",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "itemresponsecalc"
}
        
Elapsed time: 0.10771s