Skip to content

Commit

Permalink
styling
Browse files Browse the repository at this point in the history
  • Loading branch information
osorensen committed Oct 11, 2023
1 parent b0c6d25 commit d4e2ab5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions R/galamm.R
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,9 @@ galamm <- function(formula, weights = NULL, data, family = gaussian,
} else {
gobj$lmod$reTrms$Zt@x <-
as.numeric(Map(function(l, x) sum(pars[l + 2L] * x),
l = lambda_mappings$lambda_mapping_Zt,
x = lambda_mappings$lambda_mapping_Zt_covs
))
l = lambda_mappings$lambda_mapping_Zt,
x = lambda_mappings$lambda_mapping_Zt_covs
))
}
}

Expand Down
2 changes: 1 addition & 1 deletion dev-scripts/sanitize.R
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@ gr <- function(par, gradient, hessian = FALSE) {
par_init <-
set_initial_values(gobj, start, beta_inds, lambda_inds, weights_inds)

fn(par_init, F)
fn(par_init, T)
3 changes: 2 additions & 1 deletion tests/testthat/test-galamm-semiparametric.R
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ test_that("GAMM with factor structures and random effects works", {
test_that("galamm with by variables and loadings works", {
dat <- subset(
cognition,
domain %in% c(1, 3) & item %in% c("11", "12", "31", "32"))
domain %in% c(1, 3) & item %in% c("11", "12", "31", "32")
)
dat <- cbind(
dat,
model.matrix(~ 0 + domain, data = dat)[, c("domain1", "domain3")]
Expand Down

0 comments on commit d4e2ab5

Please sign in to comment.