Thank you. Using brms:::rename, I am getting spaces removed while in the actual model I am getting spaces replaced with periods. I looked for the specific call in the code to see what the pattern/replacement pair are but couldn’t find it. Could you point me in the right direction?
Anything weird shouldn’t be a problem. I’m going to do something like `plyr::mapvalues(spread_values, brms:::rename(source_values), source_values) to map back to the original values soo as long as I can recreate the process I should be fine.
chunk <- structure(list(enum = structure(1:10, .Label = c("Privilege Misuse",
"Crimeware", "Web Applications", "Denial of Service", "Everything Else",
"Cyber-Espionage", "Miscellaneous Errors", "Point of Sale", "Lost and Stolen Assets",
"Payment Card Skimmers"), class = "factor"), x = c(9, 8, 6, 6,
3, 2, 1, 0, 0, 0), n = c(34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L,
34L, 34L), freq = c(0.26471, 0.23529, 0.17647, 0.17647, 0.08824,
0.05882, 0.02941, 0, 0, 0)), row.names = c(NA, 10L), class = "data.frame")
m <-suppressWarnings(brms::brm(x | trials(n) ~ (1|enum),
data=chunk,
family = binomial(),
control = list(adapt_delta = .90, max_treedepth=10),
refresh=0, silent=TRUE))
names(m[['fit']])
# vs
brms:::rename(chunk$enum)