From f8d3d4178767ea7b4404aa850d0a3123fce259db Mon Sep 17 00:00:00 2001 From: Jack Leary Date: Fri, 11 Oct 2024 09:18:40 -0400 Subject: [PATCH] reformatted inline roxygen docs --- NAMESPACE | 1 - R/backward_sel_WIC.R | 2 +- R/biasCorrectGEE.R | 2 +- R/bootstrapRandomEffects.R | 2 +- R/chooseCandidateGenes.R | 2 +- R/createCellOffset.R | 2 +- R/createSlopeTestData.R | 2 +- R/embedGenes.R | 2 +- R/enrichDynamicGenes.R | 2 +- R/extractBreakpoints.R | 2 +- R/fitGLMM.R | 2 +- R/geneProgramDrivers.R | 2 +- R/geneProgramScoring.R | 3 ++- R/geneProgramSignificance.R | 2 +- R/getFittedValues.R | 2 +- R/getKnotDist.R | 2 +- R/getResultsDE.R | 2 +- R/marge2.R | 3 ++- R/max_span.R | 3 ++- R/min_span.R | 3 ++- R/modelLRT.R | 2 +- R/nbGAM.R | 2 +- R/npConvolve.R | 2 +- R/plotClusteredGenes.R | 2 +- R/plotModelCoefs.R | 2 +- R/plotModels.R | 2 +- R/score_fun_gee.R | 2 +- R/score_fun_glm.R | 2 +- R/smoothedCountsMatrix.R | 2 +- R/sortGenesHeatmap.R | 2 +- R/sortObservations.R | 2 +- R/stat_out.R | 7 ++++--- R/stat_out_score_gee_null.R | 2 +- R/stat_out_score_glm_null.R | 2 +- R/stripGLM.R | 2 +- R/summarizeModel.R | 2 +- R/testDynamic.R | 2 +- R/testSlope.R | 2 +- R/theme_scLANE.R | 2 +- R/tp1.R | 3 ++- R/tp2.R | 3 ++- R/waldTestGEE.R | 2 +- man/backward_sel_WIC.Rd | 2 +- man/biasCorrectGEE.Rd | 2 +- man/bootstrapRandomEffects.Rd | 2 +- man/chooseCandidateGenes.Rd | 2 +- man/createCellOffset.Rd | 2 +- man/createSlopeTestData.Rd | 2 +- man/embedGenes.Rd | 2 +- man/enrichDynamicGenes.Rd | 2 +- man/extractBreakpoints.Rd | 2 +- man/fitGLMM.Rd | 2 +- man/geneProgramDrivers.Rd | 2 +- man/geneProgramScoring.Rd | 2 +- man/geneProgramSignificance.Rd | 2 +- man/getFittedValues.Rd | 2 +- man/getKnotDist.Rd | 2 +- man/getResultsDE.Rd | 2 +- man/marge2.Rd | 4 +++- man/max_span.Rd | 4 +++- man/min_span.Rd | 4 +++- man/modelLRT.Rd | 2 +- man/nbGAM.Rd | 2 +- man/npConvolve.Rd | 2 +- man/plotClusteredGenes.Rd | 2 +- man/plotModelCoefs.Rd | 2 +- man/plotModels.Rd | 2 +- man/score_fun_gee.Rd | 2 +- man/score_fun_glm.Rd | 2 +- man/smoothedCountsMatrix.Rd | 2 +- man/sortGenesHeatmap.Rd | 2 +- man/sortObservations.Rd | 2 +- man/stat_out.Rd | 2 +- man/stat_out_score_gee_null.Rd | 2 +- man/stat_out_score_glm_null.Rd | 2 +- man/stripGLM.Rd | 2 +- man/summarizeModel.Rd | 2 +- man/testDynamic.Rd | 2 +- man/testSlope.Rd | 2 +- man/theme_scLANE.Rd | 2 +- man/tp1.Rd | 4 +++- man/tp2.Rd | 4 +++- man/waldTestGEE.Rd | 2 +- 83 files changed, 101 insertions(+), 85 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 3f4de44..3c85fd4 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -138,7 +138,6 @@ importFrom(stats,fitted) importFrom(stats,fitted.values) importFrom(stats,hclust) importFrom(stats,kmeans) -importFrom(stats,lm.fit) importFrom(stats,logLik) importFrom(stats,offset) importFrom(stats,p.adjust) diff --git a/R/backward_sel_WIC.R b/R/backward_sel_WIC.R index fdbe206..ad11f1b 100644 --- a/R/backward_sel_WIC.R +++ b/R/backward_sel_WIC.R @@ -3,7 +3,7 @@ #' @name backward_sel_WIC #' @author Jakub Stoklosa #' @author David I. Warton -#' @author Jack Leary +#' @author Jack R. Leary #' @importFrom gamlss gamlss #' @importFrom geeM geem #' @importFrom MASS negative.binomial diff --git a/R/biasCorrectGEE.R b/R/biasCorrectGEE.R index dca7588..98eed44 100644 --- a/R/biasCorrectGEE.R +++ b/R/biasCorrectGEE.R @@ -1,7 +1,7 @@ #' Bias-correct the GEE sandwich variance-covariance matrix. #' #' @name biasCorrectGEE -#' @author Jack Leary +#' @author Jack R. Leary #' @description This functions implements several bias-correction methods for the GEE sandwich variance-covariance matrix; they are to be used when the number of subjects is small or the numer of timepoints per-subject is very large. #' @importFrom stats fitted.values cor #' @importFrom dplyr with_groups summarise diff --git a/R/bootstrapRandomEffects.R b/R/bootstrapRandomEffects.R index 72d6511..2fdac60 100644 --- a/R/bootstrapRandomEffects.R +++ b/R/bootstrapRandomEffects.R @@ -1,7 +1,7 @@ #' Generate bootstrapped confidence intervals for random effects. #' #' @name bootstrapRandomEffects -#' @author Jack Leary +#' @author Jack R. Leary #' @description This function leverages the parametric bootstrap to generate empirical confidence intervals for the random effects terms of a fitted model. #' @importFrom stats simulate update quantile #' @importFrom dplyr mutate with_groups summarise if_else diff --git a/R/chooseCandidateGenes.R b/R/chooseCandidateGenes.R index 28ff66d..a5c5ba1 100644 --- a/R/chooseCandidateGenes.R +++ b/R/chooseCandidateGenes.R @@ -1,7 +1,7 @@ #' Choose candidate genes for trajectory DE analysis. #' #' @name chooseCandidateGenes -#' @author Jack Leary +#' @author Jack R. Leary #' @description This function identifies good gene candidates for trajectory differential expression modeling by ranking genes based on their mean expression, SD of expression, and sparsity across cells. #' @importFrom purrr map reduce #' @importFrom Matrix Matrix rowMeans diff --git a/R/createCellOffset.R b/R/createCellOffset.R index 4576e3c..635e588 100644 --- a/R/createCellOffset.R +++ b/R/createCellOffset.R @@ -1,7 +1,7 @@ #' Create an offset vector before modeling. #' #' @name createCellOffset -#' @author Jack Leary +#' @author Jack R. Leary #' @importFrom Matrix colSums #' @description Creates a vector of per-cell size factors to be used as input to \code{\link{testDynamic}} as a model offset given a variety of inputs. #' @param expr.mat Either a (sparse or dense) matrix of raw integer counts (cells as columns), a \code{Seurat} object, or a \code{SingleCellExperiment} object. Defaults to NULL. diff --git a/R/createSlopeTestData.R b/R/createSlopeTestData.R index 46c9f29..dab185e 100644 --- a/R/createSlopeTestData.R +++ b/R/createSlopeTestData.R @@ -1,7 +1,7 @@ #' A helper function to create a dataframe of breakpoints and associated \emph{p}-values from a \code{marge} model. #' #' @name createSlopeTestData -#' @author Jack Leary +#' @author Jack R. Leary #' @description Creates a data.frame of \code{marge} model breakpoints, \emph{p}-values, and other info. #' @importFrom purrr map_dbl #' @param marge.model A \code{marge} model object, like those returned from \code{\link{marge2}}. Defaults to NULL. diff --git a/R/embedGenes.R b/R/embedGenes.R index 1c2c0f5..bcc28a7 100644 --- a/R/embedGenes.R +++ b/R/embedGenes.R @@ -1,7 +1,7 @@ #' Generate PCA & UMAP embeddings of fitted gene dynamics. #' #' @name embedGenes -#' @author Jack Leary +#' @author Jack R. Leary #' @import magrittr #' @importFrom purrr map map_dbl #' @importFrom dplyr bind_cols diff --git a/R/enrichDynamicGenes.R b/R/enrichDynamicGenes.R index 654e60d..551e26e 100644 --- a/R/enrichDynamicGenes.R +++ b/R/enrichDynamicGenes.R @@ -1,7 +1,7 @@ #' Perform GSEA on dynamic genes identified by \code{scLANE}. #' #' @name enrichDynamicGenes -#' @author Jack Leary +#' @author Jack R. Leary #' @description This function uses the \code{gprofiler2} package to perform pathway analysis on a set of genes from one or more lineages that were determined to be dynamic with \code{\link{testDynamic}}. #' @import magrittr #' @importFrom dplyr filter arrange desc distinct pull diff --git a/R/extractBreakpoints.R b/R/extractBreakpoints.R index 4e19b00..48309e6 100644 --- a/R/extractBreakpoints.R +++ b/R/extractBreakpoints.R @@ -1,7 +1,7 @@ #' Identify breakpoints in a \code{marge} model. #' #' @name extractBreakpoints -#' @author Jack Leary +#' @author Jack R. Leary #' @description Extracts the breakpoints from a fitted \code{marge} model. Note - this function relies on the name of the pseudotime variable not having any numeric characters in it e.g., "pseudotime" or "PT" would be fine but "pseudotime1" would not. If multiple lineages exist, use letters to denote lineages instead of numbers e.g., "Lineage_A" and "Lineage_B". This is currently handled automatically in \code{\link{testDynamic}}, so don't change anything. #' @param model The \code{marge} model to analyze. Defaults to NULL. #' @param directions Should the directions of the hinge functions also be extracted? Defaults to TRUE. diff --git a/R/fitGLMM.R b/R/fitGLMM.R index 8e88acb..34a571e 100644 --- a/R/fitGLMM.R +++ b/R/fitGLMM.R @@ -1,7 +1,7 @@ #' Build an NB GLMM using truncated power basis functions. #' #' @name fitGLMM -#' @author Jack Leary +#' @author Jack R. Leary #' @description Fits a negative binomial generalized linear mixed model using truncated power basis function splines as input. The basis matrix can be created adaptively using subject-specific estimation of optimal knots using \code{\link{marge2}}, or basis functions can be evenly space across quantiles. The resulting model can output subject-specific and population-level fitted values. #' @importFrom purrr map_dfr pmap_dfc #' @importFrom dplyr mutate select if_else diff --git a/R/geneProgramDrivers.R b/R/geneProgramDrivers.R index f396f83..701a748 100644 --- a/R/geneProgramDrivers.R +++ b/R/geneProgramDrivers.R @@ -1,7 +1,7 @@ #' Identify driver genes for a given gene program. #' #' @name geneProgramDrivers -#' @author Jack Leary +#' @author Jack R. Leary #' @importFrom Matrix Matrix #' @importFrom purrr map reduce #' @importFrom foreach foreach registerDoSEQ diff --git a/R/geneProgramScoring.R b/R/geneProgramScoring.R index fc8e2cc..43b23f2 100644 --- a/R/geneProgramScoring.R +++ b/R/geneProgramScoring.R @@ -1,8 +1,9 @@ #' Add per-cell module scores for gene programs. #' #' @name geneProgramScoring -#' @author Jack Leary +#' @author Jack R. Leary #' @importFrom Matrix Matrix +#' @importFrom purrr map reduce #' @description This function uses \code{\link[UCell]{ScoreSignatures_UCell}} to create a per-cell module score for each of the provided gene clusters. If the input matrix is a \code{Seurat} or \code{SingleCellExperiment} object, then the resulting scores will be added to the \code{meta.data} or the \code{colData} slot, respectively. Otherwise, a data.frame of the per-program scores is returned. #' @param expr.mat Either a \code{SingleCellExperiment} or \code{Seurat} object from which counts can be extracted, or a matrix of integer-valued counts with genes as rows & cells as columns. Defaults to NULL. #' @param genes A character vector of gene IDs. Defaults to NULL. diff --git a/R/geneProgramSignificance.R b/R/geneProgramSignificance.R index c713568..6ac2dca 100644 --- a/R/geneProgramSignificance.R +++ b/R/geneProgramSignificance.R @@ -1,7 +1,7 @@ #' Test significance of gene program enrichment across a trajectory. #' #' @name geneProgramSignificance -#' @author Jack Leary +#' @author Jack R. Leary #' @import magrittr #' @importFrom purrr map reduce #' @importFrom gamlss gamlss LR.test diff --git a/R/getFittedValues.R b/R/getFittedValues.R index 1364a39..9b22af3 100644 --- a/R/getFittedValues.R +++ b/R/getFittedValues.R @@ -1,7 +1,7 @@ #' Generate a table of fitted values and celltype metadata for genes of interest. #' #' @name getFittedValues -#' @author Jack Leary +#' @author Jack R. Leary #' @import magrittr #' @importFrom stats qnorm #' @importFrom purrr map map2 reduce diff --git a/R/getKnotDist.R b/R/getKnotDist.R index 502f226..a38178e 100644 --- a/R/getKnotDist.R +++ b/R/getKnotDist.R @@ -1,7 +1,7 @@ #' Pull the set of knots for dynamic genes across each lineage. #' #' @name getKnotDist -#' @author Jack Leary +#' @author Jack R. Leary #' @import magrittr #' @importFrom purrr imap reduce #' @importFrom dplyr filter diff --git a/R/getResultsDE.R b/R/getResultsDE.R index 895aec4..a366436 100644 --- a/R/getResultsDE.R +++ b/R/getResultsDE.R @@ -1,7 +1,7 @@ #' Tidy the results of \code{\link{testDynamic}}. #' #' @name getResultsDE -#' @author Jack Leary +#' @author Jack R. Leary #' @description This function turns the nested list differential expression results of \code{\link{testDynamic}} and turns them into a tidy data.frame. #' @import magrittr #' @importFrom future plan multisession sequential diff --git a/R/marge2.R b/R/marge2.R index 4efa37f..1c238b4 100644 --- a/R/marge2.R +++ b/R/marge2.R @@ -3,7 +3,8 @@ #' @name marge2 #' @author Jakub Stoklosa #' @author David I. Warton. -#' @author Jack Leary +#' @author Jack R. Leary +#' @author Rhonda Bacher #' @description MARS fitting function for negative binomial generalized linear models (GLMs) & generalized estimating equations (GEEs). #' @import glm2 #' @import magrittr diff --git a/R/max_span.R b/R/max_span.R index 39dacb9..784dbc3 100644 --- a/R/max_span.R +++ b/R/max_span.R @@ -6,7 +6,8 @@ #' @param alpha See Friedman (1991) equation (45). Defaults to 0.05. #' @details Note that this equation comes from Friedman (1991) equation (45). #' @return \code{max_span} returns a vector of truncated predictor variable values. -#' @author Jakub Stoklosa and David I. Warton. +#' @author Jakub Stoklosa +#' @author David I. Warton. #' @references Friedman, J. (1991). Multivariate adaptive regression splines. \emph{The Annals of Statistics}, \strong{19}, 1--67. #' @references Stoklosa, J. and Warton, D.I. (2018). A generalized estimating equation approach to multivariate adaptive regression splines. \emph{Journal of Computational and Graphical Statistics}, \strong{27}, 245--253. diff --git a/R/min_span.R b/R/min_span.R index 90d32cd..486c171 100644 --- a/R/min_span.R +++ b/R/min_span.R @@ -7,7 +7,8 @@ #' @param alpha See Friedman (1991) equation (43). Defaults to 0.05. #' @details This function selects a minimum span between the knots to mitigate runs of correlated noise in the input data and hence avoiding estimation issues, this equation comes from Friedman (1991) equation 43. #' @return \code{min_span} returns a vector of truncated predictor variable values. -#' @author Jakub Stoklosa and David I. Warton. +#' @author Jakub Stoklosa +#' @author David I. Warton. #' @references Friedman, J. (1991). Multivariate adaptive regression splines. \emph{The Annals of Statistics}, \strong{19}, 1--67. #' @references Stoklosa, J. and Warton, D.I. (2018). A generalized estimating equation approach to multivariate adaptive regression splines. \emph{Journal of Computational and Graphical Statistics}, \strong{27}, 245--253. diff --git a/R/modelLRT.R b/R/modelLRT.R index 8299a04..094d2c8 100644 --- a/R/modelLRT.R +++ b/R/modelLRT.R @@ -1,7 +1,7 @@ #' Perform a likelihood ratio test for one model against another. #' #' @name modelLRT -#' @author Jack Leary +#' @author Jack R. Leary #' @description This function compares two models using a likelihood ratio test (LRT) under the assumption that the test statistic is asymptotically Chi-squared with degrees freedom equal to the difference in the number of parameters between the larger and smaller model. #' @importFrom stats logLik pchisq #' @param mod.1 The model corresponding to the alternative hypothesis. Defaults to NULL. diff --git a/R/nbGAM.R b/R/nbGAM.R index 1462559..b1dc6ee 100644 --- a/R/nbGAM.R +++ b/R/nbGAM.R @@ -1,7 +1,7 @@ #' Fit a negative-binomial GAM. #' #' @name nbGAM -#' @author Jack Leary +#' @author Jack R. Leary #' @description Fits a negative-binomial family GAM using a cubic basis spline on pseudotime. If data are multi-subject in nature, a random intercept is included for each subject. #' @importFrom dplyr mutate #' @importFrom stats offset diff --git a/R/npConvolve.R b/R/npConvolve.R index f3e6159..331cff6 100644 --- a/R/npConvolve.R +++ b/R/npConvolve.R @@ -1,7 +1,7 @@ #' Convolution that matches \code{np.convolve}. #' #' @name npConvolve -#' @author Jack Leary +#' @author Jack R. Leary #' @importFrom stats convolve #' @description Convolve a vector with a user-specified kernel. Can be useful for heatmap smoothing, weighted moving means, etc. #' @param x The vector to be convolved. Defaults to NULL. diff --git a/R/plotClusteredGenes.R b/R/plotClusteredGenes.R index 3377374..a17fb07 100644 --- a/R/plotClusteredGenes.R +++ b/R/plotClusteredGenes.R @@ -1,7 +1,7 @@ #' Generate tidy results from \code{\link{clusterGenes}} to use in plotting. #' #' @name plotClusteredGenes -#' @author Jack Leary +#' @author Jack R. Leary #' @description Generate a table of per-lineage, per-cluster fitted values from \code{scLANE} to be used in visualizations. #' @import magrittr #' @importFrom future plan multisession sequential diff --git a/R/plotModelCoefs.R b/R/plotModelCoefs.R index 57a311e..c1e0d60 100644 --- a/R/plotModelCoefs.R +++ b/R/plotModelCoefs.R @@ -1,7 +1,7 @@ #' Plot gene dynamics with estimated coefficients. #' #' @name plotModelCoefs -#' @author Jack Leary +#' @author Jack R. Leary #' @import magrittr #' @importFrom dplyr select mutate lag lead #' @importFrom tidyr pivot_longer diff --git a/R/plotModels.R b/R/plotModels.R index 75e7621..e20ef00 100644 --- a/R/plotModels.R +++ b/R/plotModels.R @@ -1,7 +1,7 @@ #' Plot results of \code{marge} and other models using \code{ggplot2}. #' #' @name plotModels -#' @author Jack Leary +#' @author Jack R. Leary #' @import magrittr #' @import glm2 #' @importFrom stats qnorm predict as.formula diff --git a/R/score_fun_gee.R b/R/score_fun_gee.R index 2d4a49c..84a69cf 100644 --- a/R/score_fun_gee.R +++ b/R/score_fun_gee.R @@ -3,7 +3,7 @@ #' @name score_fun_gee #' @author Jakub Stoklosa #' @author David I. Warton -#' @author Jack Leary +#' @author Jack R. Leary #' @importFrom RcppEigen fastLmPure #' @importFrom Matrix solve #' @importFrom MASS ginv diff --git a/R/score_fun_glm.R b/R/score_fun_glm.R index f8b98f7..96e20fa 100644 --- a/R/score_fun_glm.R +++ b/R/score_fun_glm.R @@ -3,7 +3,7 @@ #' @name score_fun_glm #' @author Jakub Stoklosa #' @author David I. Warton -#' @author Jack Leary +#' @author Jack R. Leary #' @importFrom RcppEigen fastLmPure #' @importFrom Matrix solve #' @importFrom MASS ginv diff --git a/R/smoothedCountsMatrix.R b/R/smoothedCountsMatrix.R index 2e71b59..565f6c6 100644 --- a/R/smoothedCountsMatrix.R +++ b/R/smoothedCountsMatrix.R @@ -1,7 +1,7 @@ #' Generate a smoothed matrix of gene expression using \code{scLANE} models. #' #' @name smoothedCountsMatrix -#' @author Jack Leary +#' @author Jack R. Leary #' @description This function takes as input the output from \code{\link{testDynamic}} and returns the fitted values from each model in a wide format, with one column per-gene and one row-per cell. This matrix can be use as input to cell or gene clustering and / or visualizations such as heatmaps. #' @import magrittr #' @importFrom future plan multisession sequential diff --git a/R/sortGenesHeatmap.R b/R/sortGenesHeatmap.R index 4a9b2da..0e7a533 100644 --- a/R/sortGenesHeatmap.R +++ b/R/sortGenesHeatmap.R @@ -1,7 +1,7 @@ #' Sort genes by where their peak expression occurs across pseudotime. #' #' @name sortGenesHeatmap -#' @author Jack Leary +#' @author Jack R. Leary #' @import magrittr #' @importFrom purrr map reduce #' @importFrom dplyr filter distinct select with_groups summarise arrange pull diff --git a/R/sortObservations.R b/R/sortObservations.R index bdc517c..decf2f1 100644 --- a/R/sortObservations.R +++ b/R/sortObservations.R @@ -1,7 +1,7 @@ #' Sort observations by sample ID and pseudotime. #' #' @name sortObservations -#' @author Jack Leary +#' @author Jack R. Leary #' @importFrom dplyr arrange #' @description Since the GEE & GLMM modes require data to be sorted by sample ID and pseudotime, this function provides a simple way to do so for a range of inputs. #' @param expr.mat Either a \code{SingleCellExperiment} or \code{Seurat} object from which counts can be extracted, or a matrix of integer-valued counts with genes as rows & cells as columns. Defaults to NULL. diff --git a/R/stat_out.R b/R/stat_out.R index 2255d28..b3f080c 100644 --- a/R/stat_out.R +++ b/R/stat_out.R @@ -3,8 +3,9 @@ #' @name stat_out #' @author Jakub Stoklosa #' @author David I. Warton -#' @author Jack Leary -#' @importFrom stats lm.fit fitted.values +#' @author Jack R. Leary +#' @importFrom RcppEigen fastLmPure +#' @importFrom stats fitted.values #' @description Calculate the final RSS / GCV for a fitted model. #' @param Y The response variable. Defaults to NULL. #' @param B1 The model matrix of predictor variables. Defaults to NULL. @@ -28,7 +29,7 @@ stat_out <- function(Y = NULL, if (is.null(Y) || is.null(B1) || is.null(TSS) || is.null(GCV.null)) { stop("Some of the arguments to stat_out() are missing.") } if (GCV.null == 0) { stop("GCV.null argument to stat_out() cannot be 0.") } N <- length(Y) - reg <- try({ stats::lm.fit(B1, Y) }, silent = TRUE) + reg <- try({ RcppEigen::fastLmPure(B1, Y) }, silent = TRUE) if (inherits(reg, "try-error") || any(is.na(reg$coefficients))) { RSS1 <- RSSq1 <- GCV1 <- GCVq1 <- NA_real_ } else { diff --git a/R/stat_out_score_gee_null.R b/R/stat_out_score_gee_null.R index 42f4182..19f1802 100644 --- a/R/stat_out_score_gee_null.R +++ b/R/stat_out_score_gee_null.R @@ -3,7 +3,7 @@ #' @name stat_out_score_gee_null #' @author Jakub Stoklosa #' @author David I. Warton -#' @author Jack Leary +#' @author Jack R. Leary #' @importFrom geeM geem #' @importFrom MASS negative.binomial ginv #' @importFrom stats fitted.values diff --git a/R/stat_out_score_glm_null.R b/R/stat_out_score_glm_null.R index 07abdf8..25f19cd 100644 --- a/R/stat_out_score_glm_null.R +++ b/R/stat_out_score_glm_null.R @@ -3,7 +3,7 @@ #' @name stat_out_score_glm_null #' @author Jakub Stoklosa #' @author David I. Warton -#' @author Jack Leary +#' @author Jack R. Leary #' @importFrom gamlss gamlss #' @importFrom stats fitted.values #' @importFrom Matrix diag t diff --git a/R/stripGLM.R b/R/stripGLM.R index c2fb62f..c149616 100644 --- a/R/stripGLM.R +++ b/R/stripGLM.R @@ -1,7 +1,7 @@ #' Make GLM objects much smaller. #' #' @name stripGLM -#' @author Jack Leary +#' @author Jack R. Leary #' @description This function removes a \emph{lot} of components from the default GLM object in order to make it take up less memory. It does however retain enough pieces for \code{predict()} to still work. No promises beyond that. #' @param glm.obj An object of class GLM from which you'd like to strip out unnecessary components. Defaults to NULL. #' @return A slimmed-down \code{glm} object. diff --git a/R/summarizeModel.R b/R/summarizeModel.R index 68d57ff..b68cd06 100644 --- a/R/summarizeModel.R +++ b/R/summarizeModel.R @@ -1,7 +1,7 @@ #' Represent a \code{marge} model as a series of piecewise equations. #' #' @name summarizeModel -#' @author Jack Leary +#' @author Jack R. Leary #' @author Rhonda Bacher #' @import magrittr #' @importFrom stats vcov diff --git a/R/testDynamic.R b/R/testDynamic.R index 28700f0..e9a8a17 100644 --- a/R/testDynamic.R +++ b/R/testDynamic.R @@ -1,7 +1,7 @@ #' Test whether a gene is dynamic over pseudotime. #' #' @name testDynamic -#' @author Jack Leary +#' @author Jack R. Leary #' @description This function tests whether a NB \code{marge} model is better than a null (intercept-only) model using the Likelihood Ratio Test. In effect, the test tells us whether a gene's expression changes (in any way) over pseudotime. #' @import glm2 #' @import magrittr diff --git a/R/testSlope.R b/R/testSlope.R index 4f215b1..16612ff 100644 --- a/R/testSlope.R +++ b/R/testSlope.R @@ -1,7 +1,7 @@ #' Test whether a gene is dynamic over a pseudotime interval. #' #' @name testSlope -#' @author Jack Leary +#' @author Jack R. Leary #' @description This function tests whether each gene's estimated \eqn{\beta} for pseudotime differs significantly from 0 over each empirically estimated sets of knots / pseudotime intervals using a Wald test. #' @import magrittr #' @importFrom purrr map_dfr diff --git a/R/theme_scLANE.R b/R/theme_scLANE.R index 66bbc0a..4076a01 100644 --- a/R/theme_scLANE.R +++ b/R/theme_scLANE.R @@ -1,7 +1,7 @@ #' A \code{ggplot2} theme for \code{scLANE}. #' #' @name theme_scLANE -#' @author Jack Leary +#' @author Jack R. Leary #' @importFrom ggplot2 theme_classic theme element_rect #' @description A publication-ready theme for creating gene dynamics plots, embedding plots, etc. #' @param base.size The base font size. Defaults to 12. diff --git a/R/tp1.R b/R/tp1.R index cf1e90b..038bf06 100644 --- a/R/tp1.R +++ b/R/tp1.R @@ -2,7 +2,8 @@ #' #' @name tp1 #' @param x A predictor variable value. Defaults to NULL. -#' @author Jakub Stoklosa and David I. Warton +#' @author Jakub Stoklosa +#' @author David I. Warton #' @param t A specified knot value. Defaults to NULL. #' @param p The \eqn{p^{th}} degree of the polynomial considered. Defaults to 1. #' @return A vector of values that have been transformed using a truncated \eqn{p^{th}} power function (positive part) for a specified knot value. diff --git a/R/tp2.R b/R/tp2.R index cc62dd3..53c692e 100644 --- a/R/tp2.R +++ b/R/tp2.R @@ -1,7 +1,8 @@ #' Truncated p-th power function (negative part). #' #' @name tp2 -#' @author Jakub Stoklosa and David I. Warton +#' @author Jakub Stoklosa +#' @author David I. Warton #' @param x A predictor variable value. Defaults to NULL. #' @param t A specified knot value. Defaults to NULL. #' @param p The \eqn{p^{th}} degree of the polynomial considered. Defaults to 1. diff --git a/R/waldTestGEE.R b/R/waldTestGEE.R index 0996c56..294c955 100644 --- a/R/waldTestGEE.R +++ b/R/waldTestGEE.R @@ -1,7 +1,7 @@ #' Use a Wald test to compare nested GEE models. #' #' @name waldTestGEE -#' @author Jack Leary +#' @author Jack R. Leary #' @description Performs a basic Wald test to determine whether an alternate model is significantly better than a nested null model. This is the GEE equivalent (kind of) of \code{\link{modelLRT}}. Be careful with small sample sizes. #' @importFrom MASS ginv #' @importFrom stats pchisq diff --git a/man/backward_sel_WIC.Rd b/man/backward_sel_WIC.Rd index cae85e7..462b210 100644 --- a/man/backward_sel_WIC.Rd +++ b/man/backward_sel_WIC.Rd @@ -45,5 +45,5 @@ Jakub Stoklosa David I. Warton -Jack Leary +Jack R. Leary } diff --git a/man/biasCorrectGEE.Rd b/man/biasCorrectGEE.Rd index ad56ab4..a1ccc7b 100644 --- a/man/biasCorrectGEE.Rd +++ b/man/biasCorrectGEE.Rd @@ -33,5 +33,5 @@ This functions implements several bias-correction methods for the GEE sandwich v \code{\link{waldTestGEE}} } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/bootstrapRandomEffects.Rd b/man/bootstrapRandomEffects.Rd index aa4d200..36c5415 100644 --- a/man/bootstrapRandomEffects.Rd +++ b/man/bootstrapRandomEffects.Rd @@ -59,5 +59,5 @@ ranef_sumy <- bootstrapRandomEffects(glmm_mod, \code{\link[glmmTMB]{glmmTMB}} } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/chooseCandidateGenes.Rd b/man/chooseCandidateGenes.Rd index a7828df..ab59b9c 100644 --- a/man/chooseCandidateGenes.Rd +++ b/man/chooseCandidateGenes.Rd @@ -31,5 +31,5 @@ data(sim_counts) candidate_genes <- chooseCandidateGenes(sim_counts, id.vec = sim_counts$subject) } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/createCellOffset.Rd b/man/createCellOffset.Rd index 6e72ada..9c283e4 100644 --- a/man/createCellOffset.Rd +++ b/man/createCellOffset.Rd @@ -31,5 +31,5 @@ cell_offset <- createCellOffset(sim_counts) \code{\link[scuttle]{computeLibraryFactors}} } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/createSlopeTestData.Rd b/man/createSlopeTestData.Rd index e7c706d..1924798 100644 --- a/man/createSlopeTestData.Rd +++ b/man/createSlopeTestData.Rd @@ -32,5 +32,5 @@ Creates a data.frame of \code{marge} model breakpoints, \emph{p}-values, and oth \code{\link{testSlope}} } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/embedGenes.Rd b/man/embedGenes.Rd index 2380b47..5d55c2b 100644 --- a/man/embedGenes.Rd +++ b/man/embedGenes.Rd @@ -56,5 +56,5 @@ smoothed_dynamics <- smoothedCountsMatrix(scLANE_models, gene_embed <- embedGenes(smoothed_dynamics$Lineage_A, n.cores = 1L) } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/enrichDynamicGenes.Rd b/man/enrichDynamicGenes.Rd index 8d3e01e..ac09cba 100644 --- a/man/enrichDynamicGenes.Rd +++ b/man/enrichDynamicGenes.Rd @@ -28,5 +28,5 @@ enr_res <- enrichDynamicGenes(scLANE_de_res) \code{\link[gprofiler2]{gost}} } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/extractBreakpoints.Rd b/man/extractBreakpoints.Rd index a7ca637..be0cbc8 100644 --- a/man/extractBreakpoints.Rd +++ b/man/extractBreakpoints.Rd @@ -27,5 +27,5 @@ marge_model <- marge2(sim_pseudotime, breakpoint_df <- extractBreakpoints(model = marge_model) } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/fitGLMM.Rd b/man/fitGLMM.Rd index 4e47c26..c6b9647 100644 --- a/man/fitGLMM.Rd +++ b/man/fitGLMM.Rd @@ -61,5 +61,5 @@ glmm_mod <- fitGLMM(X_pred = sim_pseudotime, \code{\link{modelLRT}} } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/geneProgramDrivers.Rd b/man/geneProgramDrivers.Rd index 0806e5a..6bdbf63 100644 --- a/man/geneProgramDrivers.Rd +++ b/man/geneProgramDrivers.Rd @@ -62,5 +62,5 @@ program_drivers <- geneProgramDrivers(sim_counts, \code{\link[stats]{cor.test}} } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/geneProgramScoring.Rd b/man/geneProgramScoring.Rd index 9ffbbee..0dffcd8 100644 --- a/man/geneProgramScoring.Rd +++ b/man/geneProgramScoring.Rd @@ -54,5 +54,5 @@ sim_counts <- geneProgramScoring(sim_counts, \code{\link{geneProgramDrivers}} } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/geneProgramSignificance.Rd b/man/geneProgramSignificance.Rd index 0e26063..5b9f491 100644 --- a/man/geneProgramSignificance.Rd +++ b/man/geneProgramSignificance.Rd @@ -51,5 +51,5 @@ program_enrichment_stats <- geneProgramSignificance(list(sim_counts$cluster_0), \code{\link{geneProgramScoring}} } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/getFittedValues.Rd b/man/getFittedValues.Rd index 8e6a8f4..f8234b9 100644 --- a/man/getFittedValues.Rd +++ b/man/getFittedValues.Rd @@ -54,5 +54,5 @@ fitted_vals <- getFittedValues(scLANE_models, expr.mat = sim_counts) } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/getKnotDist.Rd b/man/getKnotDist.Rd index 54b79a9..2a8e612 100644 --- a/man/getKnotDist.Rd +++ b/man/getKnotDist.Rd @@ -22,5 +22,5 @@ data(scLANE_models) knot_dist <- getKnotDist(scLANE_models) } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/getResultsDE.Rd b/man/getResultsDE.Rd index 99f6888..1323449 100644 --- a/man/getResultsDE.Rd +++ b/man/getResultsDE.Rd @@ -36,5 +36,5 @@ scLANE_de_res <- getResultsDE(scLANE_models) \code{\link[stats]{p.adjust}} } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/marge2.Rd b/man/marge2.Rd index bd5e7a6..1f10a20 100644 --- a/man/marge2.Rd +++ b/man/marge2.Rd @@ -98,5 +98,7 @@ Jakub Stoklosa David I. Warton. -Jack Leary +Jack R. Leary + +Rhonda Bacher } diff --git a/man/max_span.Rd b/man/max_span.Rd index 3d4d517..94531ee 100644 --- a/man/max_span.Rd +++ b/man/max_span.Rd @@ -28,5 +28,7 @@ Friedman, J. (1991). Multivariate adaptive regression splines. \emph{The Annals Stoklosa, J. and Warton, D.I. (2018). A generalized estimating equation approach to multivariate adaptive regression splines. \emph{Journal of Computational and Graphical Statistics}, \strong{27}, 245--253. } \author{ -Jakub Stoklosa and David I. Warton. +Jakub Stoklosa + +David I. Warton. } diff --git a/man/min_span.Rd b/man/min_span.Rd index 0e5c310..ed22d7e 100644 --- a/man/min_span.Rd +++ b/man/min_span.Rd @@ -30,5 +30,7 @@ Friedman, J. (1991). Multivariate adaptive regression splines. \emph{The Annals Stoklosa, J. and Warton, D.I. (2018). A generalized estimating equation approach to multivariate adaptive regression splines. \emph{Journal of Computational and Graphical Statistics}, \strong{27}, 245--253. } \author{ -Jakub Stoklosa and David I. Warton. +Jakub Stoklosa + +David I. Warton. } diff --git a/man/modelLRT.Rd b/man/modelLRT.Rd index 7d14066..56c919a 100644 --- a/man/modelLRT.Rd +++ b/man/modelLRT.Rd @@ -20,5 +20,5 @@ A list containing the LRT test statistic, degrees freedom, and the \emph{p}-valu This function compares two models using a likelihood ratio test (LRT) under the assumption that the test statistic is asymptotically Chi-squared with degrees freedom equal to the difference in the number of parameters between the larger and smaller model. } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/nbGAM.Rd b/man/nbGAM.Rd index 2840be7..c6e5d46 100644 --- a/man/nbGAM.Rd +++ b/man/nbGAM.Rd @@ -54,5 +54,5 @@ gam_mod <- nbGAM(BiocGenerics::counts(sim_counts)[4, ], \code{\link[gamlss.dist]{NBI}} } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/npConvolve.Rd b/man/npConvolve.Rd index e9b58ec..1e5ef8b 100644 --- a/man/npConvolve.Rd +++ b/man/npConvolve.Rd @@ -30,5 +30,5 @@ convolved_vec <- npConvolve(x = rnorm(20), conv.kernel = rep(1/5, 5)) \code{\link[stats]{convolve}} } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/plotClusteredGenes.Rd b/man/plotClusteredGenes.Rd index 2918b27..8380ede 100644 --- a/man/plotClusteredGenes.Rd +++ b/man/plotClusteredGenes.Rd @@ -49,5 +49,5 @@ plotClusteredGenes(test.dyn.res = gene_stats, \code{\link{clusterGenes}} } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/plotModelCoefs.Rd b/man/plotModelCoefs.Rd index b2fc81b..bdff591 100644 --- a/man/plotModelCoefs.Rd +++ b/man/plotModelCoefs.Rd @@ -48,5 +48,5 @@ plotModelCoefs(scLANE_models, size.factor.offset = cell_offset) } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/plotModels.Rd b/man/plotModels.Rd index 4611656..141fab6 100644 --- a/man/plotModels.Rd +++ b/man/plotModels.Rd @@ -77,5 +77,5 @@ model_plot <- plotModels(scLANE_models, size.factor.offset = cell_offset) } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/score_fun_gee.Rd b/man/score_fun_gee.Rd index 0038924..10d904c 100644 --- a/man/score_fun_gee.Rd +++ b/man/score_fun_gee.Rd @@ -66,5 +66,5 @@ Jakub Stoklosa David I. Warton -Jack Leary +Jack R. Leary } diff --git a/man/score_fun_glm.Rd b/man/score_fun_glm.Rd index 58e0c45..5db9b2c 100644 --- a/man/score_fun_glm.Rd +++ b/man/score_fun_glm.Rd @@ -48,5 +48,5 @@ Jakub Stoklosa David I. Warton -Jack Leary +Jack R. Leary } diff --git a/man/smoothedCountsMatrix.Rd b/man/smoothedCountsMatrix.Rd index 94e36d5..6c76357 100644 --- a/man/smoothedCountsMatrix.Rd +++ b/man/smoothedCountsMatrix.Rd @@ -43,5 +43,5 @@ smoothed_dynamics <- smoothedCountsMatrix(scLANE_models, \code{\link{testDynamic}} } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/sortGenesHeatmap.Rd b/man/sortGenesHeatmap.Rd index cfe09f9..55d39aa 100644 --- a/man/sortGenesHeatmap.Rd +++ b/man/sortGenesHeatmap.Rd @@ -29,5 +29,5 @@ sorted_genes <- sortGenesHeatmap(smoothed_counts$Lineage_A, pt.vec = sim_pseudot \code{\link{smoothedCountsMatrix}} } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/sortObservations.Rd b/man/sortObservations.Rd index ce16fca..1c279a2 100644 --- a/man/sortObservations.Rd +++ b/man/sortObservations.Rd @@ -33,5 +33,5 @@ sorted_counts <- sortObservations(sim_counts, id.vec = sim_counts$subject) } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/stat_out.Rd b/man/stat_out.Rd index 301aca2..a421be9 100644 --- a/man/stat_out.Rd +++ b/man/stat_out.Rd @@ -42,5 +42,5 @@ Jakub Stoklosa David I. Warton -Jack Leary +Jack R. Leary } diff --git a/man/stat_out_score_gee_null.Rd b/man/stat_out_score_gee_null.Rd index 8debc48..ba76bc7 100644 --- a/man/stat_out_score_gee_null.Rd +++ b/man/stat_out_score_gee_null.Rd @@ -44,5 +44,5 @@ Jakub Stoklosa David I. Warton -Jack Leary +Jack R. Leary } diff --git a/man/stat_out_score_glm_null.Rd b/man/stat_out_score_glm_null.Rd index 2020111..2ad87ab 100644 --- a/man/stat_out_score_glm_null.Rd +++ b/man/stat_out_score_glm_null.Rd @@ -32,5 +32,5 @@ Jakub Stoklosa David I. Warton -Jack Leary +Jack R. Leary } diff --git a/man/stripGLM.Rd b/man/stripGLM.Rd index 1bfdadf..04a18d4 100644 --- a/man/stripGLM.Rd +++ b/man/stripGLM.Rd @@ -19,5 +19,5 @@ This function removes a \emph{lot} of components from the default GLM object in \code{\link[MASS]{glm.nb}} } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/summarizeModel.Rd b/man/summarizeModel.Rd index 24b8026..4fd11bb 100644 --- a/man/summarizeModel.Rd +++ b/man/summarizeModel.Rd @@ -32,7 +32,7 @@ model_summary <- summarizeModel(marge.model = marge_model, pt = sim_pseudotime) \code{\link{marge2}} } \author{ -Jack Leary +Jack R. Leary Rhonda Bacher } diff --git a/man/testDynamic.Rd b/man/testDynamic.Rd index 382ad50..f067ad4 100644 --- a/man/testDynamic.Rd +++ b/man/testDynamic.Rd @@ -89,5 +89,5 @@ scLANE_models <- testDynamic(sim_counts, \code{\link[glmmTMB]{glmmTMB}} } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/testSlope.Rd b/man/testSlope.Rd index cd488fd..755ea44 100644 --- a/man/testSlope.Rd +++ b/man/testSlope.Rd @@ -29,5 +29,5 @@ slope_test_res <- testSlope(scLANE_models) \code{\link[stats]{p.adjust}} } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/theme_scLANE.Rd b/man/theme_scLANE.Rd index 9eaf1fb..a26bca3 100644 --- a/man/theme_scLANE.Rd +++ b/man/theme_scLANE.Rd @@ -39,5 +39,5 @@ model_plot <- plotModels(scLANE_models, theme_scLANE() } \author{ -Jack Leary +Jack R. Leary } diff --git a/man/tp1.Rd b/man/tp1.Rd index 814cdce..5aafa0a 100644 --- a/man/tp1.Rd +++ b/man/tp1.Rd @@ -28,5 +28,7 @@ Stoklosa, J. and Warton, D.I. (2018). A generalized estimating equation approach \code{\link{tp2}} } \author{ -Jakub Stoklosa and David I. Warton +Jakub Stoklosa + +David I. Warton } diff --git a/man/tp2.Rd b/man/tp2.Rd index 2a9c651..f496866 100644 --- a/man/tp2.Rd +++ b/man/tp2.Rd @@ -28,5 +28,7 @@ Stoklosa, J. and Warton, D.I. (2018). A generalized estimating equation approach \code{\link{tp1}} } \author{ -Jakub Stoklosa and David I. Warton +Jakub Stoklosa + +David I. Warton } diff --git a/man/waldTestGEE.Rd b/man/waldTestGEE.Rd index af22557..0ac2fe2 100644 --- a/man/waldTestGEE.Rd +++ b/man/waldTestGEE.Rd @@ -47,5 +47,5 @@ Performs a basic Wald test to determine whether an alternate model is significan \code{\link{modelLRT}} } \author{ -Jack Leary +Jack R. Leary }