Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jr-leary7 authored Jun 5, 2024
2 parents d322f61 + a3746b3 commit 4adb067
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: scLANE
Type: Package
Title: Model gene expression dynamics with spline-based NB GLMs, GEEs, & GLMMs
Version: 0.7.9
Version: 0.8.0
Authors@R: c(person(given = "Jack", family = "Leary", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0009-0004-8821-3269")),
person(given = "Rhonda", family = "Bacher", email = "[email protected]", role = c("ctb", "fnd"), comment = c(ORCID = "0000-0001-5787-476X")))
Description: scLANE uses truncated power basis spline models to build flexible, interpretable models of single cell gene expression over pseudotime or latent time.
Expand Down
4 changes: 2 additions & 2 deletions R/fitGLMM.R
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ fitGLMM <- function(X_pred = NULL,
}
}
# set up results
marge_style_names <- c("B_finalIntercept", marge_style_names)
coef_names <- c("Intercept", coef_names)
marge_style_names <- c("B_finalIntercept", marge_style_names[nonzero_coefs])
coef_names <- c("Intercept", coef_names[nonzero_coefs])
res <- list(final_mod = glmm_mod,
basis_mtx = NULL,
WIC_mtx = NULL, # only used in GLM / GEE models
Expand Down
5 changes: 3 additions & 2 deletions R/stat_out_score_gee_null.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ stat_out_score_gee_null <- function(Y = NULL,
alpha_est <- ests$alpha
sigma_est <- ests$phi
mu_est <- as.matrix(stats::fitted.values(ests))
V_est <- mu_est * (1 + mu_est * sigma_est) # Type I NB variance = mu (1 + mu * sigma); sigma = 1 / theta
V_est <- mu_est * (1 + mu_est * sigma_est) # Type I NB variance = mu (1 + mu * sigma); sigma = 1 / phi
n_vec1 <- c(0, n_vec)
VS_est_list <- AWA_est_list <- J2_list <- Sigma2_list <- vector("list", length = N)
J11 <- Sigma11 <- matrix(0, ncol(B_null), ncol(B_null))
Expand All @@ -52,7 +52,8 @@ stat_out_score_gee_null <- function(Y = NULL,
if (cor.structure == "independence") {
R_alpha <- diag(1, n_vec[i], n_vec[i])
} else if (cor.structure == "exchangeable") {
R_alpha <- matrix(alpha_est, n_vec[i], n_vec[i]) + diag(c(1 - alpha_est), n_vec[i], n_vec[i])
R_alpha <- matrix(alpha_est, nrow = n_vec[i], ncol = n_vec[i])
R_alpha <- R_alpha + diag(c(1 - alpha_est), nrow = n_vec[i], ncol = n_vec[i])
} else if (cor.structure == "ar1") {
R_alpha <- alpha_est^outer(seq(n_vec[i]), seq(n_vec[i]), \(x, y) abs(x - y))
} else {
Expand Down

0 comments on commit 4adb067

Please sign in to comment.