Skip to content

Commit 52a0fc9

Browse files
authored
Merge branch 'main' into support_coxme_ranef
2 parents 40dc7fd + bde23a9 commit 52a0fc9

File tree

80 files changed

+2812
-2231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2812
-2231
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ name: R-CMD-check
88

99
jobs:
1010
R-CMD-check:
11-
uses: easystats/workflows/.github/workflows/R-CMD-check.yaml@main
11+
uses: easystats/workflows/.github/workflows/R-CMD-check-no-oldrel.yaml@main

.github/workflows/test-coverage.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
4+
push:
5+
branches: [main, master]
46
pull_request:
57
branches: [main, master]
68

DESCRIPTION

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: parameters
33
Title: Processing of Model Parameters
4-
Version: 0.26.0.2
4+
Version: 0.27.0.3
55
Authors@R:
66
c(person(given = "Daniel",
77
family = "Lüdecke",
@@ -78,9 +78,9 @@ BugReports: https://github.com/easystats/parameters/issues
7878
Depends:
7979
R (>= 3.6)
8080
Imports:
81-
bayestestR (>= 0.16.0),
82-
datawizard (>= 1.1.0),
83-
insight (>= 1.3.0),
81+
bayestestR (>= 0.16.1),
82+
datawizard (>= 1.2.0),
83+
insight (>= 1.3.1),
8484
graphics,
8585
methods,
8686
stats,
@@ -110,11 +110,13 @@ Suggests:
110110
cluster,
111111
cobalt,
112112
coda,
113+
correlation (>= 0.8.8),
113114
coxme,
114115
cplm,
115116
curl,
116117
dbscan,
117118
did,
119+
discovr,
118120
distributional,
119121
domir (>= 0.2.0),
120122
drc,
@@ -173,6 +175,7 @@ Suggests:
173175
mmrm,
174176
multcomp,
175177
MuMIn,
178+
mvtnorm,
176179
NbClust,
177180
nFactors,
178181
nestedLogit,
@@ -199,6 +202,7 @@ Suggests:
199202
rms,
200203
rstan,
201204
rstanarm,
205+
sampleSelection,
202206
sandwich,
203207
see (>= 0.8.1),
204208
serp,
@@ -227,4 +231,4 @@ Config/testthat/parallel: true
227231
Config/Needs/website: easystats/easystatstemplate
228232
Config/Needs/check: stan-dev/cmdstanr
229233
Config/rcmdcheck/ignore-inconsequential-notes: true
230-
Remotes: easystats/insight, easystats/bayestestR
234+
Remotes: easystats/insight

NAMESPACE

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,14 @@ S3method(display,parameters_brms_meta)
126126
S3method(display,parameters_efa)
127127
S3method(display,parameters_efa_summary)
128128
S3method(display,parameters_model)
129+
S3method(display,parameters_omega)
130+
S3method(display,parameters_omega_summary)
131+
S3method(display,parameters_p_function)
129132
S3method(display,parameters_pca)
130133
S3method(display,parameters_pca_summary)
131134
S3method(display,parameters_sem)
132135
S3method(display,parameters_simulate)
136+
S3method(display,parameters_standardized)
133137
S3method(dof_satterthwaite,lmerMod)
134138
S3method(equivalence_test,MixMod)
135139
S3method(equivalence_test,feis)
@@ -149,6 +153,11 @@ S3method(equivalence_test,rma)
149153
S3method(equivalence_test,wbm)
150154
S3method(equivalence_test,zeroinfl)
151155
S3method(factor_analysis,data.frame)
156+
S3method(factor_analysis,matrix)
157+
S3method(factor_scores,fa)
158+
S3method(factor_scores,omega)
159+
S3method(factor_scores,parameters_efa)
160+
S3method(factor_scores,parameters_omega)
152161
S3method(format,compare_parameters)
153162
S3method(format,equivalence_test_lm)
154163
S3method(format,p_calibrate)
@@ -250,6 +259,7 @@ S3method(model_parameters,hkmeans)
250259
S3method(model_parameters,htest)
251260
S3method(model_parameters,hurdle)
252261
S3method(model_parameters,hypotheses)
262+
S3method(model_parameters,item_omega)
253263
S3method(model_parameters,ivFixed)
254264
S3method(model_parameters,ivprobit)
255265
S3method(model_parameters,kmeans)
@@ -603,9 +613,14 @@ S3method(print,parameters_sem)
603613
S3method(print,parameters_simulate)
604614
S3method(print,parameters_standardized)
605615
S3method(print_html,compare_parameters)
616+
S3method(print_html,equivalence_test_lm)
606617
S3method(print_html,parameters_brms_meta)
618+
S3method(print_html,parameters_efa)
619+
S3method(print_html,parameters_efa_summary)
607620
S3method(print_html,parameters_model)
608621
S3method(print_html,parameters_p_function)
622+
S3method(print_html,parameters_pca)
623+
S3method(print_html,parameters_pca_summary)
609624
S3method(print_html,parameters_sem)
610625
S3method(print_html,parameters_simulate)
611626
S3method(print_html,parameters_standardized)
@@ -615,6 +630,8 @@ S3method(print_md,parameters_brms_meta)
615630
S3method(print_md,parameters_efa)
616631
S3method(print_md,parameters_efa_summary)
617632
S3method(print_md,parameters_model)
633+
S3method(print_md,parameters_omega)
634+
S3method(print_md,parameters_omega_summary)
618635
S3method(print_md,parameters_p_function)
619636
S3method(print_md,parameters_pca)
620637
S3method(print_md,parameters_pca_summary)
@@ -935,6 +952,7 @@ export(dominance_analysis)
935952
export(efa_to_cfa)
936953
export(equivalence_test)
937954
export(factor_analysis)
955+
export(factor_scores)
938956
export(format_df_adjust)
939957
export(format_order)
940958
export(format_p_adjust)
@@ -966,7 +984,6 @@ export(pool_parameters)
966984
export(principal_components)
967985
export(print_html)
968986
export(print_md)
969-
export(print_table)
970987
export(random_parameters)
971988
export(reduce_data)
972989
export(reduce_parameters)

NEWS.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,66 @@
1+
# parameters (devel)
2+
3+
## Breaking Changes
4+
5+
* The experimental `print_table()` function was removed. The aim of this function
6+
was to test the implementation of the `tinytable` backend for printing. Now,
7+
`tinytable` is fully supported by `insight::export_table()` and thereby also
8+
by the various `print()` resp. `display()` methods for model parameters.
9+
10+
## Changes
11+
12+
* All `print_html()` methods get an `engine` argument, to either use the `gt`
13+
package or the `tinytable` package for printing HTML tables. Since `tinytable`
14+
not only produces HTML tables, but rather different formats depending on the
15+
environment, `print_html()` may also generate a markdown table. Thus, the
16+
generic `display()` method can be used, too, which has a `format` argument that
17+
also supports `"tt"` for `tinytable`.
18+
19+
## Bug fixes
20+
21+
* Fixed issue with models of class `selection` with multiple outcomes.
22+
23+
# parameters 0.27.0
24+
25+
## Breaking Changes
26+
27+
* The `standardize` argument in `factor_analysis()` now defaults to `FALSE`.
28+
29+
* The `rotation` argument in `factor_analysis()` now defaults to `"oblimin"`,
30+
because the former default of `"none"` rarely makes sense in the context of
31+
factor analysis. If you want to use no rotation, please set `rotation =
32+
"none"`.
33+
34+
* The `cor` argument in `n_factors()` was renamed into `correlation_matrix`. In
35+
`factor_analysis()`, the `cor` argument was completely removed to avoid naming
36+
collision with the `cor` argument of `psych::fa()`, which now users can pass
37+
the `cor` argument to `psych::fa()` when using `factor_analysis()`.
38+
39+
## Changes
40+
41+
* `factor_analysis()` gets a `.matrix` method, including a new argument `n_obs`
42+
(which can be a single value or a matrix of pairwise counts), to compute
43+
factor analysis for a correlation matrix or covariance matrix.
44+
45+
* New function `factor_scores()` to extract factor scores from EFA (`psych::fa()`
46+
or `factor_analysis()`).
47+
48+
* Added and/or improved print-methods for all functions around PCA, FA and Omega.
49+
50+
* Improved efficiency in `model_parameters()` for models from packages *brms*
51+
and *rstanarm*.
52+
53+
* `p_adjust` for `model_parameters()` gets a new options, `"sup-t"`, to calculate
54+
simultaneous confidence intervals.
55+
56+
## Bug fixes
57+
58+
* `bootstrap_model()` did not work for intercept-only models. This has been fixed.
59+
60+
* Fixed issue with printing labels as pretty names for models from package
61+
*pscl*, i.e. `print(model_parameters(model), pretty_names = "labels")` now
62+
works as expected.
63+
164
# parameters 0.26.0
265

366
## Changes

R/1_model_parameters.R

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,12 +358,16 @@
358358
#'
359359
#' - Lakens, D., Scheel, A. M., and Isager, P. M. (2018). Equivalence Testing
360360
#' for Psychological Research: A Tutorial. Advances in Methods and Practices
361-
#' in Psychological Science, 1(2), 259–269. \doi{10.1177/2515245918770963}
361+
#' in Psychological Science, 1(2), 259–269.
362362
#'
363363
#' - Makowski, D., Ben-Shachar, M. S., Chen, S. H. A., and Lüdecke, D. (2019).
364364
#' Indices of Effect Existence and Significance in the Bayesian Framework.
365365
#' Frontiers in Psychology, 10, 2767. \doi{10.3389/fpsyg.2019.02767}
366366
#'
367+
#' - Montiel Olea, J. L., and Plagborg-Møller, M. (2019). Simultaneous
368+
#' confidence bands: Theory, implementation, and an application to SVARs.
369+
#' Journal of Applied Econometrics, 34(1), 1–17. \doi{10.1002/jae.2656}
370+
#'
367371
#' - Neter, J., Wasserman, W., and Kutner, M. H. (1989). Applied linear
368372
#' regression models.
369373
#'
@@ -463,11 +467,12 @@ parameters <- model_parameters
463467
#' coefficient. The transformed confidence interval more clearly captures this
464468
#' uncertainty. For `compare_parameters()`, `exponentiate = "nongaussian"`
465469
#' will only exponentiate coefficients from non-Gaussian families.
466-
#' @param p_adjust Character vector, if not `NULL`, indicates the method to
467-
#' adjust p-values. See [`stats::p.adjust()`] for details. Further
468-
#' possible adjustment methods are `"tukey"`, `"scheffe"`,
469-
#' `"sidak"` and `"none"` to explicitly disable adjustment for
470-
#' `emmGrid` objects (from **emmeans**).
470+
#' @param p_adjust String value, if not `NULL`, indicates the method to adjust
471+
#' p-values. See [`stats::p.adjust()`] for details. Further possible
472+
#' adjustment methods are `"tukey"`, `"scheffe"`, `"sidak"`, `"sup-t"`, and
473+
#' `"none"` to explicitly disable adjustment for `emmGrid` objects (from
474+
#' **emmeans**). `"sup-t"` computes simultaneous confidence bands, also called
475+
#' sup-t confidence band (Montiel Olea & Plagborg-Møller, 2019).
471476
#' @param ci_method Method for computing degrees of freedom for
472477
#' confidence intervals (CI) and the related p-values. Allowed are following
473478
#' options (which vary depending on the model class): `"residual"`,

R/bootstrap_model.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ bootstrap_model.default <- function(model,
8282
model_response <- insight::find_response(model)
8383

8484
boot_function <- function(model, data, indices) {
85-
d <- data[indices, ] # allows boot to select sample
85+
d <- data[indices, , drop = FALSE] # allows boot to select sample
8686

8787
if (inherits(model, "biglm")) {
8888
fit <- suppressMessages(stats::update(model, moredata = d))
@@ -237,7 +237,7 @@ bootstrap_model.nestedLogit <- function(model,
237237
model_response <- insight::find_response(model)
238238

239239
boot_function <- function(model, data, indices) {
240-
d <- data[indices, ] # allows boot to select sample
240+
d <- data[indices, , drop = FALSE] # allows boot to select sample
241241

242242
if (verbose) {
243243
fit <- stats::update(model, data = d)

0 commit comments

Comments
 (0)