mariposa 0.7.3

CRAN resubmission (theme: make the print/cat console contract lexically visible — the 2026-09 second-round remark on R/kendall_tau.R).

CRAN

mariposa 0.7.2

CRAN resubmission (theme: address all four points of the 2026-09 manual review).

CRAN

Bug fixes

Making the former \dontrun{} examples actually run uncovered two real crashes on integer columns (tagged NAs are NaN payloads in doubles; haven::na_tag() errors on integer input):

mariposa 0.7.1

CRAN resubmission (theme: address the incoming-pretest NOTE) plus two small robustness patches.

CRAN

Improvements

mariposa 0.7.0

Assumption checks and model interpretation (feature set: three new functions closing the most common SPSS/Stata gaps for survey researchers).

New features

All four ship with the full three-layer print/summary output.

Bug fixes

Validation

mariposa 0.6.17

Crosstab cell diagnostics (theme: after the chi-square test, show which cells drive the association).

New features

Validation

mariposa 0.6.16

CRAN readiness (theme: the package passes CRAN’s submission conventions, not just R CMD check). No statistical behavior changes.

CRAN conventions

Test infrastructure

mariposa 0.6.15

Regression correctness (theme: the two regression functions compute what they claim under weights and degenerate inputs, and say what they show).

Bug fixes

New features

Documentation

mariposa 0.6.14

Codebook robustness (theme: codebook() survives real-world data and says what it shows). A stress test of the codebook stack (metadata extraction, console print/summary, HTML builder, xlsx export) surfaced a batch of crashes, silent data errors, and display leaks; this release fixes all of them and adds a view argument for side-effect control.

Bug fixes

Improvements

New features

mariposa 0.6.13

McDonald’s omega (theme: reliability() learns a second reliability coefficient). reliability() now reports McDonald’s omega alongside Cronbach’s alpha — a new statistic within an existing function, hence a PATCH per the clarified versioning policy.

New features

Validation

mariposa 0.6.12

Weighted-rank correctness and accurate claims (theme: the weighted rank family says exactly what it is). Two formula errors in weighted rank statistics are fixed and a package-wide invariance suite now guards every weighted entry point; alongside, the user-facing claim surface (README, DESCRIPTION, help pages, compatibility vignette) is realigned with what the validation suite actually covers.

Bug fixes

Accurate claims

Validation

mariposa 0.6.11

Deprecation cleanup (theme: the due bridges come out). Two batches of deprecations reached their removal release together: the 0.6.9 argument bridges (originally slated for 0.6.10) and the 0.6.10 duplicate result columns. Removing both here keeps the run-up to the 1.0 API freeze tidy.

Breaking changes

mariposa 0.6.10

Result-column harmonization (theme: one statistic, one column name). A style audit found the same statistic carrying different result-column names across sibling functions; the drifted names now converge on the canonical spelling, with the old columns kept as duplicates for one release.

Improvements

Deprecations

mariposa 0.6.9

API-cleanup completion (theme: the 0.6.8 bridges come out, the last dot-case stragglers get theirs). One step closer to the 1.0 API freeze.

Breaking changes

Deprecations

mariposa 0.6.8

API-unification release (theme: snake_case arguments). One release-long deprecation bridge per the versioning policy - old names keep working and warn once per session; they will be removed in 0.6.9.

Breaking changes (with bridge)

Breaking changes (no bridge)

Improvements

mariposa 0.6.7

Output-layer release (theme: uniform three-layer output). Statistical results are unchanged; what changed is how results present themselves.

Uniform three-layer output (visible change)

Every analysis class now follows the documented pattern that t_test and chi_square pioneered: result prints a compact overview (headline statistic, p-value, significance stars, one line per test), and summary(result) carries the full detailed output behind boolean section toggles. Newly migrated: kruskal_wallis, wilcoxon_test, friedman_test, binomial_test, fisher_test, chisq_gof, mcnemar_test, levene_test, tukey_test, scheffe_test, dunn_test, pairwise_wilcoxon, frequency, crosstab (describe was already compact and gained the summary layer for uniformity). Nothing was removed - everything the old print() showed is in summary(), verified line-by-line.

