diff --git a/R/anova.R b/R/anova.R index e473456..73b64ec 100644 --- a/R/anova.R +++ b/R/anova.R @@ -1,8 +1,6 @@ #' ANOVA #' -#' Compute analysis of variance (or deviance) tables for two fitted, nested \code{uRegress} objects. The model with more -#' parameters is referred to as the full model (or the larger model), and the model with fewer -#' parameters is referred to as the null model (or the smaller model). +#' Compute analysis of variance (or deviance) tables for two fitted, nested \code{uRegress} objects. The model with more parameters is referred to as the full model (or the larger model), and the model with fewer parameters is referred to as the null model (or the smaller model). #' #' @param object an object of class \code{uRegress}, the model with fewer parameters (i.e. the null model). #' @param full_object an object of class \code{uRegress}, the model with more parameters (i.e. the full model). @@ -19,9 +17,11 @@ #' input \code{reg} is a hazard regression (i.e., \code{fnctl="hazard"}). #' @param ... argument to be passed in #' @return A list of class \code{anova.uRegress} with the following components: -#' \item{printMat}{A formatted table with inferential results (i.e., test statistics and p-values) for comparing two nested models.} -#' \item{null model}{The null model in the comparison.} -#' \item{full model}{The full model in the comparison.} +#' \describe{ +#' \item{printMat}{A formatted table with inferential results (i.e., test statistics and p-values) for comparing two nested models.} +#' \item{null_model}{The null model in the comparison.} +#' \item{full_model}{The full model in the comparison.} +#'} #' @examples #' # Loading required libraries #' library(sandwich) @@ -37,7 +37,6 @@ #' # Comparing the two models using the Wald test with robust SE #' anova(testReg_null, testReg_full, test = "Wald") -#' @rdname anova.uRegress #' @export anova.uRegress <- function(object, full_object, test="LRT", robustSE = TRUE, useFdstn = TRUE, ...){ diff --git a/R/data.R b/R/data.R index 824d888..951e838 100644 --- a/R/data.R +++ b/R/data.R @@ -3,8 +3,7 @@ #' Data from an observational study of the incidence of cardiovascular disease #' (especially heart attacks and congestive heart failure) and cerebrovascular disease #' (especially strokes) in the U.S. elderly. More information, including a coding key, -#' is available at -#' \url{https://rct-design.com/TeachingMaterials/Datasets/mri.txt}. +#' is available at rct-design.com (Teaching Materials, Datasets section). #' #' #' @format A data frame with 735 rows and 30 variables: @@ -116,7 +115,7 @@ #' to their death. If 0, the number of days in \code{obstime} is the number of #' days between that participant's MRI and September 16, 1997.} } #' -#' @source \url{https://rct-design.com/TeachingMaterials/Datasets/mri.txt} +#' @source Dataset originally distributed at rct-design.com (Teaching Materials, Datasets section). "mri" #' Salary dataset @@ -124,8 +123,7 @@ #' Data from a study of 1,597 faculty members at a single US university. Includes information on #' monthly salary each year from 1976 through 1995, as well as sex, highest degree attained, #' year of highest degree, field, year hired, rank, and administrative duties. -#' More information, including a coding key, is available at -#' \url{https://rct-design.com/TeachingMaterials/Datasets/salary.txt}. +#' More information, including a coding key, is available at rct-design.com (Teaching Materials, Datasets section). #' #' #' @format A data frame with 19792 rows and 11 variables: @@ -155,15 +153,14 @@ #' #' } #' -#' @source \url{https://rct-design.com/TeachingMaterials/Datasets/salary.txt} +#' @source Dataset originally distributed at rct-design.com (Teaching Materials, Datasets section). "salary" #' PSA dataset #' #' Data from a study of 50 men having hormonally treated prostate cancer. Includes information on #' PSA levels, tumor characteristics, remission status, age, and disease state. -#' More information, including a coding key, is available at -#' \url{https://rct-design.com/TeachingMaterials/Datasets/psa.txt}. +#' More information, including a coding key, is available at rct-design.com (Teaching Materials, Datasets section). #' #' #' @format A data frame with 50 rows and 9 variables: @@ -189,7 +186,7 @@ #' #' } #' -#' @source \url{https://rct-design.com/TeachingMaterials/Datasets/psa.txt} +#' @source Dataset originally distributed at rct-design.com (Teaching Materials, Datasets section). "psa" #' FEV dataset @@ -197,8 +194,7 @@ #' Data from a study of 654 children on the relationship between smoking status and #' lung function (measured by FEV). Each row corresponds to a single clinic visit and contains #' information on age, height, sex, FEV, and smoking status. -#' More information, including a coding key, is available at -#' \url{https://rct-design.com/TeachingMaterials/Datasets/fev.txt}. +#' More information, including a coding key, is available at rct-design.com (Teaching Materials, Datasets section). #' #' #' @format A data frame with 654 rows and 7 variables: @@ -219,5 +215,5 @@ #' \item{smoke}{smoking habits ("yes" or "no")} #' } #' -#' @source \url{https://rct-design.com/TeachingMaterials/Datasets/fev.txt} +#' @source Dataset originally distributed at rct-design.com (Teaching Materials, Datasets section). "fev" \ No newline at end of file diff --git a/R/dummy.R b/R/dummy.R index aa3dde2..db514b7 100755 --- a/R/dummy.R +++ b/R/dummy.R @@ -1,5 +1,6 @@ #' Create Dummy Variables #' +#' Creates dummy variables using a reference value. #' #' @param x \code{y} variable used to create the dummy #' variables. diff --git a/R/lincom.R b/R/lincom.R index 6506b71..7e44df3 100755 --- a/R/lincom.R +++ b/R/lincom.R @@ -34,11 +34,12 @@ #' \code{lincom.joint} (\code{joint.test} is \code{True}). For the \code{lincom} class, #' \code{comb} entries in the list are labeled \code{comb1}, \code{comb2}, etc. for as many linear combinations were used. #' Each is a list with the following components: +#' \describe{ #' \item{printMat}{A formatted table with inferential results for the linear combination of coefficients. #' These include the point estimate, standard error, confidence interval, and t-test for the linear #' combination.} #' \item{nms}{The name of the linear combination, for printing.} -#' \item{null.hypoth}{The null hypothesis for the linear combination.} +#' \item{null.hypoth}{The null hypothesis for the linear combination.}} #' #' @examples #' # Loading required libraries diff --git a/R/proptest.R b/R/proptest.R index ebe335a..5f83c8b 100644 --- a/R/proptest.R +++ b/R/proptest.R @@ -34,6 +34,7 @@ #' #' @return A list of class \code{proptest}. The print method lays out the information in an easy-to-read #' format. +#' \describe{ #' \item{tab}{A formatted table of descriptive and inferential results (total number of observations, #' number of missing observations, sample proportion, standard error of the proportion estimate), #' along with a confidence interval for the underlying proportion.} @@ -45,7 +46,7 @@ #' \item{var2}{The user-supplied second data vector. } #' \item{by}{The user-supplied stratification variable.} #' \item{par}{A vector of information about the type of test (null hypothesis, alternative hypothesis, etc.)} - +#' } #' #' @seealso \code{\link[stats]{prop.test}} #' @examples diff --git a/R/proptesti.R b/R/proptesti.R index 01a6f9a..9f7e2b8 100644 --- a/R/proptesti.R +++ b/R/proptesti.R @@ -30,6 +30,7 @@ #' #' @return A list of class \code{proptesti}. The print method lays out the information in an easy-to-read #' format. +#' \describe{ #' \item{tab}{A formatted table of descriptive and inferential results (total number of observations, #' sample proportion, standard error of the proportion estimate), #' along with a confidence interval for the underlying proportion.} @@ -38,6 +39,7 @@ #' \item{pval}{the p-value #' for the test} #' \item{par}{A vector of information about the type of test (null hypothesis, alternative hypothesis, etc.)} +#' } #' #' @examples #' # Two-sample test diff --git a/R/ttest.R b/R/ttest.R index 9d9e33b..6be9609 100644 --- a/R/ttest.R +++ b/R/ttest.R @@ -38,6 +38,7 @@ #' #' @return a list of class \code{ttest}. The print method lays out the information in an easy-to-read #' format. +#' \describe{ #' \item{tab}{A formatted table of descriptive and inferential statistics (total number of observations, #' number of missing observations, mean, standard error of the mean estimate, standard deviation), #' along with a confidence interval for the mean.} @@ -50,6 +51,7 @@ #' \item{par}{A vector of information about the type of test (null hypothesis, alternative hypothesis, etc.)} #' \item{geo}{A formatted table of descriptive and inferential statistics for the geometric mean.} #' \item{call}{The call made to the \code{ttest} function.} +#' } #' #' @seealso \code{\link[stats]{t.test}} #' diff --git a/R/ttesti.R b/R/ttesti.R index bce6c18..66325ed 100755 --- a/R/ttesti.R +++ b/R/ttesti.R @@ -37,6 +37,7 @@ #' #' @return a list of class \code{ttesti}. The print method lays out the information in an easy-to-read #' format. +#' \describe{ #' \item{tab}{A formatted table of descriptive and inferential statistics (number of observations, #' mean, standard error of the mean estimate, standard deviation), #' along with a confidence interval for the mean.} @@ -46,6 +47,7 @@ #' \item{par}{A vector of information about the type of test (null hypothesis, alternative hypothesis, etc.)} #' \item{twosamp}{A logical value indicating whether a two-sample test was performed.} #' \item{call}{The call made to the \code{ttesti} function.} +#' } #' #' @examples #' diff --git a/R/wilcoxon.R b/R/wilcoxon.R index 02c0cea..58ddc58 100755 --- a/R/wilcoxon.R +++ b/R/wilcoxon.R @@ -36,6 +36,7 @@ #' @return A list of class \code{wilcoxon} #' is returned. The print method lays out the information in an easy-to-read #' format. +#' \describe{ #' \item{statistic}{the value of the test #' statistic with a name describing it.} #' \item{parameter}{the parameter(s) for @@ -60,6 +61,7 @@ #' hypotheses, for printing.} #' \item{inf}{a formatted table of inference values, #' for printing.} +#' } #' #' @seealso \code{\link[stats]{wilcox.test}} #' @examples diff --git a/man/anova.uRegress.Rd b/man/anova.uRegress.Rd index a1db73f..868a457 100644 --- a/man/anova.uRegress.Rd +++ b/man/anova.uRegress.Rd @@ -29,14 +29,14 @@ input \code{reg} is a hazard regression (i.e., \code{fnctl="hazard"}).} } \value{ A list of class \code{anova.uRegress} with the following components: -\item{printMat}{A formatted table with inferential results (i.e., test statistics and p-values) for comparing two nested models.} -\item{null model}{The null model in the comparison.} -\item{full model}{The full model in the comparison.} +\describe{ + \item{printMat}{A formatted table with inferential results (i.e., test statistics and p-values) for comparing two nested models.} + \item{null_model}{The null model in the comparison.} + \item{full_model}{The full model in the comparison.} +} } \description{ -Compute analysis of variance (or deviance) tables for two fitted, nested \code{uRegress} objects. The model with more -parameters is referred to as the full model (or the larger model), and the model with fewer -parameters is referred to as the null model (or the smaller model). +Compute analysis of variance (or deviance) tables for two fitted, nested \code{uRegress} objects. The model with more parameters is referred to as the full model (or the larger model), and the model with fewer parameters is referred to as the null model (or the smaller model). } \examples{ # Loading required libraries diff --git a/man/dummy.Rd b/man/dummy.Rd index 60ba5c5..82456a0 100644 --- a/man/dummy.Rd +++ b/man/dummy.Rd @@ -28,7 +28,7 @@ A matrix containing the dummy variables. } \description{ -Create Dummy Variables +Creates dummy variables using a reference value. } \examples{ diff --git a/man/fev.Rd b/man/fev.Rd index 5869591..e1c6993 100644 --- a/man/fev.Rd +++ b/man/fev.Rd @@ -24,7 +24,7 @@ A data frame with 654 rows and 7 variables: } } \source{ -\url{https://rct-design.com/TeachingMaterials/Datasets/fev.txt} +Dataset originally distributed at rct-design.com (Teaching Materials, Datasets section). } \usage{ fev @@ -33,7 +33,6 @@ fev Data from a study of 654 children on the relationship between smoking status and lung function (measured by FEV). Each row corresponds to a single clinic visit and contains information on age, height, sex, FEV, and smoking status. -More information, including a coding key, is available at -\url{https://rct-design.com/TeachingMaterials/Datasets/fev.txt}. +More information, including a coding key, is available at rct-design.com (Teaching Materials, Datasets section). } \keyword{datasets} diff --git a/man/lincom.Rd b/man/lincom.Rd index 65d48ce..bfa11c3 100644 --- a/man/lincom.Rd +++ b/man/lincom.Rd @@ -55,11 +55,12 @@ A list of class \code{lincom} (\code{joint.test} is \code{False}) or \code{lincom.joint} (\code{joint.test} is \code{True}). For the \code{lincom} class, \code{comb} entries in the list are labeled \code{comb1}, \code{comb2}, etc. for as many linear combinations were used. Each is a list with the following components: +\describe{ \item{printMat}{A formatted table with inferential results for the linear combination of coefficients. These include the point estimate, standard error, confidence interval, and t-test for the linear combination.} \item{nms}{The name of the linear combination, for printing.} -\item{null.hypoth}{The null hypothesis for the linear combination.} +\item{null.hypoth}{The null hypothesis for the linear combination.}} } \description{ Produces point estimates, interval estimates, and p-values for linear diff --git a/man/mri.Rd b/man/mri.Rd index a5986dc..12512fc 100644 --- a/man/mri.Rd +++ b/man/mri.Rd @@ -115,7 +115,7 @@ to their death. If 0, the number of days in \code{obstime} is the number of days between that participant's MRI and September 16, 1997.} } } \source{ -\url{https://rct-design.com/TeachingMaterials/Datasets/mri.txt} +Dataset originally distributed at rct-design.com (Teaching Materials, Datasets section). } \usage{ mri @@ -124,7 +124,6 @@ mri Data from an observational study of the incidence of cardiovascular disease (especially heart attacks and congestive heart failure) and cerebrovascular disease (especially strokes) in the U.S. elderly. More information, including a coding key, - is available at -\url{https://rct-design.com/TeachingMaterials/Datasets/mri.txt}. + is available at rct-design.com (Teaching Materials, Datasets section). } \keyword{datasets} diff --git a/man/proptest.Rd b/man/proptest.Rd index c1173b8..e5b3abe 100644 --- a/man/proptest.Rd +++ b/man/proptest.Rd @@ -55,6 +55,7 @@ Non-integers are automatically rounded down.} \value{ A list of class \code{proptest}. The print method lays out the information in an easy-to-read format. +\describe{ \item{tab}{A formatted table of descriptive and inferential results (total number of observations, number of missing observations, sample proportion, standard error of the proportion estimate), along with a confidence interval for the underlying proportion.} @@ -67,6 +68,7 @@ for the test} \item{by}{The user-supplied stratification variable.} \item{par}{A vector of information about the type of test (null hypothesis, alternative hypothesis, etc.)} } +} \description{ Performs a one- or two-sample test of proportions using data. This test can be approximate or exact. } diff --git a/man/proptesti.Rd b/man/proptesti.Rd index 83c12c6..6ee0351 100644 --- a/man/proptesti.Rd +++ b/man/proptesti.Rd @@ -54,6 +54,7 @@ Non-integers are automatically rounded down.} \value{ A list of class \code{proptesti}. The print method lays out the information in an easy-to-read format. +\describe{ \item{tab}{A formatted table of descriptive and inferential results (total number of observations, sample proportion, standard error of the proportion estimate), along with a confidence interval for the underlying proportion.} @@ -63,6 +64,7 @@ statistic, if using an approximate test.} for the test} \item{par}{A vector of information about the type of test (null hypothesis, alternative hypothesis, etc.)} } +} \description{ Performs a one- or two-sample test of proportions using counts of successes and trials, rather than binary data. This test can be approximate or exact. diff --git a/man/psa.Rd b/man/psa.Rd index 02fcd0d..6cee23d 100644 --- a/man/psa.Rd +++ b/man/psa.Rd @@ -29,7 +29,7 @@ A data frame with 50 rows and 9 variables: } } \source{ -\url{https://rct-design.com/TeachingMaterials/Datasets/psa.txt} +Dataset originally distributed at rct-design.com (Teaching Materials, Datasets section). } \usage{ psa @@ -37,7 +37,6 @@ psa \description{ Data from a study of 50 men having hormonally treated prostate cancer. Includes information on PSA levels, tumor characteristics, remission status, age, and disease state. -More information, including a coding key, is available at -\url{https://rct-design.com/TeachingMaterials/Datasets/psa.txt}. +More information, including a coding key, is available at rct-design.com (Teaching Materials, Datasets section). } \keyword{datasets} diff --git a/man/salary.Rd b/man/salary.Rd index af06f27..9e6b2a6 100644 --- a/man/salary.Rd +++ b/man/salary.Rd @@ -33,7 +33,7 @@ A data frame with 19792 rows and 11 variables: } } \source{ -\url{https://rct-design.com/TeachingMaterials/Datasets/salary.txt} +Dataset originally distributed at rct-design.com (Teaching Materials, Datasets section). } \usage{ salary @@ -42,7 +42,6 @@ salary Data from a study of 1,597 faculty members at a single US university. Includes information on monthly salary each year from 1976 through 1995, as well as sex, highest degree attained, year of highest degree, field, year hired, rank, and administrative duties. -More information, including a coding key, is available at -\url{https://rct-design.com/TeachingMaterials/Datasets/salary.txt}. +More information, including a coding key, is available at rct-design.com (Teaching Materials, Datasets section). } \keyword{datasets} diff --git a/man/ttest.Rd b/man/ttest.Rd index a8c065c..649d363 100644 --- a/man/ttest.Rd +++ b/man/ttest.Rd @@ -61,6 +61,7 @@ Non-integers are automatically rounded down.} \value{ a list of class \code{ttest}. The print method lays out the information in an easy-to-read format. +\describe{ \item{tab}{A formatted table of descriptive and inferential statistics (total number of observations, number of missing observations, mean, standard error of the mean estimate, standard deviation), along with a confidence interval for the mean.} @@ -74,6 +75,7 @@ along with a confidence interval for the mean.} \item{geo}{A formatted table of descriptive and inferential statistics for the geometric mean.} \item{call}{The call made to the \code{ttest} function.} } +} \description{ Performs a one- or two-sample t-test using data. In the two-sample case, the user can specify whether or not observations are matched, and whether or not equal variances diff --git a/man/ttesti.Rd b/man/ttesti.Rd index b30592a..e95efb3 100644 --- a/man/ttesti.Rd +++ b/man/ttesti.Rd @@ -61,6 +61,7 @@ Non-integers are automatically rounded down.} \value{ a list of class \code{ttesti}. The print method lays out the information in an easy-to-read format. +\describe{ \item{tab}{A formatted table of descriptive and inferential statistics (number of observations, mean, standard error of the mean estimate, standard deviation), along with a confidence interval for the mean.} @@ -71,6 +72,7 @@ along with a confidence interval for the mean.} \item{twosamp}{A logical value indicating whether a two-sample test was performed.} \item{call}{The call made to the \code{ttesti} function.} } +} \description{ Performs a one- or two-sample t-test given summary statistics. In the two-sample case, the user can specify diff --git a/man/wilcoxon.Rd b/man/wilcoxon.Rd index 500a5ec..af900ea 100644 --- a/man/wilcoxon.Rd +++ b/man/wilcoxon.Rd @@ -53,6 +53,7 @@ interval. Defaults to 0.95.} A list of class \code{wilcoxon} is returned. The print method lays out the information in an easy-to-read format. +\describe{ \item{statistic}{the value of the test statistic with a name describing it.} \item{parameter}{the parameter(s) for @@ -78,6 +79,7 @@ hypotheses, for printing.} \item{inf}{a formatted table of inference values, for printing.} } +} \description{ Performs Wilcoxon signed rank test or Mann-Whitney-Wilcoxon rank sum test depending on data and logicals entered. Relies heavily on the function