diff options
author | Ken Kellner <ken@kenkellner.com> | 2023-03-08 10:02:01 -0500 |
---|---|---|
committer | Ken Kellner <ken@kenkellner.com> | 2023-03-08 10:02:01 -0500 |
commit | 845a8e74b5e5eca078bd9e1f5581c8ae94ee266e (patch) | |
tree | 7c384fc8c24d95d8daf654ffd3ac55fd16e87307 | |
parent | 171605ab21dc511de8b53438b1ee6ff6a2336d12 (diff) |
Show random effects in summary() output, fixes #245
-rw-r--r-- | DESCRIPTION | 4 | ||||
-rw-r--r-- | R/unmarkedEstimate.R | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/DESCRIPTION b/DESCRIPTION index 62da3ef..c8511af 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: unmarked -Version: 1.2.5.9011 -Date: 2023-03-07 +Version: 1.2.5.9012 +Date: 2023-03-08 Type: Package Title: Models for Data from Unmarked Animals Authors@R: c( diff --git a/R/unmarkedEstimate.R b/R/unmarkedEstimate.R index 501808e..86caf40 100644 --- a/R/unmarkedEstimate.R +++ b/R/unmarkedEstimate.R @@ -149,6 +149,14 @@ setMethod("summary", signature(object = "unmarkedEstimate"), logistic = "logit", cloglog = "cloglog") cat(object@name, " (", link, "-scale)", ":\n", sep="") + + has_random <- methods::.hasSlot(object, "randomVarInfo") && + length(object@randomVarInfo) > 0 + if(has_random){ + print_randvar_info(object@randomVarInfo) + cat("\nFixed effects:\n") + } + outDF <- data.frame(Estimate = ests, SE = SEs, z = Z, "P(>|z|)" = p, check.names = FALSE) print(outDF, row.names = printRowNames, digits = 3) |