Skip to content

Commit

Permalink
update to print.summary
Browse files Browse the repository at this point in the history
  • Loading branch information
osorensen committed Apr 3, 2024
1 parent fc5ca84 commit 2c93785
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
5 changes: 4 additions & 1 deletion R/summary.galamm.R
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ print.summary.galamm <- function(
cat("\n")
lme4::.prt.aictab(x$AICtab)
cat("\n")
lme4::.prt.resids(residuals(x) / sigma(x), digits = digits)
if(length(x$model$family) == 1) {

Check warning on line 150 in R/summary.galamm.R

View workflow job for this annotation

GitHub Actions / lint

file=R/summary.galamm.R,line=150,col=5,[spaces_left_parentheses_linter] Place a space before left parenthesis, except in a function call.

Check warning on line 150 in R/summary.galamm.R

View workflow job for this annotation

GitHub Actions / lint

file=R/summary.galamm.R,line=150,col=5,[spaces_left_parentheses_linter] Place a space before left parenthesis, except in a function call.
lme4::.prt.resids(residuals(x) / sigma(x), digits = digits)
}

if (exists("Lambda", x)) {
cat("Lambda:\n")
x$Lambda[x$Lambda == 0] <- NA
Expand Down
5 changes: 4 additions & 1 deletion dev-scripts/lifespan_demo.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ mod <- galamm(
load.var = "test",
lambda = lmat,
factor = c("epmem_ability", "wmem_ability", "execfun_ability"),
start = list(
theta = mod_init$parameters$parameter_estimates[mod_init$parameters$theta_inds]
),
control = galamm_control(
optim_control = list(REPORT = 2, factr = 1e9, trace = 3, maxit = 10))
optim_control = list(REPORT = 2, factr = 1e8, trace = 3, maxit = 10))
)
beepr::beep()
summary(mod)
Expand Down
3 changes: 3 additions & 0 deletions news.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# galamm (development versions)

- The print.summary.galamm() method does no longer print residual percentiles
with mixed response models. The version implemented until now had a bug, and
it is not clear how to present this information in a useful way.
- Fixed bug causing galamm() to fail with mixed response types, when the first
argument to "family" was not "gaussian".
- BREAKING CHANGE: argument "factor", "factor_interaction" and "lambda" to
Expand Down
4 changes: 0 additions & 4 deletions tests/testthat/_snaps/galamm-mixed-resp.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
AIC BIC logLik deviance df.resid
12356.9 12388.3 -6173.4 31426.4 3995
Scaled residuals:
Min 1Q Median 3Q Max
-15.23 -0.40 0.13 0.68 16.03
Random effects:
Groups Name Variance Std.Dev.
id (Intercept) 0 0
Expand Down

0 comments on commit 2c93785

Please sign in to comment.