Internal architecture

mariposa 0.6.6

Internal-architecture release (theme: shared cores and formatting utilities). No statistical results change; table rendering in the Tukey/Scheffe output is now aligned and uses SPSS-style p display.

mariposa 0.6.5

Housekeeping release (theme: package hygiene). No statistical results change.

mariposa 0.6.4

A quality release. Following an in-depth internal review of the entire statistical codebase, this version sharpens the accuracy of several statistics, makes the package behave more consistently across functions, and adds a dedicated regression-test suite (tests/testthat/test-audit-regressions.R) so these guarantees hold in future releases. Some outputs change slightly as a result - in every case toward the standard reference implementations.

More accurate statistics

New and refined API

More consistent behavior

More robust in edge cases

Housekeeping

mariposa 0.6.3.2

rec() reliably matches decimal single values

Single-value recode rules now match decimal codes (e.g. "3.6=2") even when the stored value carries floating-point representation error. The single-value comparison was changed from exact numeric equality (x == value) to a string comparison (as.character(x) == as.character(value)), which rounds to 15 significant digits and thereby absorbs the error.

Reason: a value such as 0.1 + 0.2 is stored as 0.30000000000000004, so the previous exact == test silently failed to match a rule "0.3=...". This mirrors the behaviour of sjmisc::rec(), on which rec()’s string syntax is modelled. Range rules were already robust (they use >=/<=) and are unchanged.

mariposa 0.6.3.1

broom tidiers now work natively

Adds explicit tidy(), glance(), and augment() methods for both linear_regression and logistic_regression results, registered via the standard s3_register() pattern (broom in Suggests, no hard dep).

Reason: with class(r) = c("linear_regression", "lm"), broom::tidy.lm() and broom::glance.lm() dispatched as expected, but internally called summary(x) — which (because of our specialised summary.linear_regression() overriding summary.lm) returned the mariposa SPSS-style summary instead of the lm summary broom needs. The visible failures:

The new methods strip our linear_regression / logistic_regression class before delegating to broom::tidy.lm / tidy.glm etc., so the inner summary() call dispatches to summary.lm / summary.glm and broom receives its expected shape. The user-facing summary(r) still returns mariposa’s SPSS-style output (more specific method wins).

Edge cases stay consistent with the rest of the lm-generic surface: broom::tidy() / glance() / augment() on a grouped or pairwise result raise an actionable error pointing at lapply(r$groups, ...) or use = "listwise".

New tests in test-broom-methods.R cover all three tidiers for both regression types, plus the grouped/pairwise error paths.

mariposa 0.6.3

Behavior Change — regression results inherit from lm / glm

linear_regression() and logistic_regression() results now ARE the fitted lm / glm object (with mariposa-specific tables attached as additional slots), instead of wrapping it in $model. All base-R and broom generics dispatch natively:

r <- linear_regression(survey_data, life_satisfaction ~ age + income)
coef(r)                                 # named numeric vector
predict(r, newdata = head(survey_data)) # works directly
anova(r)                                # sequential SS table
vcov(r); confint(r); residuals(r); fitted(r)
broom::tidy(r); broom::glance(r); broom::augment(r)

Class hierarchy is c("linear_regression", "lm") for linear and c("logistic_regression", "glm", "lm") for logistic. summary(r) still returns the SPSS-style mariposa summary (more specific method wins); for the raw lm/glm summary call stats::summary.lm(r) / stats::summary.glm(r).

Slot renames (breaking)

Two slots collided with lm/glm conventions and were renamed:

Before After
$coefficients (tibble) $coef_table (tibble)
$anova (tibble) $anova_table (tibble)
$model (lm/glm) the object IS the model — use r directly

Migration:

Edge cases

Test Suite

mariposa 0.6.2

Behavior Change

linear_regression() and logistic_regression(): factor predictor handling

Both regression functions now expose a factors argument controlling how factor predictors enter the model. The new default factors = "dummy" matches base R lm() / glm(): a factor with L levels expands into L - 1 dummy contrasts via stats::model.matrix(). Previous versions silently coerced factor levels to integer codes (SPSS ordinal-as-scale default) with no warning, which surprised users who relied on standard R semantics.

