Description Usage Arguments See Also Examples

Repeated simulation

1 2 |

`dataset` |
Return value from the simulater function |

`nr` |
Number times to repeat the simulation |

`vars` |
Variables to use in repeated simulation |

`grid` |
Character vector of expressions to use in grid search for constants |

`sum_vars` |
(Numeric) variables to summaries |

`byvar` |
Variable(s) to group data by before summarizing |

`fun` |
Functions to use for summarizing |

`form` |
A character vector with the formula to apply to the summarized data |

`seed` |
Seed for the repeated simulation |

`name` |
Deprecated argument |

`summary.repeater`

to summarize results from repeated simulation

`plot.repeater`

to plot results from repeated simulation

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ```
simdat <- simulater(
const = c("var_cost 5","fixed_cost 1000"),
norm = "E 0 100;",
discrete = "price 6 8 .3 .7;",
form = c(
"demand = 1000 - 50*price + E",
"profit = demand*(price-var_cost) - fixed_cost",
"profit_small = profit < 100"
),
seed = 1234
)
repdat <- repeater(
simdat,
nr = 12,
vars = c("E","price"),
sum_vars = "profit",
byvar = "sim",
form = "profit_365 = profit < 36500",
seed = 1234,
)
head(repdat)
summary(repdat)
plot(repdat)
``` |

radiant.model documentation built on June 15, 2018, 9:13 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.