Skip to content

Commit fbec1e7

Browse files
committed
version 0.15.0 on CRAN, update website
1 parent ef5112d commit fbec1e7

Some content is hidden

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

92 files changed

+1119
-1329
lines changed

DESCRIPTION

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ Package: sjstats
22
Type: Package
33
Encoding: UTF-8
44
Title: Collection of Convenient Functions for Common Statistical Computations
5-
Version: 0.14.3.9000
6-
Date: 2018-05-03
7-
Author: Daniel Lüdecke <[email protected]>
5+
Version: 0.15.0
6+
Date: 2018-06-06
87
Authors@R: person("Daniel", "Lüdecke", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0002-8895-3206"))
98
Maintainer: Daniel Lüdecke <[email protected]>
109
Description: Collection of convenient functions for common statistical computations,

R/check_model_assumptions.R

+3-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@
5656
#' < 0.05 indicates a significant deviation from normal distribution.
5757
#' Note that this formal test almost always yields significant results
5858
#' for the distribution of residuals and visual inspection (e.g. qqplots)
59-
#' are preferable (see \code{\link[sjPlot]{sjp.lm}} with \code{type = "ma"}).
59+
#' are preferable (see \code{\link[sjPlot]{plot_model}} with
60+
#' \code{type = "diag"}).
6061
#' \cr \cr
6162
#' \code{multicollin()} wraps \code{\link[car]{vif}} and returns
6263
#' the logical result as tibble. \code{TRUE}, if multicollinearity
@@ -74,7 +75,7 @@
7475
#' @note These formal tests are very strict and in most cases violation of model
7576
#' assumptions are alerted, though the model is actually ok. It is
7677
#' preferable to check model assumptions based on visual inspection
77-
#' (see \code{\link[sjPlot]{sjp.lm}} with \code{type = "ma"}).
78+
#' (see \code{\link[sjPlot]{plot_model}} with \code{type = "diag"}).
7879
#'
7980
#' @examples
8081
#' data(efc)

R/mean_n.R

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
#' @title Row means with min amount of valid values
22
#' @name mean_n
33
#' @description This function is similar to the SPSS \code{MEAN.n} function and computes
4-
#' row means from a \code{\link{data.frame}} or \code{\link{matrix}} if at least \code{n}
5-
#' values of a row are valid (and not \code{\link{NA}}).
4+
#' row means from a \code{data.frame} or \code{matrix} if at least \code{n}
5+
#' values of a row are valid (and not \code{NA}).
66
#'
77
#' @param dat A data frame with at least two columns, where row means are applied.
88
#' @param n May either be
99
#' \itemize{
1010
#' \item a numeric value that indicates the amount of valid values per row to calculate the row mean;
1111
#' \item or a value between 0 and 1, indicating a proportion of valid values per row to calculate the row mean (see 'Details').
1212
#' }
13-
#' If a row's sum of valid values is less than \code{n}, \code{\link{NA}} will be returned as row mean value.
13+
#' If a row's sum of valid values is less than \code{n}, \code{NA} will be returned as row mean value.
1414
#' @param digits Numeric value indicating the number of decimal places to be used for rounding mean
1515
#' value. Negative values are allowed (see ‘Details’).
1616
#'
1717
#' @return A vector with row mean values of \code{df} for those rows with at least \code{n}
18-
#' valid values. Else, \code{\link{NA}} is returned.
18+
#' valid values. Else, \code{NA} is returned.
1919
#'
2020
#' @details Rounding to a negative number of \code{digits} means rounding to a power of
2121
#' ten, so for example mean_n(df, 3, digits = -2) rounds to the

R/merMod_p.R

+7-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#' conditional F-tests with Kenward-Roger approximation for the df (see
1111
#' 'Details').
1212
#'
13-
#' @return A \code{\link{tibble}} with the model coefficients' names (\code{term}),
13+
#' @return A \code{data.frame} with the model coefficients' names (\code{term}),
1414
#' p-values (\code{p.value}) and standard errors (\code{std.error}).
1515
#'
1616
#' @details For linear mixed models (\code{lmerMod}-objects), the computation of
@@ -23,6 +23,10 @@
2323
#' \cr \cr
2424
#' If p-values already have been computed (e.g. for \code{merModLmerTest}-objects
2525
#' from the \CRANpkg{lmerTest}-package), these will be returned.
26+
#' \cr \cr
27+
#' The \code{print()}-method has a \code{summary}-argument, that - in
28+
#' case \code{p.kr = TRUE} - also prints information on the approximated
29+
#' degrees of freedom (see 'Examples').
2630
#'
2731
#' @examples
2832
#' data(efc)
@@ -38,7 +42,8 @@
3842
#'
3943
#' # lme4-fit
4044
#' library(lme4)
41-
#' fit <- lmer(Reaction ~ Days + (Days | Subject), data = sleepstudy)
45+
#' sleepstudy$mygrp <- sample(1:45, size = 180, replace = TRUE)
46+
#' fit <- lmer(Reaction ~ Days + (1 | mygrp) + (1 | Subject), sleepstudy)
4247
#' pv <- p_value(fit, p.kr = TRUE)
4348
#'
4449
#' # normal output

R/mwu.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#' @title Mann-Whitney-U-Test
22
#' @name mwu
33
#' @description This function performs a Mann-Whitney-U-Test (or Wilcoxon rank sum test,
4-
#' see \code{\link{wilcox.test}} and \code{\link[coin]{wilcox_test}})
4+
#' see \code{\link[stats]{wilcox.test}} and \code{\link[coin]{wilcox_test}})
55
#' for \code{x}, for each group indicated by \code{grp}. If \code{grp}
66
#' has more than two categories, a comparison between each combination of
77
#' two groups is performed. \cr \cr

R/pseudo_r2.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#' an alternative to other Pseudo-R-squared values
77
#' like Nakelkerke's R2 or Cox-Snell R2.
88
#'
9-
#' @param x Fitted \code{\link{glm}} or \code{\link[lme4]{glmer}} model.
9+
#' @param x Fitted \code{\link[stats]{glm}} or \code{\link[lme4]{glmer}} model.
1010
#'
1111
#' @return The \code{D} Coefficient of Discrimination, also known as
1212
#' Tjur's R-squared value.

R/rmse.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#' @description Compute root mean squared error, residual standard error or
44
#' mean square error of fitted linear (mixed effects) models.
55
#'
6-
#' @param fit Fitted linear model of class \code{\link{lm}},
7-
#' \code{\link[lme4]{merMod}} (\pkg{lme4}) or \code{\link[nlme]{lme}} (\pkg{nlme}).
6+
#' @param fit Fitted linear model of class \code{lm}, \code{merMod} (\pkg{lme4})
7+
#' or \code{lme} (\pkg{nlme}).
88
#' @param normalized Logical, use \code{TRUE} if normalized rmse should be returned.
99
#'
1010
#' @seealso \code{\link{r2}} for R-squared or pseude-R-squared values, and

R/sjStatistics.R

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
#' @description This function calculates a table's cell, row and column percentages as
44
#' well as expected values and returns all results as lists of tables.
55
#'
6-
#' @param tab Simple \code{\link{table}} or \code{\link{ftable}} of which cell, row and column percentages
7-
#' as well as expected values are calculated. Tables of class \code{\link{xtabs}} and other will
8-
#' be coerced to \code{\link{ftable}} objects.
6+
#' @param tab Simple \code{\link{table}} or \code{\link[stats]{ftable}} of which
7+
#' cell, row and column percentages as well as expected values are calculated.
8+
#' Tables of class \code{\link[stats]{xtabs}} and other will be coerced to
9+
#' \code{ftable} objects.
910
#' @param digits Amount of digits for the table percentage values.
1011
#'
1112
#' @return (Invisibly) returns a list with four tables:

R/std_b.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#' @description Returns the standardized beta coefficients, std. error and confidence intervals
44
#' of a fitted linear (mixed) models.
55
#'
6-
#' @param fit Fitted linear (mixed) model of class \code{lm} or
7-
#' \code{\link[lme4]{merMod}} (\CRANpkg{lme4} package).
6+
#' @param fit Fitted linear (mixed) model of class \code{lm} or \code{merMod}
7+
#' (\CRANpkg{lme4} package).
88
#' @param type If \code{fit} is of class \code{lm}, normal standardized coefficients
99
#' are computed by default. Use \code{type = "std2"} to follow
1010
#' \href{http://www.stat.columbia.edu/~gelman/research/published/standardizing7.pdf}{Gelman's (2008)}
@@ -31,7 +31,7 @@
3131
#' \cr \cr and \cr \cr
3232
#' \code{head(model.matrix(nlme::gls(neg_c_7 ~ as.factor(e42dep), data = efc, na.action = na.omit)))}.
3333
#' \cr \cr
34-
#' In such cases, use \code{\link{to_dummy}} to create dummies from
34+
#' In such cases, use \code{\link[sjmisc]{to_dummy}} to create dummies from
3535
#' factors.
3636
#'
3737
#' @references \href{http://en.wikipedia.org/wiki/Standardized_coefficient}{Wikipedia: Standardized coefficient}

R/weight.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#'
1616
#' @details \code{weight2()} sums up all \code{weights} values of the associated
1717
#' categories of \code{x}, whereas \code{weight()} uses a
18-
#' \code{\link{xtabs}} formula to weight cases. Thus, \code{weight()}
18+
#' \code{\link[stats]{xtabs}} formula to weight cases. Thus, \code{weight()}
1919
#' may return a vector of different length than \code{x}.
2020
#'
2121
#' @note The values of the returned vector are in sorted order, whereas the values'

R/xtab_statistics.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#' to be a data frame. If \code{x1} and \code{x2} are not specified,
1313
#' the first two columns of the data frames are used as variables
1414
#' to compute the crosstab.
15-
#' @param tab A \code{\link{table}} or \code{\link{ftable}}. Tables of class
16-
#' \code{\link{xtabs}} and other will be coerced to \code{\link{ftable}}
15+
#' @param tab A \code{\link{table}} or \code{\link[stats]{ftable}}. Tables of class
16+
#' \code{\link[stats]{xtabs}} and other will be coerced to \code{ftable}
1717
#' objects.
1818
#' @param x1 Name of first variable that should be used to compute the
1919
#' contingency table. If \code{data} is a table object, this argument

0 commit comments

Comments
 (0)