Description Usage Arguments Details Value Author(s) Examples
View source: R/CollapseMarginal.r
Apply functions (only sample
at the moment) over ovaribale indices
1 | CollapseMarginal(variable, cols, fun = "mean", probs = NULL, ...)
|
variable |
an ovariable |
cols |
vector of column names or indices to collapse |
fun |
|
probs |
list of vectors defining the distribution of values in a column index |
... |
excess arguments are ignored |
Samples over a fully defined column index (marginal) treating it as a nuisance parameter. Increases the joint distribution uncertainty (loses information). Weighted sampling is also possible.
Used to streamline heavy models (output has fewer rows of data).
See also: http://en.opasnet.org/
Input ovariable
with possibly lighter output.
T. Rintala teemu.rintala.a@gmail.com
1 2 3 | test <- Ovariable("test", output = data.frame(City = c("Helsinki", "Espoo"),
Iter = 1, testResult = 1:2), marginal = c(TRUE, TRUE, FALSE))
CollapseMarginal(test, "City", "mean")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.