R/brmsfit-methods.R
changed.
Showing 1 of 1 files from the diff.
@@ -159,9 +159,15 @@
Loading
159 | 159 | regex <- paste0(",", regex, "\\]$") |
|
160 | 160 | rpars <- rpars[grepl(regex, rpars)] |
|
161 | 161 | } |
|
162 | - | out[[g]] <- as.matrix(object, variable = rpars) |
|
163 | 162 | levels <- attr(ranef, "levels")[[g]] |
|
164 | - | dim(out[[g]]) <- c(nrow(out[[g]]), length(levels), length(coefs)) |
|
163 | + | if (length(rpars)) { |
|
164 | + | # draws of varying coefficients were saved |
|
165 | + | out[[g]] <- as.matrix(object, variable = rpars) |
|
166 | + | dim(out[[g]]) <- c(nrow(out[[g]]), length(levels), length(coefs)) |
|
167 | + | } else { |
|
168 | + | # draws of varying coefficients were not saved |
|
169 | + | out[[g]] <- array(dim = c(ndraws(object), length(levels), length(coefs))) |
|
170 | + | } |
|
165 | 171 | dimnames(out[[g]])[2:3] <- list(levels, coefs) |
|
166 | 172 | if (summary) { |
|
167 | 173 | out[[g]] <- posterior_summary(out[[g]], probs, robust) |
Files | Coverage |
---|---|
R | 82.24% |
Project Totals (70 files) | 82.24% |
3137389809
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.