mfrmpy 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mfrmpy-0.1.0/.gitignore +26 -0
- mfrmpy-0.1.0/LICENSE +21 -0
- mfrmpy-0.1.0/LICENSE_NOTICE.md +30 -0
- mfrmpy-0.1.0/PKG-INFO +289 -0
- mfrmpy-0.1.0/docs/analysis_scope.md +158 -0
- mfrmpy-0.1.0/docs/python_library.md +260 -0
- mfrmpy-0.1.0/examples/desktop_writing.csv +961 -0
- mfrmpy-0.1.0/locales/en.json +4898 -0
- mfrmpy-0.1.0/mfrm_app/__init__.py +8 -0
- mfrmpy-0.1.0/mfrm_app/_resources.py +12 -0
- mfrmpy-0.1.0/mfrm_app/accessibility_acceptance.py +691 -0
- mfrmpy-0.1.0/mfrm_app/assignment_context_milp.py +952 -0
- mfrmpy-0.1.0/mfrm_app/assignment_generator.py +239 -0
- mfrmpy-0.1.0/mfrm_app/assignment_mechanism.py +1406 -0
- mfrmpy-0.1.0/mfrm_app/assignment_sensitivity.py +760 -0
- mfrmpy-0.1.0/mfrm_app/basic_analysis.py +400 -0
- mfrmpy-0.1.0/mfrm_app/bias_analysis.py +1384 -0
- mfrmpy-0.1.0/mfrm_app/citation.py +62 -0
- mfrmpy-0.1.0/mfrm_app/cli.py +115 -0
- mfrmpy-0.1.0/mfrm_app/cmle.py +1732 -0
- mfrmpy-0.1.0/mfrm_app/cmle_existence.py +1360 -0
- mfrmpy-0.1.0/mfrm_app/cmle_one_click.py +524 -0
- mfrmpy-0.1.0/mfrm_app/cmle_one_click_archive.py +662 -0
- mfrmpy-0.1.0/mfrm_app/cmle_one_click_cognitive_interview.py +600 -0
- mfrmpy-0.1.0/mfrm_app/cmle_one_click_comprehension.py +603 -0
- mfrmpy-0.1.0/mfrm_app/cmle_one_click_confirmatory_dependence.py +535 -0
- mfrmpy-0.1.0/mfrm_app/cmle_one_click_confirmatory_estimand.py +339 -0
- mfrmpy-0.1.0/mfrm_app/cmle_one_click_confirmatory_gate.py +668 -0
- mfrmpy-0.1.0/mfrm_app/cmle_one_click_confirmatory_invalidity.py +274 -0
- mfrmpy-0.1.0/mfrm_app/cmle_one_click_confirmatory_planning.py +430 -0
- mfrmpy-0.1.0/mfrm_app/cmle_one_click_confirmatory_protocol.py +885 -0
- mfrmpy-0.1.0/mfrm_app/cmle_one_click_confirmatory_workbench.py +485 -0
- mfrmpy-0.1.0/mfrm_app/cmle_person_scoring.py +129 -0
- mfrmpy-0.1.0/mfrm_app/cmle_wle_bootstrap.py +597 -0
- mfrmpy-0.1.0/mfrm_app/cmle_wle_fit.py +395 -0
- mfrmpy-0.1.0/mfrm_app/cmle_wle_uncertainty.py +291 -0
- mfrmpy-0.1.0/mfrm_app/cmle_workflow.py +602 -0
- mfrmpy-0.1.0/mfrm_app/decision_stability.py +380 -0
- mfrmpy-0.1.0/mfrm_app/design_assignment.py +600 -0
- mfrmpy-0.1.0/mfrm_app/desktop_analysis.py +872 -0
- mfrmpy-0.1.0/mfrm_app/desktop_examples.py +366 -0
- mfrmpy-0.1.0/mfrm_app/desktop_guidance.py +201 -0
- mfrmpy-0.1.0/mfrm_app/desktop_i18n.py +228 -0
- mfrmpy-0.1.0/mfrm_app/desktop_outputs.py +300 -0
- mfrmpy-0.1.0/mfrm_app/distribution.py +142 -0
- mfrmpy-0.1.0/mfrm_app/engine.py +9138 -0
- mfrmpy-0.1.0/mfrm_app/evidence.py +2602 -0
- mfrmpy-0.1.0/mfrm_app/exports.py +168 -0
- mfrmpy-0.1.0/mfrm_app/figure_presentation.py +73 -0
- mfrmpy-0.1.0/mfrm_app/fit_threshold_operating_characteristics.py +564 -0
- mfrmpy-0.1.0/mfrm_app/fit_threshold_pilot_addendum.py +271 -0
- mfrmpy-0.1.0/mfrm_app/fit_threshold_sensitivity.py +309 -0
- mfrmpy-0.1.0/mfrm_app/fit_threshold_severity.py +138 -0
- mfrmpy-0.1.0/mfrm_app/frame_bundle.py +74 -0
- mfrmpy-0.1.0/mfrm_app/generalizability.py +1106 -0
- mfrmpy-0.1.0/mfrm_app/guidance.py +622 -0
- mfrmpy-0.1.0/mfrm_app/help_contract.py +811 -0
- mfrmpy-0.1.0/mfrm_app/help_navigation.py +674 -0
- mfrmpy-0.1.0/mfrm_app/help_popovers.py +162 -0
- mfrmpy-0.1.0/mfrm_app/help_topics.py +992 -0
- mfrmpy-0.1.0/mfrm_app/ic_sensitivity.py +214 -0
- mfrmpy-0.1.0/mfrm_app/io_tables.py +335 -0
- mfrmpy-0.1.0/mfrm_app/jmle_boundary.py +54 -0
- mfrmpy-0.1.0/mfrm_app/joint_interaction.py +230 -0
- mfrmpy-0.1.0/mfrm_app/manuscript.py +226 -0
- mfrmpy-0.1.0/mfrm_app/mml_comparison_report.py +149 -0
- mfrmpy-0.1.0/mfrm_app/mml_engine_v2.py +677 -0
- mfrmpy-0.1.0/mfrm_app/mml_fixed_sd_review.py +230 -0
- mfrmpy-0.1.0/mfrm_app/mml_joint.py +311 -0
- mfrmpy-0.1.0/mfrm_app/mml_prior_sensitivity.py +404 -0
- mfrmpy-0.1.0/mfrm_app/mml_quadrature_sensitivity.py +315 -0
- mfrmpy-0.1.0/mfrm_app/mml_qualification_batch.py +849 -0
- mfrmpy-0.1.0/mfrm_app/mml_stationarity.py +593 -0
- mfrmpy-0.1.0/mfrm_app/operating_characteristics.py +837 -0
- mfrmpy-0.1.0/mfrm_app/output_qualification.py +341 -0
- mfrmpy-0.1.0/mfrm_app/person_scoring.py +428 -0
- mfrmpy-0.1.0/mfrm_app/preflight.py +185 -0
- mfrmpy-0.1.0/mfrm_app/privacy.py +135 -0
- mfrmpy-0.1.0/mfrm_app/project.py +507 -0
- mfrmpy-0.1.0/mfrm_app/project_portability.py +417 -0
- mfrmpy-0.1.0/mfrm_app/readiness.py +161 -0
- mfrmpy-0.1.0/mfrm_app/reliability.py +122 -0
- mfrmpy-0.1.0/mfrm_app/report_markup.py +66 -0
- mfrmpy-0.1.0/mfrm_app/reporting_facts.py +305 -0
- mfrmpy-0.1.0/mfrm_app/simulation/__init__.py +381 -0
- mfrmpy-0.1.0/mfrm_app/simulation/_condition_estimator.py +263 -0
- mfrmpy-0.1.0/mfrm_app/simulation/_condition_evaluation.py +344 -0
- mfrmpy-0.1.0/mfrm_app/simulation/_condition_randomization.py +313 -0
- mfrmpy-0.1.0/mfrm_app/simulation/_condition_scenario.py +142 -0
- mfrmpy-0.1.0/mfrm_app/simulation/_condition_shared.py +177 -0
- mfrmpy-0.1.0/mfrm_app/simulation/_condition_truth.py +386 -0
- mfrmpy-0.1.0/mfrm_app/simulation/assignments.py +933 -0
- mfrmpy-0.1.0/mfrm_app/simulation/conditions.py +210 -0
- mfrmpy-0.1.0/mfrm_app/simulation/cost.py +467 -0
- mfrmpy-0.1.0/mfrm_app/simulation/planning.py +727 -0
- mfrmpy-0.1.0/mfrm_app/simulation/schema.py +344 -0
- mfrmpy-0.1.0/mfrm_app/simulation/topology.py +1480 -0
- mfrmpy-0.1.0/mfrm_app/simulation/transition.py +783 -0
- mfrmpy-0.1.0/mfrm_app/structural_intervals.py +204 -0
- mfrmpy-0.1.0/mfrm_app/terminology.py +922 -0
- mfrmpy-0.1.0/mfrm_app/user_problems.py +727 -0
- mfrmpy-0.1.0/mfrm_app/ux.py +259 -0
- mfrmpy-0.1.0/mfrm_app/visual_maps.py +300 -0
- mfrmpy-0.1.0/mfrmpy/__init__.py +66 -0
- mfrmpy-0.1.0/pyproject.toml +51 -0
- mfrmpy-0.1.0/tests/test_python_library.py +191 -0
mfrmpy-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*$py.class
|
|
4
|
+
.Python
|
|
5
|
+
.venv/
|
|
6
|
+
.venv-win/
|
|
7
|
+
venv/
|
|
8
|
+
env/
|
|
9
|
+
.pytest_cache/
|
|
10
|
+
.playwright-cli/
|
|
11
|
+
.mypy_cache/
|
|
12
|
+
.ruff_cache/
|
|
13
|
+
/dist/
|
|
14
|
+
/build/
|
|
15
|
+
/*.egg-info/
|
|
16
|
+
.DS_Store
|
|
17
|
+
.streamlit/secrets.toml
|
|
18
|
+
benchmark_*.csv
|
|
19
|
+
*_benchmark.csv
|
|
20
|
+
parity_fixture/
|
|
21
|
+
validation/generated/
|
|
22
|
+
*.log
|
|
23
|
+
backups/
|
|
24
|
+
|
|
25
|
+
# Local source archives for retained research evidence
|
|
26
|
+
/validation/source_snapshots/
|
mfrmpy-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ryuya-dot-com
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# License and Responsible Use Notice
|
|
2
|
+
|
|
3
|
+
This repository is released under the MIT License unless a file explicitly
|
|
4
|
+
states otherwise. The MIT License permits commercial and non-commercial use,
|
|
5
|
+
copying, modification, distribution, sublicensing, and sale, provided that the
|
|
6
|
+
copyright notice and license notice are included in substantial copies of the
|
|
7
|
+
software or associated documentation.
|
|
8
|
+
|
|
9
|
+
The project intentionally does not use a NonCommercial license such as
|
|
10
|
+
CC BY-NC, because that would conflict with the intended permission for
|
|
11
|
+
commercial use, including paid teaching, consulting, training, and hosted
|
|
12
|
+
demonstrations.
|
|
13
|
+
|
|
14
|
+
The software and documentation are provided "as is", without warranty of any
|
|
15
|
+
kind. Users are responsible for checking data privacy, model assumptions,
|
|
16
|
+
statistical suitability, external validation evidence, and institutional
|
|
17
|
+
requirements before using outputs for reports, assessment decisions, placement,
|
|
18
|
+
certification, employment, or other high-stakes purposes.
|
|
19
|
+
|
|
20
|
+
Do not imply that the project authors, external package authors, or referenced
|
|
21
|
+
software projects endorse your analysis, deployment, product, service, or
|
|
22
|
+
publication unless you have separate written permission.
|
|
23
|
+
|
|
24
|
+
## 日本語の案内
|
|
25
|
+
|
|
26
|
+
このアプリはMITライセンスで提供し、研究・教育・業務・商用での利用を許可します。
|
|
27
|
+
データの取扱い、分析の適用判断、結果の解釈・利用、およびそれに基づく判断は利用者の責任です。
|
|
28
|
+
アプリと文書は無保証で提供されます。再配布時は著作権表示とライセンス表示を保持してください。
|
|
29
|
+
第三者の構成要素にはそれぞれのライセンスが適用されます。
|
|
30
|
+
MITライセンスの全文は[LICENSE](LICENSE)を参照してください。
|
mfrmpy-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: mfrmpy
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Many-facet Rasch analysis and balanced generalizability studies
|
|
5
|
+
Project-URL: Homepage, https://github.com/Ryuya-dot-com/MFRM_Python_Application
|
|
6
|
+
Project-URL: Documentation, https://github.com/Ryuya-dot-com/MFRM_Python_Application/blob/main/docs/python_library.md
|
|
7
|
+
Project-URL: Issues, https://github.com/Ryuya-dot-com/MFRM_Python_Application/issues
|
|
8
|
+
Author: Ryuya Komuro
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
License-File: LICENSE_NOTICE.md
|
|
12
|
+
Keywords: MFRM,Rasch,generalizability,psychometrics,rating
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Requires-Dist: numpy>=1.26
|
|
21
|
+
Requires-Dist: pandas>=3.0
|
|
22
|
+
Requires-Dist: pyarrow>=16.0
|
|
23
|
+
Requires-Dist: scipy>=1.10
|
|
24
|
+
Provides-Extra: figures
|
|
25
|
+
Requires-Dist: matplotlib>=3.8; extra == 'figures'
|
|
26
|
+
Provides-Extra: test
|
|
27
|
+
Requires-Dist: pytest>=8; extra == 'test'
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# mfrmpy: Many-facet Rasch analysis in Python
|
|
31
|
+
|
|
32
|
+
`mfrmpy` brings the supported MFRM Desktop calculations to Python scripts and
|
|
33
|
+
notebooks. It uses the same Python engine as the existing MFRM Web and desktop
|
|
34
|
+
applications. It does not require R, FACETS, Streamlit or Tkinter for analysis.
|
|
35
|
+
|
|
36
|
+
Version **0.1.0 is the first stable library release**. Available analyses are RSM/PCM with JMLE
|
|
37
|
+
or fixed-population-SD MML, diagnostics, conditional bias, selected structural
|
|
38
|
+
intervals, a separate joint-interaction model, and balanced observed-score G/D
|
|
39
|
+
studies. Numerical eligibility checks and interpretation limits remain in
|
|
40
|
+
force. Availability on PyPI is not statistical validation or certification.
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
|
|
44
|
+
Install from PyPI:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
python -m pip install mfrmpy
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
For Matplotlib figures and offline HTML reports:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
python -m pip install 'mfrmpy[figures]'
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
To upgrade an earlier installation, including an alpha release:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
python -m pip install --upgrade mfrmpy
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Python 3.11 and 3.12 are the initial validation targets. Core dependencies are
|
|
63
|
+
NumPy >=1.26, pandas >=3.0, SciPy >=1.10 and PyArrow >=16.0. pandas 3 and
|
|
64
|
+
PyArrow preserve the string storage and missing-value types recorded in Web
|
|
65
|
+
and desktop `.mfrm` projects, including their content fingerprints. This
|
|
66
|
+
distribution provides a library, not the
|
|
67
|
+
standalone desktop executable or the Web app launcher. Those applications
|
|
68
|
+
remain available from the
|
|
69
|
+
[application repository](https://github.com/Ryuya-dot-com/MFRM_Python_Application).
|
|
70
|
+
|
|
71
|
+
## First analysis
|
|
72
|
+
|
|
73
|
+
Ratings must be in long form: one row per observed rating, with separate
|
|
74
|
+
person, facet and score columns. Specify the full intended integer rating
|
|
75
|
+
range, even when an endpoint is absent from the observations. Missing ratings
|
|
76
|
+
are not zero scores. The bundled example is synthetic.
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
import mfrmpy
|
|
80
|
+
|
|
81
|
+
data = mfrmpy.load_example()
|
|
82
|
+
analysis = mfrmpy.analyze(
|
|
83
|
+
data,
|
|
84
|
+
person_col="Person",
|
|
85
|
+
facet_cols=["Rater", "Task", "Criterion"],
|
|
86
|
+
score_col="Score",
|
|
87
|
+
rating_min=0,
|
|
88
|
+
rating_max=5,
|
|
89
|
+
model="RSM",
|
|
90
|
+
method="JMLE",
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
for title, frame, note in mfrmpy.tables(analysis):
|
|
94
|
+
print(title)
|
|
95
|
+
print(frame.head())
|
|
96
|
+
print(note)
|
|
97
|
+
|
|
98
|
+
mfrmpy.save_project("writing.mfrm", analysis)
|
|
99
|
+
restored = mfrmpy.load_project("writing.mfrm") # no refitting
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Use `pandas.read_csv("ratings.csv", dtype={"Person": str, "Rater": str})`
|
|
103
|
+
for your own data, adjusting the ID columns as needed. Explicit string types
|
|
104
|
+
preserve leading zeroes. The input/design audit remains part of the returned
|
|
105
|
+
analysis and tables; inspect it before interpreting estimates.
|
|
106
|
+
|
|
107
|
+
## Models and supplementary requests
|
|
108
|
+
|
|
109
|
+
`analyze` is the shared application service, not a second implementation of
|
|
110
|
+
the estimators. It returns a retained-analysis dictionary and does not display
|
|
111
|
+
an interface. Its MFRM settings are:
|
|
112
|
+
|
|
113
|
+
| Setting | Meaning / default |
|
|
114
|
+
|---|---|
|
|
115
|
+
| `person_col`, `facet_cols`, `score_col` | Required column names; `facet_cols` is a list |
|
|
116
|
+
| `rating_min`, `rating_max` | Required integer rubric endpoints, minimum < maximum |
|
|
117
|
+
| `model`, `method` | `"RSM"` / `"PCM"`; `"JMLE"` / `"MML"`; defaults RSM and JMLE |
|
|
118
|
+
| `step_facet` | Required for PCM; one selected facet with separate step structures |
|
|
119
|
+
| `maxit`, `reltol` | Maximum iterations (400) and stopping tolerance (1e-6) |
|
|
120
|
+
| `quad_points`, `population_prior_sd` | Fixed-SD MML quadrature count (15) and normal population SD (1.0) |
|
|
121
|
+
| `anchors`, `group_anchors` | Fixed-level / group-mean anchor records under the existing identification rules |
|
|
122
|
+
| `compute_pca` | Optional residual diagnostics; default `False` |
|
|
123
|
+
| `umean`, `uscale` | Reporting origin (0) and positive scale multiplier (1); canonical logits are retained |
|
|
124
|
+
| `progress` | Optional callback receiving phase names, not percentages |
|
|
125
|
+
|
|
126
|
+
Keep `keep_original=True`, `estimate_population_sd=False` and `mml_engine="EM"`.
|
|
127
|
+
Other choices, bounded GPCM and latent regression are outside this initial
|
|
128
|
+
public interface. A numerical termination flag alone is not evidence that
|
|
129
|
+
inference is valid; the returned output qualifications also matter.
|
|
130
|
+
|
|
131
|
+
Example requests, supplied **when fitting**, are:
|
|
132
|
+
|
|
133
|
+
```python
|
|
134
|
+
analysis = mfrmpy.analyze(
|
|
135
|
+
data,
|
|
136
|
+
person_col="Person",
|
|
137
|
+
facet_cols=["Rater", "Task", "Criterion"],
|
|
138
|
+
score_col="Score",
|
|
139
|
+
rating_min=0,
|
|
140
|
+
rating_max=5,
|
|
141
|
+
model="PCM",
|
|
142
|
+
step_facet="Criterion",
|
|
143
|
+
method="MML",
|
|
144
|
+
population_prior_sd=1.0,
|
|
145
|
+
bias_requests=[{"facet_a": "Rater", "facet_b": "Task"}],
|
|
146
|
+
interval_requests=[{"facet": "Rater", "difference": ["R1", "R2"], "level": 0.95}],
|
|
147
|
+
joint_settings={"facet_a": "Rater", "facet_b": "Task"},
|
|
148
|
+
)
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Replace the contrast labels with levels that actually occur in your data.
|
|
152
|
+
Conditional bias holds the main calibration fixed and does not establish
|
|
153
|
+
statistical significance or fairness. Joint interaction fits a **separate**
|
|
154
|
+
fixed-N(0,1), unit-weight model and retains its result separately. Selected
|
|
155
|
+
structural intervals require fixed-SD, unit-weight RSM/PCM and suitable
|
|
156
|
+
identification, termination, boundaries, information and quadrature checks.
|
|
157
|
+
They are pointwise asymptotic intervals, with no finite-sample coverage
|
|
158
|
+
guarantee. Holm adjustment of joint tests does not make intervals simultaneous.
|
|
159
|
+
|
|
160
|
+
Unavailable/failed interval or joint requests remain recorded with a reason;
|
|
161
|
+
they do not silently erase a completed baseline fit. For details, see the
|
|
162
|
+
[analysis scope](https://github.com/Ryuya-dot-com/MFRM_Python_Application/blob/main/docs/analysis_scope.md).
|
|
163
|
+
|
|
164
|
+
## G study and D study without an MFRM fit
|
|
165
|
+
|
|
166
|
+
These analyze observed scores in a complete, balanced design with one or two
|
|
167
|
+
random facets, at least two levels of each factor and one observation per cell.
|
|
168
|
+
The score need not be an integer for G/D analysis. For example:
|
|
169
|
+
|
|
170
|
+
```python
|
|
171
|
+
import pandas as pd
|
|
172
|
+
|
|
173
|
+
ratings = pd.DataFrame([
|
|
174
|
+
{"Person": str(p), "Rater": str(r), "Task": str(t),
|
|
175
|
+
"Score": 0.4*p + 0.3*r + 0.2*t + 0.1*((p+r+t) % 3)}
|
|
176
|
+
for p in range(8) for r in range(3) for t in range(2)
|
|
177
|
+
])
|
|
178
|
+
gd_analysis = mfrmpy.analyze(
|
|
179
|
+
ratings,
|
|
180
|
+
workflow="gd",
|
|
181
|
+
gd_settings={
|
|
182
|
+
"object_facet": "Person",
|
|
183
|
+
"random_facets": ["Rater", "Task"],
|
|
184
|
+
"score_col": "Score",
|
|
185
|
+
"target_population": "Comparable persons, raters and tasks",
|
|
186
|
+
"selected_plan": {"Rater": 4, "Task": 2},
|
|
187
|
+
},
|
|
188
|
+
)
|
|
189
|
+
for title, frame, note in mfrmpy.tables(gd_analysis):
|
|
190
|
+
print(title, frame, note, sep="\n")
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Unsupported designs return an unavailable result with a reason. G is for
|
|
194
|
+
relative decisions and Phi for absolute decisions. These are not MFRM person
|
|
195
|
+
reliability. G/Phi intervals and multivariate G-theory are unavailable. A fixed
|
|
196
|
+
conditioning facet can be specified through `gd_settings["fixed_condition"]`
|
|
197
|
+
under the existing desktop rules; it does not add another random facet.
|
|
198
|
+
|
|
199
|
+
## Results, plots and saved projects
|
|
200
|
+
|
|
201
|
+
The stable public surface is the names in `mfrmpy.__all__`. The bundled
|
|
202
|
+
`mfrm_app` modules are implementation details, including experimental methods
|
|
203
|
+
outside the supported scope. Do not rely on their private functions or treat
|
|
204
|
+
their presence as a supported public API.
|
|
205
|
+
|
|
206
|
+
| Function | Result |
|
|
207
|
+
|---|---|
|
|
208
|
+
| `analyze(data, **settings)` | Retained analysis dictionary, including inputs, settings, identities and qualification |
|
|
209
|
+
| `tables(analysis)` | List of `(title, pandas.DataFrame, note)` tuples, with current output restrictions applied |
|
|
210
|
+
| `load_example()` | A new DataFrame containing the bundled synthetic writing example |
|
|
211
|
+
| `save_project(path, analysis)` | Atomically write a validated `.mfrm` archive |
|
|
212
|
+
| `load_project(path)` | Validate and restore an archive without refitting; malformed archives raise `ProjectError` |
|
|
213
|
+
| `plot(analysis, kind="wright", **options)` | Matplotlib Figure; requires `figures` extra |
|
|
214
|
+
| `report_html(analysis, **options)` | Standalone HTML string; requires `figures` extra |
|
|
215
|
+
|
|
216
|
+
`analysis["result"]` and `analysis["diagnostics"]` retain raw MFRM output;
|
|
217
|
+
`analysis["gd_analysis"]` retains G/D results. The nested implementation
|
|
218
|
+
schema is internal; use `.mfrm` files to retain analyses across sessions rather
|
|
219
|
+
than serializing or modifying this dictionary yourself. For reporting, use `tables`, keeping
|
|
220
|
+
the notes and `Use`/`Reason` information. A blank interval or SE is unavailable,
|
|
221
|
+
not zero. General MML tables, person-score uncertainty and automatic equivalence
|
|
222
|
+
claims retain their existing inferential restrictions.
|
|
223
|
+
|
|
224
|
+
With the optional figures dependency installed:
|
|
225
|
+
|
|
226
|
+
```python
|
|
227
|
+
from pathlib import Path
|
|
228
|
+
|
|
229
|
+
step_facet = analysis["fit_settings"].get("step_facet")
|
|
230
|
+
level = str(data[step_facet].iloc[0]) if step_facet else None
|
|
231
|
+
figure = mfrmpy.plot(analysis, "wright", level=level)
|
|
232
|
+
figure.savefig("wright.png", dpi=300)
|
|
233
|
+
Path("report.html").write_text(mfrmpy.report_html(analysis), encoding="utf-8")
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Other figure kinds include `"pathway"`, `"category"`, `"bias"`, `"interval"`,
|
|
237
|
+
`"joint"`, `"gd"` and `"pca"` when the required results are present. PCM Wright
|
|
238
|
+
maps and category curves require `level` (a step-facet level); supplementary requests use their
|
|
239
|
+
zero-based `index`. Retained results are reused; plotting and reopening must
|
|
240
|
+
not recompute estimation. Unsupported requests can produce a reason-bearing
|
|
241
|
+
figure rather than a numerical result.
|
|
242
|
+
|
|
243
|
+
Saved `.mfrm` projects use the existing desktop/Web archive format. New source
|
|
244
|
+
or dependency versions can cause current qualification checks to withhold old
|
|
245
|
+
interval output without altering the archived estimates. Record
|
|
246
|
+
`mfrmpy.__version__` and `analysis["source"]` when reporting an analysis.
|
|
247
|
+
The package API version and the shared engine version are distinct.
|
|
248
|
+
|
|
249
|
+
## API and compatibility policy
|
|
250
|
+
|
|
251
|
+
The supported API is the exported functions documented above, `ProjectError`
|
|
252
|
+
and `__version__`. `analyze` accepts the settings and workflows documented in
|
|
253
|
+
this guide. `ProjectError` is a `ValueError` subclass for invalid/unsupported
|
|
254
|
+
project contents; filesystem errors such as a missing file remain normal
|
|
255
|
+
Python I/O errors.
|
|
256
|
+
|
|
257
|
+
Within **0.1.x**, patch releases preserve these public names, documented
|
|
258
|
+
arguments and return types. Additive options and bug fixes are allowed. Before
|
|
259
|
+
1.0, an incompatible public API change requires a new minor release, such as
|
|
260
|
+
0.2.0, with migration instructions in the changelog. Private `mfrm_app` helpers,
|
|
261
|
+
nested raw-result fields, table display order and exact wording are outside
|
|
262
|
+
this compatibility promise. Keep interpretation notes with exported results.
|
|
263
|
+
|
|
264
|
+
Version 0.1.0 reads the supported schema-1 RSM/JMLE and schema-2 `.mfrm` archives,
|
|
265
|
+
including those written by 0.1.0a2 and the corresponding Web/desktop workflows.
|
|
266
|
+
The 0.1.x series will retain read compatibility with these supported archives;
|
|
267
|
+
malformed or unsupported records are rejected without refitting. Future archive
|
|
268
|
+
changes will be documented, and older applications may not read newer formats.
|
|
269
|
+
|
|
270
|
+
Numerical bug fixes or updated qualification rules can change reported results
|
|
271
|
+
or withhold an output; such changes belong in the changelog. For reproducible
|
|
272
|
+
research, retain the original `.mfrm` file and record the package, source and
|
|
273
|
+
dependency versions. The first stable release uses the same calculation and
|
|
274
|
+
archive code as 0.1.0a2, with the same analysis scope and interpretation limits.
|
|
275
|
+
|
|
276
|
+
## Privacy, license and citation
|
|
277
|
+
|
|
278
|
+
Calculations run locally. Saved projects and exported reports can retain
|
|
279
|
+
ratings and person/rater IDs; store and share them according to your research
|
|
280
|
+
requirements. Use synthetic data for bug reports.
|
|
281
|
+
|
|
282
|
+
MIT licensed; see
|
|
283
|
+
[LICENSE](https://github.com/Ryuya-dot-com/MFRM_Python_Application/blob/main/LICENSE)
|
|
284
|
+
and the
|
|
285
|
+
[responsible-use notice](https://github.com/Ryuya-dot-com/MFRM_Python_Application/blob/main/LICENSE_NOTICE.md).
|
|
286
|
+
Cite Ryuya Komuro, *mfrmpy*, the installed package version, and
|
|
287
|
+
https://github.com/Ryuya-dot-com/MFRM_Python_Application, together with the
|
|
288
|
+
statistical methods actually used. Source and issue reporting are maintained
|
|
289
|
+
in that repository.
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Analyses, interpretation and reporting limits
|
|
2
|
+
|
|
3
|
+
[Start here](../README.md) · [Windows guide](desktop_user_guide.en.md) · [日本語の操作・結果の読み方](desktop_user_guide.ja.md#分析を選ぶ)
|
|
4
|
+
|
|
5
|
+
Use this page to choose an analysis and understand what its results can support.
|
|
6
|
+
It describes the Web application and the desktop preview documented in this
|
|
7
|
+
source branch. The desktop preview includes RSM/PCM, bias diagnostics, selected
|
|
8
|
+
intervals, joint interactions and G/D studies; it is not yet a general desktop
|
|
9
|
+
release. The published Web release and this desktop preview do not have
|
|
10
|
+
identical controls or export formats.
|
|
11
|
+
|
|
12
|
+
## Choose the analysis for your question
|
|
13
|
+
|
|
14
|
+
| Question | Analysis | What to distinguish |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| How do person measures, rater severity and task difficulty compare? | Many-facet RSM or PCM | RSM shares category steps. PCM allows separate steps for levels of the chosen step facet. A main rater effect is not a rater-by-task interaction. |
|
|
17
|
+
| Does a particular combination of facet levels differ from the main-effects pattern? | Conditional bias diagnostics | These hold the original calibration fixed. They identify patterns to investigate, without confirming the presence or absence of bias. |
|
|
18
|
+
| What is the uncertainty in a facet level or a planned difference? | Specified structural intervals for fixed-SD MML | Only targets passing the checks receive intervals. A difference uses the full covariance, not the sum of marginal SEs. |
|
|
19
|
+
| What happens when an interaction is fitted together with main effects and steps? | Desktop joint interaction analysis | This refits a separate model. It does not turn the fixed-calibration diagnostic into a joint test. |
|
|
20
|
+
| How would numbers of raters or tasks affect score reliability? | G study and D study | These use observed scores and a declared random-facet design, not the MFRM logit scale. |
|
|
21
|
+
|
|
22
|
+
The Web interface also provides advanced workflows such as bounded GPCM,
|
|
23
|
+
latent regression, anchors and linking review, residual PCA, prediction and
|
|
24
|
+
simulation. Their availability does not establish that every displayed
|
|
25
|
+
statistic can support inference. Read the explanation for the selected output.
|
|
26
|
+
|
|
27
|
+
## Estimation and standard errors
|
|
28
|
+
|
|
29
|
+
JMLE jointly estimates person and facet parameters. Desktop MML uses EM with
|
|
30
|
+
a fixed normal population SD; the SD is a setting, not an estimated result.
|
|
31
|
+
The Web interface offers additional MML controls, including optional population
|
|
32
|
+
SD estimation, whose uncertainty and model-ranking uses remain unavailable.
|
|
33
|
+
|
|
34
|
+
A standard error must be interpreted for its stated target and method.
|
|
35
|
+
Conditional-information errors hold other parameters fixed. Structural
|
|
36
|
+
observed-information errors use a covariance calculation for the model
|
|
37
|
+
parameters. An MML person's EAP posterior SD describes a posterior distribution
|
|
38
|
+
with calibration fixed; it is not the ML standard error of a structural effect.
|
|
39
|
+
Do not treat these quantities as interchangeable because each is labelled SE.
|
|
40
|
+
|
|
41
|
+
The application does not support inferential use of general MML tables,
|
|
42
|
+
Person-score uncertainty, estimated population-SD uncertainty or automatic
|
|
43
|
+
equivalence conclusions. Selected structural intervals have the separate,
|
|
44
|
+
limited scope below. An available selected interval does not remove the
|
|
45
|
+
restrictions on other outputs.
|
|
46
|
+
|
|
47
|
+
## Specified structural intervals
|
|
48
|
+
|
|
49
|
+
For supported unit-weight, fixed-SD RSM/PCM analyses, this output provides
|
|
50
|
+
pointwise asymptotic normal intervals for selected levels of a non-person
|
|
51
|
+
facet and a prespecified difference. It uses the full structural covariance.
|
|
52
|
+
|
|
53
|
+
The calculation checks termination, identification, parameter boundaries,
|
|
54
|
+
observed information and sensitivity to quadrature settings. These checks
|
|
55
|
+
assess numerical suitability. They do not prove that the response model fits
|
|
56
|
+
the population, give a strict quadrature error bound, or guarantee
|
|
57
|
+
finite-sample coverage.
|
|
58
|
+
|
|
59
|
+
The approximation assumes the specified response model and fixed normal
|
|
60
|
+
population, independent persons, ignorable assignment/missingness, an
|
|
61
|
+
identified interior parameter and growing information. It does not provide
|
|
62
|
+
simultaneous intervals, Person-score intervals or a test of equivalence.
|
|
63
|
+
|
|
64
|
+
The [English](fixed_sd_quadrature_check.en.md) and
|
|
65
|
+
[Japanese](fixed_sd_quadrature_check.ja.md) Web guides explain selecting,
|
|
66
|
+
saving and rechecking these intervals. In Desktop, register the requests in
|
|
67
|
+
**Settings → Bias / intervals** before running the analysis.
|
|
68
|
+
|
|
69
|
+
## Bias diagnostics and joint interactions
|
|
70
|
+
|
|
71
|
+
Conditional bias diagnostics describe cells with the original calibration
|
|
72
|
+
held fixed. Sparse cells, extreme scores and disconnected rating designs can
|
|
73
|
+
limit what can be estimated or compared. Displayed diagnostic values do not
|
|
74
|
+
establish statistical significance, absence of bias or assessment fairness.
|
|
75
|
+
|
|
76
|
+
The desktop joint-interaction option fits main effects, steps and one selected
|
|
77
|
+
structural-facet interaction together in a separate RSM/PCM model. It uses
|
|
78
|
+
unit weights and a normal person population fixed at mean 0 and SD 1.
|
|
79
|
+
Eligible requested cells and prespecified contrasts receive pointwise
|
|
80
|
+
approximate Wald intervals and p values. Holm adjustment applies to the
|
|
81
|
+
recorded family of requested tests; it does not make the intervals simultaneous.
|
|
82
|
+
|
|
83
|
+
This model assumes independent persons, the stated response/population model,
|
|
84
|
+
ignorable assignment/missingness and an identified interior solution with
|
|
85
|
+
growing information. Numerical checks are not a finite-sample error-rate
|
|
86
|
+
guarantee. An interaction is evidence about the fitted model, not a verdict
|
|
87
|
+
about fairness or a person. The original main-effects results remain separate.
|
|
88
|
+
|
|
89
|
+
## G studies and D studies
|
|
90
|
+
|
|
91
|
+
The supported design is completely crossed and balanced, with one or two
|
|
92
|
+
random facets besides the object of measurement, at least two levels of each
|
|
93
|
+
factor, one observation per cell and unit observation weights. Missing or
|
|
94
|
+
repeated cells and unsupported designs produce a reason rather than an
|
|
95
|
+
unsupported coefficient.
|
|
96
|
+
|
|
97
|
+
G describes relative decisions and Phi describes absolute decisions. The D
|
|
98
|
+
study changes planned numbers of observations under the stated design and
|
|
99
|
+
population assumptions. Negative estimated variance components are shown
|
|
100
|
+
alongside the zero-clipped components used for the coefficients. A coefficient
|
|
101
|
+
alone does not establish an acceptable assessment or validate a future design.
|
|
102
|
+
|
|
103
|
+
The desktop G/D entry uses the original observed scores without requiring an
|
|
104
|
+
MFRM fit. Multivariate G-theory and uncertainty intervals for G/Phi are not
|
|
105
|
+
implemented. These restrictions also apply when G/D is requested alongside MFRM.
|
|
106
|
+
|
|
107
|
+
## When a result cannot support inference
|
|
108
|
+
|
|
109
|
+
Read the message for the particular table or figure.
|
|
110
|
+
|
|
111
|
+
- **Input or design problem:** correct the indicated column mapping, score
|
|
112
|
+
range, missingness or design problem. For example, unrelated rating groups
|
|
113
|
+
may lack a common scale. Keep the original data and document any change.
|
|
114
|
+
- **Numerical or boundary problem:** review the stopping reason, identification
|
|
115
|
+
and extreme scores. A finite displayed estimate or an optimizer stopping
|
|
116
|
+
flag does not establish valid inference.
|
|
117
|
+
- **Unsupported uncertainty method or use:** the application has not
|
|
118
|
+
established that use for this output. Repeatedly changing the data or
|
|
119
|
+
rerunning the same settings does not resolve that limitation.
|
|
120
|
+
- **Changed settings or a saved result from another implementation:** check
|
|
121
|
+
which analysis the displayed output belongs to. Reopened results retain the
|
|
122
|
+
saved values but are checked against current output-specific rules.
|
|
123
|
+
|
|
124
|
+
A blank SE or interval means it is unavailable, not zero. Do not infer equality,
|
|
125
|
+
absence of bias or a reliable ranking from missing uncertainty or a
|
|
126
|
+
non-significant result. Use an eligible dedicated output only within its
|
|
127
|
+
stated scope.
|
|
128
|
+
|
|
129
|
+
## Comparing programs and reporting results
|
|
130
|
+
|
|
131
|
+
Match the model, data, weights, constraints, population distribution, scoring
|
|
132
|
+
method and numerical settings before comparing software.
|
|
133
|
+
|
|
134
|
+
In particular, this application's non-person PTMEA/PtMeaCorr correlates
|
|
135
|
+
observed scores with person measures. FACETS PtMea uses the signed sum of
|
|
136
|
+
measures for each observation. They are different diagnostics. The application's
|
|
137
|
+
RSM/PCM fit ZSTD follows a FACETS-style fourth-moment/Wilson–Hilferty convention
|
|
138
|
+
with an absolute cap of 9; the GPCM adaptation is approximate. Agreement in one
|
|
139
|
+
diagnostic does not establish equivalence of the programs.
|
|
140
|
+
|
|
141
|
+
AIC/AICc/BIC, model-choice LR values and automatic model recommendations remain
|
|
142
|
+
restricted to technical review. Residual PCA is a diagnostic requiring attention
|
|
143
|
+
to sparse observations, overlap and stability, not an automatic dimensionality
|
|
144
|
+
decision. Simulations describe their specified data-generating conditions;
|
|
145
|
+
they do not validate a different empirical design.
|
|
146
|
+
|
|
147
|
+
When reporting, retain the model, estimator, constraints, scoring rubric,
|
|
148
|
+
population-SD treatment, analysis version, uncertainty method and relevant
|
|
149
|
+
limitations. Preserve captions and notes with exported figures and tables.
|
|
150
|
+
Software citation does not replace citations for the statistical methods.
|
|
151
|
+
|
|
152
|
+
Implementation references for technical readers:
|
|
153
|
+
[output rules](../mfrm_app/output_qualification.py),
|
|
154
|
+
[structural intervals](../mfrm_app/structural_intervals.py),
|
|
155
|
+
[joint interactions](../mfrm_app/joint_interaction.py),
|
|
156
|
+
[G/D calculations](../mfrm_app/generalizability.py).
|
|
157
|
+
The [FACETS comparison](../validation/FACETS_WINDOWS_DESKTOP_REVIEW_20261029.md)
|
|
158
|
+
states the conditions and limits of its numerical checks.
|