simcrv | R Documentation |
Simulate a hospitalization curve
simcrv(
print.plot = FALSE,
print.samples = FALSE,
print.eq = FALSE,
verbose = FALSE,
peakdist = dist_tf_peaks,
hstdat = ed,
predfits = tf_pred,
fitseas = tf_seas,
nu.min = 0.75,
nu.max = 1.25,
cv_list = cv_tf,
lambda_type = c("lambda.min", "lambda.1se")
)
print.plot |
Logical. Print a plot of the simulated curve. Default: FALSE |
print.samples |
Logical. Print stochastically sampled parameters as the function runs. Default: FALSE |
print.eq |
Logical. Print values calculated using the modified formula from Brooks et al (see Details). Default: FALSE |
verbose |
Logical. Equivalent to setting both |
peakdist |
Observed peak hospitalizations (height and week) from trend filter fits to FluSurv-NET (EIP) data. |
hstdat |
Observed hospitalization curves from FluSurv-NET. |
predfits |
Trend filter predictions based on fits to observed hospitalization curves. |
fitseas |
Trend filter fit objects for each observed hospitalization curve. |
nu.min |
Numeric. Minimum for random uniform draw governing simulated curve shifting. |
nu.max |
Numeric. Maximum for random uniform draw governing simulated curve shifting. |
cv_list |
List. containing cross-validation output for each season's trendfilter fit. |
lambda_type |
Character. One of "lambda.min" or "lambda.1se", each corresponding to different criteria used to select the lambda penalty for each trendfilter fit. Per the |
Methods adapted from:
Brooks LC, Farrow DC, Hyun S, Tibshirani RJ, Rosenfeld R. Flexible Modeling of Epidemics with an Empirical Bayes Framework. PLoS Comput Biol. 2015 Aug;11(8):e1004382. Available from: http://dx.doi.org/10.1371/journal.pcbi.1004382
Simulated curve depicting weekly hospitalization rates during a hypothetical flu season. Returns a list containing two nested lists, one storing sampled values from random draws, and one storing the results of feeding these values into the curve generating function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.