Releases: strengejacke/sjstats
Releases · strengejacke/sjstats
sjstats 0.17.2
General
- Revised help-files for
r2()andicc(), also by adding more references.
New functions
re_grp_var()to find group factors of random effects in mixed models.
Changes to functions
omega_sq()andeta_sq()give more informative messages when using non-supported objects.r2()andicc()give more informative warnings and messages.tidy_stan()supports printing simplex parameters of monotonic effects of brms models.grpmean()andmwu()get afileandencodingargument, to save the HTML output as file.
Bug fixes
model_frame()now correctly names the offset-columns for terms provided asoffset-argument (i.e. for models where the offset was not specified inside the formula).- Fixed issue with
weights-argument ingrpmean()when variable name was passed as character vector. - Fixed issue with
r2()for glmmTMB models withar1random effects structure.
sjstats 0.17.1
New functions
wtd_chisqtest()to compute a weighted Chi-squared test.wtd_median()to compute the weighted median of variables.wtd_cor()to compute weighted correlation coefficients of variables.
Changes to functions
mediation()can now cope with models from different families, e.g. if the moderator or outcome is binary, while the treatment-effect is continuous.model_frame(),link_inverse(),pred_vars(),resp_var(),resp_val(),r2()andmodel_family()now supportclm2-objects from package ordinal.anova_stats()gives a more informative message for non-supported models or ANOVA-options.
Bug fixes
- Fixed issue with
model_family()andlink_inverse()for models fitted withpscl::hurdle()orpscl::zeroinfl(). - Fixed issue with wrong title in
grpmean()for grouped data frames, when grouping variable was an unlabelled factor. - Fix issue with
model_frame()for coxph-models with polynomial or spline-terms. - Fix issue with
mediation()for logical variables.
sjstats 0.17.0
General
- Reduce package dependencies.
New functions
wtd_ttest()to compute a weighted t-test.wtd_mwu()to compute a weighted Mann-Whitney-U or Kruskal-Wallis test.
Changes to functions
robust()was revised, getting more arguments to specify different types of covariance-matrix estimation, and handling these more flexible.- Improved
print()-method fortidy_stan()for brmsfit-objects with categorical-families. se()now also computes standard errors for relative frequencies (proportions) of a vector.r2()now also computes r-squared values for glmmTMB-models fromgenpois-families.r2()gives more precise warnings for non-supported model-families.xtab_statistics()gets aweights-argument, to compute measures of association for contingency tables for weighted data.- The
statistics-argument inxtab_statistics()gets a"fisher"-option, to force Fisher's Exact Test to be used. - Improved variance calculation in
icc()for generalized linear mixed models with Poisson or negative binomial families. icc()gets anadjusted-argument, to calculate the adjusted and conditional ICC for mixed models.- To get consistent argument names accross functions, argument
weight.byis now deprecated and renamed intoweights.
Bug fixes
- Fix issues with effect size computation for repeated-measure Anova when using bootstrapping to compute confidence intervals.
grpmean()now also adjusts then-columm for weighted data.icc(),re_var()andget_re_var()now correctly compute the random-effect-variances for models with multiple random slopes per random effect term (e.g.,(1 + rs1 + rs2 | grp)).- Fix issues in
tidy_stan(),mcse(),hdi()andn_eff()forstan_polr()-models. - Plotting
equi_test()did not work for intercept-only models.
sjstats 0.16.0
General
- The S3-generics for functions like
hdi(),rope(),equi_test()etc. are now more generic, and function usage for each supported object is now included in the documentation. - Following functions are now S3-generic:
icc(),r2(),p_value(),se(), andstd_beta(). - Added
print()-methods for some more functions, for a clearer output. - Revised
r2()for mixed models (packages lme4, glmmTMB). The r-squared value should be much more precise now, and reports the marginal and conditional r-squared values. - Reduced package dependencies and removed apaTables and MBESS from suggested packages
stanmvreg-models are now supported by many functions.
New functions
binned_resid()to plot binned residuals for logistic regression models.error_rate()to compute model quality for logistic regression models.auto_prior()to quickly create automatically adjusted priors for brms-models.difficulty()to compute the item difficulty.
Changes to functions
icc()gets appd-argument for Stan-models (brmsfit and stanreg), which performs a variance decomposition based on the posterior predictive distribution. This is the recommended way for non-Gaussian models.- For Stan-models (brmsfit and stanreg),
icc()now also computes the HDI for the ICC and random-effect variances. Use theprob-argument to specify the limits of this interval. link_inverse()andmodel_family()now support clmm-models (package ordinal) and glmRob and lmRob-models (package robust).model_family()gets amulti.resp-argument, to return a list of family-informations for multivariate-response models (of classbrmsfitorstanmvreg).link_inverse()gets amulti.resp-argument, to return a list of link-inverse-functions for multivariate-response models (of classbrmsfitorstanmvreg).p_value()now supports rlm-models (package MASS).check_assumptions()for single models withas.logical = FALSEnow has a nice print-method.eta_sq()andomega_sq()now also work for repeated-measure Anovas, i.e. Anova with error term (requires broom > 0.4.5).
Bug fixes
model_frame()andvar_names()now correctly cleans nested patterns likeoffset(log(x + 10))from column names.model_frame()now returns proper column names from gamm4 models.model_frame()did not work when the model frame had spline-terms and weights.- Fix issue in
robust()whenexponentiate = TRUEandconf.int = FALSE. reliab_test()returned an error when the provided data frame has less than three columns, instead of returningNULL.
sjstats 0.15.0
General
- Added new Vignette Statistics for Bayesian Models.
New functions
equi_test()to test if parameter values in Bayesian estimation should be accepted or rejected.mediation()to print a summary of a mediation analysis from multivariate response models fitted with brms.
Changes to functions
link_inverse()now also returns the link-inverse function for cumulative-family brms-models.model_family()now also returns anis_ordinal-element with information if the model is ordinal resp. a cumulative link model.- Functions that access model information (like
model_family()) now better supportvglm-models (package VGAM). r2()now also calculates the standard error for brms or stanreg models.r2()gets aloo-argument to calculate LOO-adjusted rsquared values for brms or stanreg models. This measure comes conceptionally closer to an adjusted r-squared measure.- Effect sizes (
anova_stats(),eta_sq()etc.) are now also computed for mixed models. - To avoid confusion,
n_eff()now computes the number of effective samples, and no longer its ratio in relation to the total number of samples. - The column name for the ratio of the number of effective samples in
tidy_stan()is now named neff_ratio, to avoid confusion.
Bug fixes
- Fixed issue in
se()foricc()-objects, where random effect term could not be found. - Fixed issue in
se()formerMod-objects. - Fixed issue in
p_value()for mixed models with KR-approximation, which is now more accurate.
sjstats 0.10.0
New functions
cv_error()andcv_compare()to compute the root mean squared error for test and training data from cross-validation.props()to calculate proportions in a vector, supporting multiple logical statements.or_to_rr()to convert odds ratio estimates into risk ratio estimates.mn(),md()andsm()to calculate mean, median or sum of a vector, but usingna.rm = TRUEas default.- S3-generics for
svyglm.nb-models:family(),print(),formula(),model.frame()andpredict().
Bug fixes
- Fixed error in computation of
mse().