Skip to content

Commit

Permalink
Merge pull request #46 from arcaldwell49/docs-lifecycle
Browse files Browse the repository at this point in the history
Docs lifecycle
  • Loading branch information
arcaldwell49 authored Jan 30, 2024
2 parents a80a946 + fe31dc8 commit 2e941a7
Show file tree
Hide file tree
Showing 110 changed files with 1,278 additions and 1,216 deletions.
7 changes: 5 additions & 2 deletions R/agree_coef.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#' Agreeement Coefficents
#' @description agree_coef produces inter-rater reliability or "agreement coefficients" as described by Gwet.
#' @title Agreement Coefficents
#' @description
#' `r lifecycle::badge('maturing')`
#'
#' agree_coef produces inter-rater reliability or "agreement coefficients" as described by Gwet.
#' @param measure Name of column containing the measurement of interest.
#' @param item Name of column containing the items. If this is an inter-rater reliability study then this would indicate the rater (e.g., rater1, rater2, rater3, etc).
#' @param id Column with subject identifier.
Expand Down
2 changes: 1 addition & 1 deletion R/agree_nest.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ agree_nest <- function(x,
TOST = TRUE,
prop_bias = FALSE,
ccc = TRUE){

lifecycle::deprecate_soft("0.2.0", "agree_nest()", "agreement_limit()")
agreeq = qnorm(1 - (1 - agree.level) / 2)
agree_l = 1 - (1 - agree.level) / 2
agree_u = (1 - agree.level) / 2
Expand Down
2 changes: 1 addition & 1 deletion R/agree_np.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Nonparametric Test for Limits of Agreement
#' @title Nonparametric Test for Limits of Agreement
#'
#' @description
#'
Expand Down
1 change: 1 addition & 0 deletions R/agree_reps.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ agree_reps <- function(x,
prop_bias = FALSE,
TOST = TRUE,
ccc = TRUE){
lifecycle::deprecate_soft("0.2.0", "agree_reps()", "agreement_limit()")

agreeq = qnorm(1 - (1 - agree.level) / 2)
agree.l = 1 - (1 - agree.level) / 2
Expand Down
1 change: 1 addition & 0 deletions R/agree_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ agree_test <- function(x,
agree.level = .95,
TOST = TRUE,
prop_bias = FALSE) {
lifecycle::deprecate_soft("0.2.0", "agree_test()", "agreement_limit()")
est <- lower.ci <- upper.ci <- NULL
if (agree.level >= 1 || agree.level <= 0) {

Expand Down
2 changes: 1 addition & 1 deletion R/agreement_limit.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Calculate the Limits of Agreement
#' @title Limits of Agreement
#'
#' @description
#' `r lifecycle::badge('maturing')`
Expand Down
3 changes: 2 additions & 1 deletion R/blandPowerCurve.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#' Estimate power curve for Bland-Altman limits of agreement
#' @title Power Curve for Bland-Altman Limits of Agreement
#'
#' @description
#' `r lifecycle::badge('maturing')`
#' This function calculates the power for the Bland-Altman method under varying parameter settings and for a range of sample sizes.
#'
#' @param samplesizes vector of samples sizes at which to estimate power.
Expand Down
18 changes: 10 additions & 8 deletions R/dem_reg.R
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
#' Deming Regression
#' @title Deming Regression
#'
#' @description
#'
#' `r lifecycle::badge('stable')`
#'
#' A function for fitting a straight line to two-dimensional data (i.e., X and Y) are measured with error.
#' A function for fitting a straight line to two-dimensional data (i.e., X and Y) that are measured with error.
#'
#' @param x Name of column with first measurement
#' @param x Name of column with first measurement.
#' @param y Name of other column with the other measurement to compare to the first.
#' @param id Column with subject identifier
#' @param data Data frame with all data
#' @param id Column with subject identifier.
#' @param data Data frame with all data.
#' @param conf.level The confidence level required. Default is 95%.
#' @param weighted Logical indicator (TRUE/FALSE) for whether to use weighted Deming regression. Default is FALSE.
#' @param weights an optional vector of weights to be used in the fitting process. Should be NULL or a numeric vector.
#' @param error.ratio Ratio of the two error variances. Default is 1. This argument is ignored if subject identifiers are provided.
#' @param keep_data Logical indicator (TRUE/FALSE). If TRUE the jacknife samples are returned; default is FALSE.
#' @param keep_data Logical indicator (TRUE/FALSE). If TRUE, the jacknife samples are returned; default is FALSE. Users may wish to set to FALSE if data is especially large.
#' @details
#'
#' This function provides a Deming regression analysis wherein the sum of distances in both x and y direction is minimized.
#' Deming is useful in situations where both X & Y are measured with error.
#' Deming regression, also known as error-in-variable regression, is useful in situations where both X & Y are measured with error.
#' The use of Deming regression is beneficial when comparing to methods for measuring the same continuous variable.
#'
#' Currently, the dem_reg function covers simple Deming regression and weighted Deming regression.
#' Weighted Deming regression can be used by setting weighted to TRUE.
#' Weighted Deming regression can be used by setting the weighted argument to TRUE.
#' The weights can be provided by the user or can be calculated within function.
#'
#' If the data are measured in replicates, then the measurement error can be directly derived from the data.
Expand Down
3 changes: 2 additions & 1 deletion R/loa_mixed.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Mixed Effects Limits of Agreement
#' @title Mixed Effects Limits of Agreement
#'
#' @description
#' `r lifecycle::badge('deprecated')`
Expand Down Expand Up @@ -50,6 +50,7 @@ loa_mixed = function(diff,
agree.level = .95,
replicates = 1999,
type = "bca"){
lifecycle::deprecate_warn("0.2.0", "loa_mixed()", "loa_lme()")
if (conf.level >= 1 || conf.level <= 0) {
stop("conf.level must be a value between 0 and 1")
}
Expand Down
4 changes: 2 additions & 2 deletions R/methods.simple_agree.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' \describe{
#' \item{\code{print}}{Prints short summary of the Limits of Agreement}
#' \item{\code{plot}}{Returns a plot of the limits of agreement (type = 1) or concordance plot (type = 2)}
#' \item{\code{check}}{Returns 2 plots, p_norm and p_het, testing the assumptions of a Bland-Altman analysis. P-values for the normality and heteroskedascity tests are provided as captions to the plot.}
#' \item{\code{check}}{Returns 2 plots, p_norm and p_het, testing the assumptions of a Bland-Altman analysis. P-values for the normality and heteroskedasticity tests are provided as captions to the plot.}
#' }
#'
#' @name simple_agree-methods
Expand Down Expand Up @@ -221,7 +221,7 @@ check.simple_agree <- function(x) {
}

dat = df
## Heteroskedasticity -------
## heteroskedasticity -------
mod_check = if (as.character(x$call[1]) != "agree_test" && as.character(x$call[1]) != "SimplyAgree::agree_test") {
lme4::lmer(data = dat,
form_lmer1)
Expand Down
4 changes: 2 additions & 2 deletions R/methods.tolerance_delta.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' \describe{
#' \item{\code{print}}{Prints short summary of the tolerance limits.}
#' \item{\code{plot}}{Returns a plot of the tolerance limits.}
#' \item{\code{check}}{Returns plots testing the assumptions of the model. P-values for the normality and heteroskedascity tests are provided as captions to the plot.}
#' \item{\code{check}}{Returns plots testing the assumptions of the model. P-values for the normality and heteroskedasticity tests are provided as captions to the plot.}
#' }
#'
#' @name tolerance_delta-methods
Expand Down Expand Up @@ -402,7 +402,7 @@ check.tolerance_delta <- function(x) {

dat = model.frame(x$call$lm_mod)
colnames(dat) = c("y","x","id","mean","delta","condition","time")
## Heteroskedasticity -------
## heteroskedasticity -------

#stan_res = residuals(x$model, type = "pearson")
#df_het = x$model$dims[["N"]] - x$model$dims[["p"]]
Expand Down
12 changes: 6 additions & 6 deletions R/reli_stats.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Reliability Statistics
#' @title Reliability Statistics
#'
#' @description
#'
Expand All @@ -8,10 +8,10 @@
#' This includes intraclass correlation coefficients, the coefficient of variation,
#' and the standard MSE of measurement.
#'
#' @param measure Name of column containing the measurement of interest
#' @param item Name of column containing the items. If this is a test-retest reliability study then this would indicate the time point (e.g., time1,time2, time3, etc.)
#' @param id Column with subject identifier
#' @param data Data frame with all data
#' @param measure Name of column containing the measurement of interest.
#' @param item Name of column containing the items. If this is a test-retest reliability study then this would indicate the time point (e.g., time1,time2, time3, etc.).
#' @param id Column with subject identifier.
#' @param data Data frame with all data.
#' @param wide Logical value (TRUE or FALSE) indicating if data is in a "wide" format. Default is TRUE.
#' @param col.names If wide is equal to TRUE then col.names is a list of the column names containing the measurements for reliability analysis.
#' @param conf.level the confidence level required. Default is 95%.
Expand Down Expand Up @@ -60,7 +60,7 @@
#' - `cv`: Coefficient of Variation
#' - `SEM`: List with Standard MSE of Measurement estimate (est)
#' - `SEE`: List with Standard MSE of the Estimate estimate (est)
#' - `SEP`: List with Standard MSE of Predicitions (est)
#' - `SEP`: List with Standard MSE of Predictions (est)
#' - `call`: the matched call

#' @examples
Expand Down
6 changes: 3 additions & 3 deletions R/tolerance_limit.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#' Tolerance Limits from an Agreement Study
#' @title Tolerance Limits from an Agreement Study
#'
#' @description `r lifecycle::badge('maturing')`
#'
#' A function for calculating tolerance limits for the difference between two measurements (difference = x-y).
#' This is a procedure that should produce results similar to the Bland-Altman limits of agreement.
#' See `vignette("agreement_analysis")` for more details.
#' See vignettes for more details.
#'
#' @param data A data frame containing the variables.
#' @param x Name of the column for the first measurement.
Expand All @@ -19,7 +19,7 @@
#' @param log_tf Calculate limits of agreement using log-transformed data.
#' @param cor_type The type of correlation structure. "sym" is for Compound Symmetry, "car1" is for continuous autocorrelation structure of order 1, or "ar1" for autocorrelation structure of order 1.
#' @param correlation an optional corStruct object describing the within-group correlation structure that overrides the default setting. See the documentation of corClasses for a description of the available corStruct classes. If a grouping variable is to be used, it must be specified in the form argument to the corStruct constructor. Defaults to NULL.
#' @param weights an optional varFunc object or one-sided formula describing the within-group heteroscedasticity structure that overrides the default setting. If given as a formula, it is used as the argument to varFixed, corresponding to fixed variance weights. See the documentation on varClasses for a description of the available varFunc classes.
#' @param weights an optional varFunc object or one-sided formula describing the within-group heteroskedasticity structure that overrides the default setting. If given as a formula, it is used as the argument to varFixed, corresponding to fixed variance weights. See the documentation on varClasses for a description of the available varFunc classes.
#' @param keep_model Logical indicator to retain the GLS model. Useful when working with large data and the model is very large.
#' @inheritParams loa_lme
#' @details The tolerance limits calculated in this function are based on the papers by Francq & Govaerts (2016), Francq, et al. (2019), and Francq, et al. (2020).
Expand Down
6 changes: 3 additions & 3 deletions docs/404.html

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

6 changes: 3 additions & 3 deletions docs/CODE_OF_CONDUCT.html

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

6 changes: 3 additions & 3 deletions docs/LICENSE.html

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

Loading

0 comments on commit 2e941a7

Please sign in to comment.