aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Kellner <ken@kenkellner.com>2023-03-08 10:02:01 -0500
committerKen Kellner <ken@kenkellner.com>2023-03-08 10:02:01 -0500
commit845a8e74b5e5eca078bd9e1f5581c8ae94ee266e (patch)
tree7c384fc8c24d95d8daf654ffd3ac55fd16e87307
parent171605ab21dc511de8b53438b1ee6ff6a2336d12 (diff)
Show random effects in summary() output, fixes #245
-rw-r--r--DESCRIPTION4
-rw-r--r--R/unmarkedEstimate.R8
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)