From 44a8994bf0da43c0a0f9f8ef341482786bf97a49 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 19 Jun 2022 17:06:39 +0200 Subject: [PATCH 1/2] update news --- NEWS.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/NEWS.md b/NEWS.md index 580cf481f..73a0ba737 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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 @@ -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 From 9b5aef1e0e1ac586021bc0a736d43761bc6fa839 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 19 Jun 2022 17:08:46 +0200 Subject: [PATCH 2/2] use internal data.frame() function --- R/extract_random_variances.R | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/R/extract_random_variances.R b/R/extract_random_variances.R index b01ac5d8f..86a963765 100644 --- a/R/extract_random_variances.R +++ b/R/extract_random_variances.R @@ -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