-
Notifications
You must be signed in to change notification settings - Fork 0
Efficient model #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
runEval.Rmd
Outdated
| # Data Generating Process | ||
|
|
||
| The data generating process simulates a fixed population at the individual level on a daily basis. Larger or smaller uniform units could be used. | ||
| The data generating process simulates a fixed population at the individual level on a daily basis. There are a series of simulating DGPs with varied properties. This document covers a DGP that closely mirrors the compartment model structure with real valued compartments with population transfers between states computed via real valued multiplication on each day of the simulation. There is no stochastic element at all in this simulation since it serves as a baseline for more complex models which will have stochastic (random) elements as well as operating on different scales, e.g., agent-based models. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is real-valued multiplication? Very confusing...
| # Running simulation and fitting a model | ||
|
|
||
| ```{r echo=TRUE} | ||
| Below we go over how to setup and run the simulation code that generates data and runs experiments. The central code is in `R/runEval.R` with use of functions in `R/util.R` for printing/graphing functions, `R/data_configs.R` for code that creates data via simulation or provides actual data, `R/modeling_configs.R` for code that configures parameters for modeling software and `R/SIRTDsim.R` that contains simulation software and is called from functions in `R/data_configs.R`. The libraries and dependencies are: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could'n find data_configs.R. Aren't you mistaken it for sim_configs.R?
| The `sim_brazil_1` is a parameterization that roughly mimics the shape of the COVID-19 outbreak with corresponding simulated values as determined by trying values by hand. Look at the source for more info. Note that the prefix on the function is 'sim', which means that it is part of simulation. There is still one row in the dataframe but with simulation data and the generating paramaterzation. | ||
|
|
||
| ### Adding simulation parameters | ||
| The, remember transposed, dataframe is: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't you being pedantic? This is the third time you mention "transposed" in less than 10 lines?
runEval.Rmd
Outdated
| kable(t(run_df), digits=3) | ||
| ``` | ||
|
|
||
| We now have simulation data from the SIRTD model for `n_days`. But still only one row--remember transposed above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, 4th time in less than 15 lines
runEval.Rmd
Outdated
| ``` | ||
|
|
||
| ## Running the simulation | ||
| Above are transposed output for two draws for slight variations of the Brazil hand parameterization. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is "Brazil hand parameterization"? Isn't it better to say "custom"?
runEval.Rmd
Outdated
| ## Running non-simulated data | ||
| ## Setting up modeling | ||
|
|
||
| At this point we have three sets of data, one hand configured to mirror Brazil data and two that vary simulation parameters from the hand configured model. Now we apply modeling configurations with subroutines from `R/modeling_configs.R`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"custom" instead of "hand"?
runEval.Rmd
Outdated
| ``` | ||
|
|
||
| ## Configuring modeling | ||
| There are two model configurations which apply to the three rows uniformly so we end up with 6 configurations total. One model applies tweets to the task, and one does not. The final result is: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which "task"?
| ```{r} | ||
| cat(pull_section('# section 5', here::here('R','runEval.R'))) | ||
| cat(pull_section('# run models', here::here('R','runEval.R'))) | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which models are these? Maybe add them?
storopoli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breck, I did some changes and added some comments. See if you agree. Also please address the comments. They are stuff that either I got confused reading or I am pointing that should be careful thought...
…ratingProcess1 into efficient_model
Fairly large overhaul of the simulation code, runEval.R, runEval.Rmd and so on.