This release brings many more results in line with IBM SPSS Statistics 29, makes every analysis result exportable, and improves output and error messages throughout the package. Some results and result objects change; see “Breaking changes”.
describe() reports N as the sum of the weights
and a weighted missing count, as SPSS FREQUENCIES and DESCRIPTIVES do;
Kish’s effective N remains available in $results.crosstab() rounds each weighted cell count
before margins and percentages are computed (SPSS
/COUNT ROUND CELL).binomial_test() uses the category of the first valid
case as Group 1 and, for a test proportion other than 0.5, reports the
one-tailed exact p-value (new column alternative).t_test(): mean_diff and its
confidence interval refer to the difference between the mean and
mu.tukey_test() and scheffe_test() report one
row per pair in the “(I) - (J)” orientation, with the new columns
SE and t_value; weighted analyses use the
error mean square and degrees of freedom of the weighted ANOVA.wilcoxon_test() and pairwise_wilcoxon()
compute Z from the smaller rank sum, so Z is never positive; the new
column z_based_on gives the direction. The weighted
two-sided mann_whitney() follows the same convention.chi_square() and phi(): Phi of a 2x2 table
carries the sign of the association; with correct = TRUE,
Phi and Cramér’s V are based on the Pearson chi-square; Goodman’s gamma
is reported for ordinal variables only.efa() uses the SPSS algorithms for varimax, oblimin and
promax rotation and reflects factors to positive loading sums.ancova() parameter estimates use indicator coding with
the last category as reference.rec(rules = "rev") reverses on the scale range defined
by the value labels instead of the observed range.w_*() functions return one long table
(Variable, the statistic, n or
weighted_n, effective_n,
missing).levene_test() results contain the grouping
variables as columns; the grouped method takes its variables through
....chi_square() no longer returns label_maps
(the tables carry the labels); dunn_test() and
pairwise_wilcoxon() also return their comparisons as
$results.std(), center(), pomps() and
to_numeric() return NA for SPSS missing
values; std() and center() no longer add the
weights column to the result.codebook() returns its result visibly.weight = or percent =
is an error that names the intended argument.group_by() data are excluded from
variable selections, with a message.to_label() on a data frame converts only fully labelled
variables.frequency() omits empty factor levels unless
show_unused = TRUE.row_count(count = c(4, 5)) counts cells equal to any of
the values.reliability() removes items without variance (with a
warning) and reports omega as NA for a Heywood
solution.as.data.frame()
and tibble::as_tibble() work for all result classes,
broom::tidy() for all tests and descriptive results, and
write_xlsx() writes analysis results (cross-tabulations in
the SPSS layout) as well as lists that combine results and data
frames.weights accepts a column name (unquoted or as a
string), all_of(), an expression such as
sampling_weight * 2, or a numeric vector, in every
function.codebook() embeds the HTML codebook in R Markdown and
Quarto documents.factorial_anova() and ancova() support
group_by(); ancova() reports the marginal
means of the main effects and has a levene_test()
method.describe() gains show = "min" and
show = "max".fisher_test() reports the odds ratio with its 95%
confidence interval for 2x2 tables and offers a Monte Carlo p-value for
large tables (arguments simulate.p.value and
B).efa() reports the extraction sums of squared loadings,
the sample size, descriptive statistics and the number of rotation
iterations; oblimin rotation no longer requires the GPArotation
package.logistic_regression() accepts any outcome with two
values (for example 1/2 codes, labelled, character or logical) and shows
the dependent variable encoding.confint(), profile(),
update() and step() work on regression
results; weighted linear_regression() methods use the same
degrees of freedom as summary().rec() accepts value lists ("1,2=1") and an
explicit scale range ("rev(1, 5)").var_label(x) <- "label" and
var_label(data) <- list(...) set variable labels.find_var(fixed = TRUE) searches for literal text;
na_frequencies(), strip_tags() and
untag_na() accept data frames.pairwise_wilcoxon() reports the number of cases of each
pair.chisq_gof(expected = ) applies to every selected
variable, matches named proportions by category and accepts counts, as
SPSS /EXPECTED does.ancova(); standard
errors, confidence intervals and significance of weighted
tukey_test() and scheffe_test(); weighted cell
standard deviations of factorial_anova() and
ancova(); the expected counts and residuals of
chisq_gof(); all rotations and the ML extraction of
efa().vignette("spss-compatibility").t_test()), Descriptives and
Robust Tests of Equality of Means (oneway_anova()), valid
and missing totals (frequency()), Item-Total Statistics
(reliability()), Total Variance Explained
(efa()).<.001, whole-number counts without thousands separators,
aligned columns for labels with non-ASCII characters.frequency(), crosstab() and
multiple_response() print their full tables.reliability() explains a negative Cronbach’s alpha and
names the items to check; efa() reports a singular
correlation matrix like SPSS.kendall_tau(), goodman_gamma(),
codebook(), untag_na(),
write_spss() and write_xlsx() are considerably
faster on large data.fisher_test(),
mcnemar_test(), binomial_test()) and
logistic_regression() work with very large (expansion)
weights.citation("mariposa") gives the DOI of the CRAN
package..A, .B, …, and
write_xpt() shortens over-long variable names itself (@hadley, #22).read_spss(), and labelled data
used without loading the haven package, work in all functions.marginal_effects() computes correct effects for
transformed predictors such as I(x^2) or
log(x).read_sas() works with its default arguments.read_spss() and write_spss() preserve SPSS
missing-value definitions; write_spss() and
write_stata() keep value labels created by
rec() and the original codes of to_label()
factors.to_label() and to_numeric() keep the
original codes and keep codes that share a label text apart.rec() keeps SPSS missing-value types and warns about
values that match no rule.write_xpt() warns about shortened variable names;
write_xlsx() creates unique sheet names.%>% is available after
library(mariposa).set_na(), read_spss() and
read_xlsx() keep more than 26 missing-value codes of a
variable apart with the upcoming haven release, which no longer
distinguishes upper- and lower-case tags.Maintenance release: internal changes for CRAN policy compliance; no user-visible changes.
Maintenance release: internal changes for CRAN policy compliance, plus the user-visible changes below.
ancova(), factorial_anova() and the
printing of correlation matrices restore changed options()
settings reliably, even when interrupted.unlabel() no longer fails on data frames with integer
columns, such as the Likert items in survey_data.write_xpt() no longer fails on integer columns.Maintenance release: internal changes for CRAN policy compliance, plus two small robustness improvements.
set_na() applied to a whole data frame reports clearly
that the haven package is required when it is not installed.Adds normality tests, partial correlations, multiple-response analysis and average marginal effects.
normality_test() produces the SPSS EXAMINE “Tests
of Normality”: Kolmogorov-Smirnov with Lilliefors significance
correction and Shapiro-Wilk (for 3 to 5,000 cases), computed as in SPSS.
It supports tidyselect and group_by(); it has no
weights argument because neither test has a well-defined
form for fractional frequency weights.partial_cor() computes partial correlations
controlling for one or more variables (SPSS PARTIAL CORR, Stata
pcorr), with zero-order correlations for comparison,
two-tailed tests, listwise deletion, weights, group_by()
support and a correlation matrix for three or more variables.marginal_effects() computes average marginal
effects for logistic_regression() models (Stata
margins, dydx(*)): average derivatives on the probability
scale for continuous predictors, average discrete changes relative to
the reference level for factors, and delta-method standard errors, with
weights and group_by() support. For
linear_regression() models it explains that B already is
the marginal effect.multiple_response() analyzes “check all that apply”
questions (SPSS MULT RESPONSE dichotomy sets): frequencies as percent of
responses and percent of cases, and with by = a crosstab
with case-based column percentages. It supports weights and
group_by().print() and a
detailed summary().normality_test(), partial_cor() and
multiple_response() are not yet compared with SPSS output;
SPSS has no procedure for average marginal effects.crosstab() computes expected cell counts and adjusted
standardized residuals (SPSS
CROSSTABS /CELLS=EXPECTED ASRESID).
summary(result, residuals = TRUE) shows them below each
cell, with a note on the |adjusted residual| > 2 rule of thumb; the
matrices are available as $expected and
$adj_residuals.chisq.test(); they are not yet compared with SPSS
output.Maintenance release: internal changes for CRAN policy compliance; statistical results are unchanged.
?mariposa opens the package help page.predict() and
anova() methods of both regression functions, and of the
print() method for w_quantile() results,
describe their return values.set_na() example runs, and the efa()
oblimin example runs only when the optional GPArotation package is
installed.Correctness improvements for the regression functions.
linear_regression() shows
confidence intervals for B (SPSS /STATISTICS CI) at the
level set by conf.level;
summary(..., conf_int = FALSE) hides them.factors = "dummy" explains that
ordered factors receive polynomial contrasts rather than dummy coding,
and how to obtain dummy coding.logistic_regression() has not yet been compared with SPSS
output.logistic_regression() computes the -2
log-likelihood, the omnibus chi-square and the Cox & Snell and
Nagelkerke R-squared correctly with fractional weights; unweighted and
integer-weighted results are unchanged.linear_regression(use = "pairwise") no longer silently
drops interactions and transformed terms; such formulas raise an error
that suggests use = "listwise".linear_regression() no longer fails on perfectly
collinear predictors: these are excluded from the coefficient table with
a message, as in SPSS, and the ANOVA degrees of freedom count only
estimated terms.logistic_regression() shows
the cutoff actually used instead of always 0.50.Robustness and display improvements for codebook().
view argument of codebook() (default
interactive()) controls whether the HTML codebook opens in
the RStudio Viewer; writing with file = is unaffected.
print() mentions the Viewer only when it was opened.write_xlsx(cb, frequencies = TRUE) are rounded to 2
decimals.max_values and are truncated with
an “… (N more)” note; long character values are truncated to
max_len.max_values or max_len values, and
a file = path in a nonexistent directory, raise a clear
error before any work is done.codebook() no longer fails on inline data expressions
such as codebook(data.frame(...)).summary() in a new “Missing values” section, so
show_na now takes effect on the console.Adds McDonald’s omega to reliability().
reliability() reports McDonald’s omega, estimated from
a one-factor maximum-likelihood model, also for weighted data:
omega (raw, analogous to raw alpha) and
omega_std (standardized, analogous to standardized
alpha).omega_if_deleted column
(NA when fewer than 3 items remain).print() shows omega next to alpha;
summary() adds omega to the Reliability Statistics block
and the Item-Total table.psych::omega() and a one-factor
confirmatory factor analysis. The help page notes this.Corrections to weighted rank statistics and clearer documentation of which results are compared with SPSS.
vignette("spss-compatibility") describe which results are
compared with SPSS output.mann_whitney(),
kruskal_wallis(), wilcoxon_test(),
friedman_test(), binomial_test(),
dunn_test(), pairwise_wilcoxon() and
kendall_tau() note that their weighted results are not
compared with SPSS output.mann_whitney() help page notes that its weighted U
and W are design-based quantities; Z and p are the test result.oneway_anova() help page documents that
omega-squared and epsilon-squared are truncated at 0.w_* functions
and scheffe_test() as validated.kendall_tau() computes the tau-b denominator
correctly for data with pairs tied on both variables.kruskal_wallis() uses the correct grand mean
rank, so H is no longer too large.Removes the argument names and result columns deprecated in 0.6.9 and 0.6.10.
codebook()
(show.id, show.type, show.labels,
show.values, show.freq, show.na,
show.unused, max.values, max.len,
sort.by.name) and of val_labels() and
drop_labels() (drop.na) raise an error; use
the snake_case names (e.g. show_id,
drop_na).chi_squared instead of chi_sq
(chisq_gof(), friedman_test()) and instead of
statistic (mcnemar_test()),
r_effect instead of effect_size_r
(mann_whitney()), and F_statistic instead of
F_stat (oneway_anova()). Statistical values
are unchanged.Harmonizes result column names across functions.
chi_sq (chisq_gof(),
friedman_test()), statistic
(mcnemar_test()), effect_size_r
(mann_whitney()) and F_stat
(oneway_anova()) are deprecated. They remain available as
duplicate columns in this release and will be removed in 0.6.11.chi_squared in chisq_gof(),
friedman_test() and mcnemar_test() (as in
chi_square()), r_effect in
mann_whitney() (as in wilcoxon_test()), and
F_statistic in oneway_anova() (as in
levene_test()). Statistical values are unchanged.Completes the switch to snake_case argument names.
frequency(), fre(), rec(),
to_label(), to_character(),
to_numeric(), read_spss(),
read_por(), read_stata(),
read_sas() and read_xpt(); use the snake_case
names (e.g. sort_frq instead of
sort.frq)...., an old
argument name raises an informative error instead of being taken as a
variable selection.codebook() are renamed to snake_case
(show_id, show_type, show_labels,
show_values, show_freq, show_na,
show_unused, max_values, max_len,
sort_by_name), as is drop_na in
val_labels() and drop_labels(). The old names
still work in this release with a warning (once per session).codebook() results
(result$options) use snake_case keys.Argument names switch to snake_case.
na.rm, conf.level and
var.equal are unchanged. Renamed arguments:
frequency() and fre():
sort_frq, show_na, show_prc,
show_valid, show_sum,
show_labels, show_unusedrec(): as_factor, var_label,
val_labelsto_label(), to_character(),
to_numeric(): drop_na,
drop_unused, add_non_labelled,
use_labels, start_at,
keep_labelsread_spss(), read_por(),
read_stata(), read_sas(),
read_xpt(): tag_nat_test() results no longer contain the duplicate
columns CI_lower and CI_upper; use
conf_int_lower and conf_int_upper.frequency() validates sort_frq
("none", "asc", "desc") and
show_labels (TRUE, FALSE,
"auto") with a clear error; a misspelled
sort_frq previously produced an unsorted table
silently.Uniform output for all analysis functions; statistical results are unchanged.
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() or
crosstab() shows a compact overview (headline statistic,
p-value, significance stars, one line per test). Everything previously
shown by print() is available through
summary(), which can show or hide each section.describe() gains a summary() method,
consistent with the other functions.Maintenance release: internal restructuring; statistical results are unchanged.
tukey_test() and scheffe_test() print
aligned tables and show p-values in SPSS style.Maintenance release; statistical results are unchanged.
phi(), cramers_v() and
goodman_gamma().Improves the accuracy of several statistics and makes functions behave more consistently. Some results change slightly, in each case toward the standard reference implementations.
kruskal_wallis() reports its effect size as
epsilon_squared (previously eta_squared).phi(), cramers_v() and
goodman_gamma() return the effect size as a single number;
use chi_square() for the full test output.oneway_anova() always reports both the classical and
the Welch results (as SPSS ONEWAY does), so its var.equal
argument is deprecated; ss_type in
factorial_anova() and ancova() is deprecated
in favor of the SPSS-standard Type III sums of squares.linear_regression() reports collinearity diagnostics
(Tolerance and VIF per model term);
summary(..., collinearity = FALSE) hides them.wilcoxon_test(), pairwise_wilcoxon()) uses
frequency-expansion mid-ranks: integer weights give exactly the
expanded-data result, and weights of 1 reproduce the unweighted test.
Mean ranks in weighted kruskal_wallis() and
dunn_test() follow the same convention.frequency() header statistics use the same formulas as
describe() and the w_* functions.write_spss() protects valid values when many
missing-value codes must be combined into a range, and explains what it
does.stats::cor.test() and the SPSS formula, notably for heavily
tied data such as binary variables.mann_whitney() matches its
reported Z (SPSS convention, no continuity correction).linear_regression() and
in the omnibus test of logistic_regression() are derived
from the fitted model terms, improving results for models with
dummy-coded factors or interactions.t_test() respects
var.equal for its primary result.frequency(show.unused = TRUE) works on variables tagged
with set_na() or read_spss(), and
sort.frq sorts by frequency with a monotone cumulative
percentage.logistic_regression() shows separation and convergence
warnings again.w_* results print their
statistics again.rec() matches single decimal values
(e.g. "3.6=2") reliably, even when the stored value carries
floating-point representation error.broom::tidy(), broom::glance() and
broom::augment() work correctly on
linear_regression() and logistic_regression()
results; summary() still returns the SPSS-style
output.use = "pairwise",
these functions raise an informative error that points to per-group use
(lapply(r$groups, ...)) or
use = "listwise".Regression results are now standard R model objects.
linear_regression() and
logistic_regression() results are the fitted
lm or glm objects themselves (classes
c("linear_regression", "lm") and
c("logistic_regression", "glm", "lm")), with the mariposa
tables attached. The $model element is gone; use the result
directly (e.g. predict(r, ...)).$coefficients table is renamed to
$coef_table (coef(r) returns the coefficient
vector), and the $anova table to $anova_table
(anova(r) returns R’s sequential ANOVA table).coef(),
predict(), anova(), vcov(),
confint(), residuals() and
fitted() work directly on regression results.
summary() still returns the SPSS-style summary;
stats::summary.lm() and stats::summary.glm()
give R’s standard summaries.r$groups is a model
object, so these functions can be applied per group; on the grouped
result itself and on use = "pairwise" results they raise an
informative error.linear_regression() and
logistic_regression() gain a factors argument.
The new default factors = "dummy" expands a factor with L
levels into L - 1 dummy variables, as lm() and
glm() do; previously, factor levels were silently converted
to integer codes. factors = "numeric" restores this
SPSS-style treatment and lists the converted variables in a
message.use = "pairwise", factor predictors require
factors = "numeric" or use = "listwise";
otherwise an informative error is raised.linear_regression() and
logistic_regression() use the unrounded sum of weights in
degrees of freedom, F, R-squared and pseudo R-squared, bringing results
closer to SPSS; the displayed N stays rounded.summary(descriptives = TRUE) for
linear_regression() prints the Descriptive Statistics
table.linear_regression() results with
non-integer degrees of freedom no longer fails.summary() methods use
the correct argument names.Brings weighted results closer to SPSS (weighted results may shift slightly) and documents the validation status of each function.
vignette("spss-compatibility") shows the validation
status of each function.spearman_rho() documentation states that weights
are used only to select cases, not in the rank correlation itself.pearson_cor() documentation explains that raw
expansion weights produce too narrow confidence intervals and should be
normalized first.t_test() uses the unrounded sum of weights for
variances, standard errors and degrees of freedom, including the Welch
correction.oneway_anova() computes variances, standard
errors, confidence intervals and within-groups degrees of freedom as
SPSS ONEWAY does.levene_test() uses the unrounded sum of
weights in its degrees of freedom.dunn_test() applies the tie correction to its standard
errors, so |Z| is no longer underestimated for tied data such as Likert
scales.friedman_test() applies the tie correction
like the unweighted test.describe() use the
bias-corrected formulas of w_skew(),
w_kurtosis() and SPSS FREQUENCIES.Adds functions for label management, data transformation, row operations and variable search.
scale_index() is removed; use row_means(),
which provides the same functionality.var_label() gets and sets variable labels.val_labels() gets and sets value labels;
.add = TRUE extends existing labels.copy_labels() copies all label attributes to
matching columns of another data frame, e.g. to restore labels lost in
dplyr operations.drop_labels() removes value labels for values that
do not occur in the data.to_label() and to_character() convert
labelled vectors to factors (levels in code order) or character; new
to_numeric() and to_labelled() convert factors
and other vectors to numeric or labelled vectors.set_na() declares values as missing, by default as
tagged NAs that na_frequencies(), frequency()
and codebook() recognize; named arguments set codes per
variable.unlabel() removes all label metadata and returns
plain R vectors.rec() recodes values with a compact string syntax
(e.g. "1:2=1 [Low]; 3:5=2 [High]"), including ranges,
min/max, copy and value
labels.to_dummy() creates 0/1 indicator variables,
optionally named after the value labels.std() standardizes variables with four methods
("sd", "2sd", "mad",
"gmd"), with weights, group_by() and a robust
option.center() centers variables at the grand mean or
group mean, with weights.row_means() and row_sums() compute
row-wise means and sums with a minimum number of valid values
(min_valid, like SPSS MEAN.x()); new
row_count() counts specific values per row.find_var() searches variables by name or
label.Adds export to SPSS, Stata and SAS transport files.
write_spss() writes SPSS .sav files
and converts tagged NAs back to user-defined missing values, for
lossless roundtrips with read_spss(); it supports byte,
none and zsav compression.write_stata() writes Stata .dta files
(versions 8 to 15), with tagged NAs as extended missing values
(.a to .z).write_xpt() writes SAS transport .xpt
files (versions 5 and 8), with tagged NAs as special missing values
(.A to .Z, ._).Adds Excel import and export with label preservation.
read_xlsx() reads Excel files and restores variable
labels, value labels and tagged NAs from files written by
write_xlsx(); other Excel files are read as plain
data.write_xlsx() exports data frames (with a “Labels”
sheet for variable labels, value labels and missing-value codes),
codebooks (with optional frequency sheets,
frequencies = TRUE) and named lists (one sheet per element)
to Excel. Missing-value codes stay visible in the data sheet.Adds import of Stata, SAS and SPSS portable files.
spss_code column of na_frequencies()
is renamed to code and contains character values, such as
"-9" for SPSS or ".a" for Stata.read_stata() reads Stata .dta files
and integrates extended missing values (.a to
.z) with na_frequencies(),
frequency() and codebook().read_sas() reads SAS .sas7bdat files,
optionally with a catalog file (.sas7bcat) for value
labels, and integrates special missing values (.A to
.Z, ._).read_xpt() reads SAS transport .xpt
files with support for special missing values.read_por() reads SPSS portable .por
files with the same tagged NA support as read_spss().na_frequencies(), untag_na() and
strip_tags() work with data from all supported
formats.untag_na() warns and behaves like
strip_tags().frequency() and codebook() show
missing-value codes in the notation of the source format
(e.g. -9, .a, .A).Adds SPSS import with tagged missing values.
read_spss() reads SPSS .sav files and
keeps user-defined missing values as tagged NAs, so different types of
missing data (e.g. “no answer”, “not applicable”) remain distinguishable
while behaving as NA in R. It also handles large survey
files.na_frequencies() shows the types of missing values
in a variable with counts, original codes and labels.untag_na() converts tagged NAs back to their
original SPSS missing-value codes.strip_tags() converts tagged NAs to regular
NA.frequency() lists each type of tagged NA in its own row
with code and label, followed by “Total Valid” and “Total Missing”
rows.frequency(show.unused = TRUE) no longer lists labels of
tagged NAs as unused categories.fre() is a shorthand for
frequency().codebook() creates an interactive HTML data
dictionary in the RStudio Viewer, showing each variable’s position,
name, type, label, values, value labels and frequencies. It is built
with htmltools, a new dependency.summary()
gives a text version with selectable sections (overview,
variable_details, value_labels).codebook() supports tidyselect, survey weights for
weighted frequencies, and sorting by variable name.t_test(), oneway_anova(),
factorial_anova(), ancova(),
chi_square(), mann_whitney(),
pearson_cor(), spearman_rho(),
kendall_tau(), reliability(),
efa(), linear_regression() and
logistic_regression() gain summary() methods:
printing a result gives a compact overview, and summary()
gives the detailed SPSS-style output.summary() show or hide individual sections
(e.g. summary(result, effect_sizes = FALSE)).ancova() and
factorial_anova() use the correct
dv/between interface, and examples refer to
the education variable correctly.Adds factorial ANOVA and ANCOVA.
factorial_anova() performs between-subjects ANOVA
with up to three factors and Type III sums of squares, as SPSS UNIANOVA
does: main effects, all interactions, partial eta squared, R-squared and
Levene’s test. It works with tukey_test(),
scheffe_test() and levene_test().ancova() performs analysis of covariance (SPSS
UNIANOVA with WITH): ANOVA table, parameter estimates, estimated
marginal means adjusted for the covariates, and Levene’s test; it
supports up to three factors and multiple covariates.Adds exact and goodness-of-fit tests and non-parametric post-hoc tests.
fisher_test() performs Fisher’s exact test of
independence, recommended for small samples or expected cell counts
below 5; it supports weights, multiple variables and
group_by().chisq_gof() tests whether a categorical variable
follows an expected distribution (equal proportions by default, or
custom proportions), with residuals, weights and multiple
variables.mcnemar_test() tests changes in paired proportions
of two dichotomous measurements (e.g. before/after), with asymptotic and
exact p-values, the 2x2 table, continuity correction and weights.dunn_test() performs Dunn’s pairwise post-hoc
comparisons on kruskal_wallis() results, with adjustable
p-value correction (Bonferroni, Holm, BH and others).pairwise_wilcoxon() performs pairwise Wilcoxon
signed-rank post-hoc comparisons on friedman_test()
results, with adjustable p-value correction.efa() supports maximum likelihood extraction
(extraction = "ml") with a goodness-of-fit chi-square test,
initial communalities (squared multiple correlations) and uniquenesses;
survey weights are supported.efa() supports Promax rotation
(rotation = "promax"), an oblique rotation that reports the
pattern matrix, structure matrix and factor correlation matrix.Adds non-parametric tests.
kruskal_wallis() compares three or more independent
groups on ordinal data (non-parametric alternative to one-way ANOVA),
with an effect size, weights, group_by() and multiple
variables.wilcoxon_test() compares two paired measurements
(Wilcoxon signed-rank test), with rank categories (negative, positive,
ties) and effect size r.friedman_test() compares three or more related
measurements (non-parametric alternative to repeated-measures ANOVA),
with Kendall’s W as effect size.binomial_test() tests whether an observed
proportion matches an expected value (exact binomial test), for one or
more binary variables.Adds scale analysis and regression.
reliability() computes Cronbach’s alpha with item
statistics: corrected item-total correlations, alpha if item deleted,
and the inter-item correlation matrix.efa() performs exploratory factor analysis with
principal component extraction and Varimax or Oblimin rotation (Oblimin
requires the suggested package GPArotation), including KMO, Bartlett’s
test, communalities and a sorted loading matrix with a configurable
blank threshold.scale_index() computes mean indices across items,
with min_valid like SPSS MEAN.x().pomps() rescales values to percent of maximum
possible scores (0-100).linear_regression() fits linear models with
SPSS-style output (coefficients with B, SE, Beta, t and p; ANOVA table;
R, R-squared and adjusted R-squared), using a formula or the SPSS-style
dependent/predictors interface.logistic_regression() fits logistic models with
odds ratios, Wald statistics, pseudo R-squared (Nagelkerke, Cox &
Snell, McFadden) and a classification table.group_by().gamma() is renamed to goodman_gamma() so
that it no longer masks base::gamma()._results suffix and
match the function name (e.g. t_test instead of
t_test_results).t_test() checks that conf.level is between
0 and 1; t_test() and oneway_anova() check
that the selected variables are numeric; chi_square() warns
when expected cell counts are below 5.t_test() uses weighted means and
the pooled weighted standard deviation.