Difference between revisions of "Two-dimensional Monte Carlo"
From Testiwiki
(first draft) |
(technical edits) |
||
Line 10: | Line 10: | ||
<rcode name="mc2d"> | <rcode name="mc2d"> | ||
− | #This is code | + | #This is code Op_en7805/mc2d on page [[Two-dimensional Monte Carlo]] |
library(OpasnetUtils) | library(OpasnetUtils) | ||
Line 24: | Line 24: | ||
# Boostrap-versio: | # Boostrap-versio: | ||
+ | |||
+ | # Paramter list. Note: this is not stored, you have to define it in the model code. | ||
mc2dparam<- list( | mc2dparam<- list( | ||
− | N2 = 1000, | + | N2 = 1000, # Number of iterations in the new Iter |
− | run2d = TRUE, | + | run2d = TRUE, # Should the mc2d function be used or not? |
− | newmarginals = c("Gender", "Ages", "Country"), | + | newmarginals = c("Gender", "Ages", "Country"), # Names of columns that are non-marginals but should be sampled enough to become marginals |
− | method = "bootstrap", | + | method = "bootstrap", # which method to use for 2D Monte Carlo? Currently bootsrap is the only option. |
− | fun = mean | + | fun = mean # Function for aggregating the first Iter dimension. |
) | ) | ||
Line 63: | Line 65: | ||
} | } | ||
− | objects. | + | objects.store(mc2d) |
cat("Function mc2d stored.\n") | cat("Function mc2d stored.\n") | ||
</rcode> | </rcode> |
Revision as of 14:24, 11 June 2017
This page is a method.
The page identifier is Op_en7805 |
---|
Moderator:Jouni (see all) |
Give your opinion to the peer rating of the content of this page. |
Upload data
|
Contents
Question
How to perform two-dimensional Monte Carlo in Opasnet?
Answer
Rationale
See also
- This method is used by e.g. Health impact assessment