Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions R/anova.R
Original file line number Diff line number Diff line change
@@ -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).
Expand All @@ -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)
Expand All @@ -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, ...){

Expand Down
20 changes: 8 additions & 12 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -116,16 +115,15 @@
#' 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
#'
#' 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:
Expand Down Expand Up @@ -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:
Expand All @@ -189,16 +186,15 @@
#'
#' }
#'
#' @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
#'
#' 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:
Expand All @@ -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"
1 change: 1 addition & 0 deletions R/dummy.R
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 2 additions & 1 deletion R/lincom.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion R/proptest.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.}
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions R/proptesti.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.}
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions R/ttest.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.}
Expand All @@ -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}}
#'
Expand Down
2 changes: 2 additions & 0 deletions R/ttesti.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.}
Expand All @@ -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
#'
Expand Down
2 changes: 2 additions & 0 deletions R/wilcoxon.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -60,6 +61,7 @@
#' hypotheses, for printing.}
#' \item{inf}{a formatted table of inference values,
#' for printing.}
#' }
#'
#' @seealso \code{\link[stats]{wilcox.test}}
#' @examples
Expand Down
12 changes: 6 additions & 6 deletions man/anova.uRegress.Rd

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

2 changes: 1 addition & 1 deletion man/dummy.Rd

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

5 changes: 2 additions & 3 deletions man/fev.Rd

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

3 changes: 2 additions & 1 deletion man/lincom.Rd

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

5 changes: 2 additions & 3 deletions man/mri.Rd

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

2 changes: 2 additions & 0 deletions man/proptest.Rd

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

2 changes: 2 additions & 0 deletions man/proptesti.Rd

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

5 changes: 2 additions & 3 deletions man/psa.Rd

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

5 changes: 2 additions & 3 deletions man/salary.Rd

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

2 changes: 2 additions & 0 deletions man/ttest.Rd

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

2 changes: 2 additions & 0 deletions man/ttesti.Rd

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

Loading
Loading