Description Usage Arguments Value Examples
Given a close-to-optimum model, this function continuously searches the neighbour models to find the global optimum, through a complete search
1 2 3 4 5 6 7 8 9 10 | AddOnSearch(merge.code, varia.list, model, transition.method,
IncludeOrigin = FALSE)
## S3 method for class 'glm'
AddOnSearch(merge.code, varia.list, model, transition.method,
IncludeOrigin = FALSE)
## S3 method for class 'rxGlm'
AddOnSearch(merge.code, varia.list, model,
transition.method, IncludeOrigin = FALSE)
|
merge.code |
the given close-to-optimum graycode, list(code1, code2) |
varia.list |
a list of variables, c(.., .., ..) |
model |
the full model |
transition.method |
Transition method to change one graycode to its neighbouring graycode, choose from |
IncludeOrigin |
Logical; When choose neighbouring graycode, should the input graycode be included or not. |
the optimal partitions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | data("sweden")
m1 <- glm(Claims ~ Kilometres+Zone+Bonus+Make, offset = log(Insured),
data = sweden, family = "poisson")
code1 <- c(1,2,2,3,3)
code2 <- c(1,2,3,4,5,2,6,7,8)
assign("addon.bic.trace", NULL, envir = environment(FCBMA))
assign("addon.code.trace", NULL, envir = environment(FCBMA))
AddOnSearch(merge.code = list(code1,code2),
varia.list = c("Kilometres", "Make"),
model = m1,
transition.method = "ChangeOne")
get("addon.bic.trace", envir = environment(FCBMA))
get("addon.code.trace", envir = environment(FCBMA))
assign("addon.bic.trace", NULL, envir = environment(FCBMA))
assign("addon.code.trace", NULL, envir = environment(FCBMA))
AddOnSearch(merge.code = list(c(1,2,2,2,3)),
varia.list = c("Kilometres"),
model = m1,
transition.method = "ChangeOne")
get("addon.bic.trace", envir = environment(FCBMA))
get("addon.code.trace", envir = environment(FCBMA))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.