From 29179b390e9a44e5fd9b83b9e58cec51150bf825 Mon Sep 17 00:00:00 2001 From: Jack Leary Date: Sun, 29 Sep 2024 13:40:47 -0400 Subject: [PATCH] updated some docs and examples --- DESCRIPTION | 2 +- R/bootstrapRandomEffects.R | 1 + R/stat_out.R | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e25a476..1b4ab39 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: scLANE Type: Package -Title: Model Gene Expression Dynamics with Spline-based NB GLMs, GEEs, & GLMMs +Title: Model Gene Expression Dynamics with Spline-Based NB GLMs, GEEs, & GLMMs Version: 0.8.2 Authors@R: c(person(given = "Jack", family = "Leary", email = "j.leary@ufl.edu", role = c("aut", "cre"), comment = c(ORCID = "0009-0004-8821-3269")), person(given = "Rhonda", family = "Bacher", email = "rbacher@ufl.edu", role = c("ctb", "fnd"), comment = c(ORCID = "0000-0001-5787-476X"))) diff --git a/R/bootstrapRandomEffects.R b/R/bootstrapRandomEffects.R index 73ced3c..72d6511 100644 --- a/R/bootstrapRandomEffects.R +++ b/R/bootstrapRandomEffects.R @@ -37,6 +37,7 @@ #' ranef_sumy <- bootstrapRandomEffects(glmm_mod, #' id.vec = sim_counts$subject, #' Y.offset = cell_offset, +#' n.boot = 100L, #' n.cores = 1L) bootstrapRandomEffects <- function(glmm.mod = NULL, diff --git a/R/stat_out.R b/R/stat_out.R index da48844..856ca2a 100644 --- a/R/stat_out.R +++ b/R/stat_out.R @@ -30,7 +30,7 @@ stat_out <- function(Y = NULL, N <- length(Y) reg <- stats::lm.fit(B1, Y) if (any(is.na(reg$coef))) { - RSS1 <- RSSq1 <- GCV1 <- GCVq1 <- NA + RSS1 <- RSSq1 <- GCV1 <- GCVq1 <- NA_real_ } else { df1a <- ncol(B1) + pen * (ncol(B1) - 1) / 2 # This matches the earth() package, SAS and Friedman (1991) penalty. RSS1 <- sum((Y - stats::fitted(reg))^2)