Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil authored Jun 19, 2022
2 parents 823490c + 9b5aef1 commit 18480f7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
`options("parameters_cimethod" = FALSE)` (#722). By default, these messages
are displayed.

* `model_parameters()` now supports objects from package _marginaleffects_ and
objects returned by `car::linearHypothesis()`.

* Added `predict()` method to `cluster_meta` objects.

* Reorganization of docs for `model_parameters()`.

## Changes to functions

* `model_parameters()` now also includes standard errors and confidence
Expand All @@ -24,6 +31,9 @@
* Fixed issue with argument `column_names` in `compare_parameters()` when
strings contained characters that needed to be escaped for regular expressions.

* Fixed issues with unknown arguments in `model_parameters()` for *lavaan* models
when `standardize = TRUE`.

# parameters 0.18.0

## Breaking Changes
Expand Down
20 changes: 8 additions & 12 deletions R/extract_random_variances.R
Original file line number Diff line number Diff line change
Expand Up @@ -244,43 +244,39 @@ as.data.frame.VarCorr.lme <- function(x, row.names = NULL, optional = FALSE, ...
to <- c(which(grps) - 1, length(grps))[-1]
out_sd <- do.call(rbind, lapply(1:length(from), function(i) {
values <- stddevs[from[i]:to[i]]
data.frame(
.data_frame(
grp = gsub("(.*) =$", "\\1", names(values[1])),
var1 = names(values[-1]),
var2 = NA_character_,
sdcor = unname(values[-1]),
stringsAsFactors = FALSE
sdcor = unname(values[-1])
)
}))
if (!is.null(corrs)) {
out_cor <- do.call(rbind, lapply(1:length(from), function(i) {
values <- corrs[from[i]:to[i]]
data.frame(
.data_frame(
grp = gsub("(.*) =$", "\\1", names(values[1])),
var1 = "(Intercept)",
var2 = names(values[-1]),
sdcor = unname(values[-1]),
stringsAsFactors = FALSE
sdcor = unname(values[-1])
)
}))
} else {
out_cor <- NULL
}
} else {
out_sd <- data.frame(
out_sd <- .data_frame(
grp = gsub("(.*) =(.*)", "\\1", attributes(x)$title),
var1 = names(stddevs),
var2 = NA_character_,
sdcor = unname(stddevs),
stringsAsFactors = FALSE
sdcor = unname(stddevs)
)
if (!is.null(corrs)) {
out_cor <- data.frame(
out_cor <- .data_frame(
grp = gsub("(.*) =(.*)", "\\1", attributes(x)$title),
var1 = "(Intercept)",
var2 = names(corrs),
sdcor = unname(corrs),
stringsAsFactors = FALSE
sdcor = unname(corrs)
)
} else {
out_cor <- NULL
Expand Down

0 comments on commit 18480f7

Please sign in to comment.