Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Sep 27, 2023
1 parent 9e5579b commit a630fe5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions R/get_predicted.R
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ get_predicted.phylolm <- function(x,

# Transform iterations
if ("iterations" %in% names(attributes(predictions))) {
attr(predictions, "iterations") <- as.data.frame(sapply(attributes(predictions)$iterations, link_inv))
attr(predictions, "iterations") <- as.data.frame(sapply(attributes(predictions)$iterations, link_inv)) # nolint
}

# Transform to response "type"
Expand All @@ -747,7 +747,7 @@ get_predicted.phylolm <- function(x,
predictions <- .get_predict_transform_response(predictions, response = response)
if ("iterations" %in% names(attributes(predictions))) {
attr(predictions, "iterations") <- as.data.frame(
sapply(
sapply( # nolint
attributes(predictions)$iterations,
.get_predict_transform_response,
response = response
Expand Down
8 changes: 4 additions & 4 deletions R/get_predicted_ci.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
#' @details
#' Typically, `get_predicted()` returns confidence intervals based on the standard
#' errors as returned by the `predict()`-function, assuming normal distribution
#' (`+/- 1.96 * SE`) resp. a Student's t-distribuion (if degrees of freedom are
#' (`+/- 1.96 * SE`) resp. a Student's t-distribution (if degrees of freedom are
#' available). If `predict()` for a certain class does _not_ return standard
#' errors (for example, *merMod*-objects), these are calculated manually, based
#' on following steps: matrix-multiply `X` by the parameter vector `B` to get the
#' predictions, then extract the variance-covariance matrix `V` of the parameters
#' and compute `XVX'` to get the variance-covariance matrix of the predictions.
#' The square-root of the diagonal of this matrix represent the standard errors
#' of the predictions, which are then multiplied by the critical test-statistic
#' value (e.g., ~1.96 for normal distribuion) for the confidence intervals.
#' value (e.g., ~1.96 for normal distribution) for the confidence intervals.
#'
#' If `ci_type = "prediction"`, prediction intervals are calculated. These are
#' wider than confidence intervals, because they also take into account the
Expand Down Expand Up @@ -301,7 +301,7 @@ get_predicted_ci.bracl <- get_predicted_ci.mlm
# for multiple length, SE and predictions may match, could be intended?
# could there be any cases where we have twice or x times the length of
# predictions as standard errors?
format_warning("Predictions and standard errors are not of the same length. Please check if you need the `data` argument.")
format_warning("Predictions and standard errors are not of the same length. Please check if you need the `data` argument.") # nolint
} else {
format_error("Predictions and standard errors are not of the same length. Please specify the `data` argument.")
}
Expand All @@ -325,7 +325,7 @@ get_predicted_ci.bracl <- get_predicted_ci.mlm
format_error("The `data` argument should be a data frame.")
}
mm <- get_modelmatrix(x, data = data)
out <- sapply(
out <- sapply( # nolint
seq_len(nrow(mm)), function(i) {
suppressMessages(
lmerTest::contestMD(x, mm[i, , drop = FALSE], ddf = type)[["DenDF"]]
Expand Down
4 changes: 2 additions & 2 deletions man/get_predicted_ci.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a630fe5

Please sign in to comment.