To restore the previous SPSS-style behavior, pass factors = "numeric" explicitly. That mode emits a one-line cli::cli_inform() listing the coerced variables for transparency. The “numeric” mode is required to reproduce SPSS REGRESSION / LOGISTIC REGRESSION output when factor predictors carry ordered meaning (e.g., a 4-level education variable treated as 1–4 ordinal scale).

Behavioral consequences:

Migration: scripts that depend on the old SPSS-style coercion should set factors = "numeric" at the call site. The cli_inform() message can be silenced with suppressMessages() if desired.

Source-Code Fixes (weighted regression)

Two more functions joined the Charter §5.1 audit list (the “unrounded sum(w)” weighted-statistics convention previously applied to t_test, oneway_anova, and levene_test):

These are bug fixes; weighted results may shift slightly toward closer agreement with SPSS v29.

Other Fixes

Test Suite

The linear_regression SPSS validation test suite expanded from 1 scenario (unweighted bivariate) to 6 scenarios covering all four Charter §8 quadrants — Tests 1a, 1c, 2a, 2c, 3a, and 4a from tests/spss_reference/outputs/linear_regression_output.txt. The weighted scenarios (2a, 2c, 4a) verify the Charter §5.1 fix above. New behavioral tests cover the factors argument (dummy expansion, numeric coercion, pairwise + dummy + factor error path). 222/222 assertions pass.

mariposa 0.6.1

Validation

Substantial hardening of the SPSS-compatibility test suite. All 29 SPSS- validation test files were rewritten under a new Validation Charter (see vignette("spss-compatibility")) that defines tolerance tiers (Spec / Display / Exception / Internal), forbids inline tolerance literals, NA placeholders, and expect_true(TRUE) reporting blocks, and requires citation comments linking every reference value to its source line in tests/spss_reference/outputs/.

Source-Code Fixes (weighted statistics)

Three weighted statistical functions were corrected to use unrounded sum(w) per SPSS frequency-weights convention. Earlier versions rounded too early and produced systematic drift from SPSS in weighted scenarios.

These changes are bug fixes and may slightly shift weighted-scenario results in user code. Differences are small (typically < 0.01 on F or t) and bring mariposa into closer agreement with SPSS v29.

SPSS-Compatibility Vignette

vignette("spss-compatibility") documents the per-function validation status, the four tolerance tiers, and the SPSS-procedure-specific WEIGHT BY conventions discovered during the migration:

DESCRIPTION

Audit-Driven Math Fixes (post-Phase-1)

A second audit pass identified additional math defects and test fudges, all corrected in this release:

Documentation Honesty

Several SPSS-compatibility claims were narrowed to reflect what the code actually does:

Code Smell Cleanup

mariposa 0.6.0

New Functions — Label Management

This release adds 10 label management functions for working with labelled survey data (inspired by sjlabelled, consolidated into a clean, consistent API), plus data transformation, row operations, and data exploration functions.

Variable & Value Labels

Type Conversions

Missing Value Management

New Functions — Data Transformation

New Functions — Row Operations

New Functions — Data Exploration

Breaking Changes

mariposa 0.5.6

New Functions

Enhancements

mariposa 0.5.5

New Functions

Enhancements

Dependencies

mariposa 0.5.4

New Functions

Breaking Changes

Improvements

mariposa 0.5.3

New Functions

Improvements

mariposa 0.5.2.2

Convenience

mariposa 0.5.2

New Features

Dependencies

mariposa 0.5.1

Three-Layer Output System

Internal Helpers

Documentation

Bug Fixes

Tests


mariposa 0.5.0

New Functions

SPSS Validation

Technical Details


mariposa 0.4.0

New Functions

SPSS Validation

Improvements


mariposa 0.3.1

Enhancements


mariposa 0.3.0

New Functions

SPSS Validation


mariposa 0.2.0

New Functions

Dependencies

Improvements


mariposa 0.1.0

Breaking Changes

Bug Fixes

Improvements

mirror server hosted at Truenetwork, Russian Federation.