expand states and values to include

expand_stateval_testing(
  x,
  method = c("eigvec", "untested", "spread"),
  params = NULL,
  add_accum = TRUE
)

Arguments

x

state vector

method

method for distributing values across new (expanded) states

params

parameters

add_accum

add N and P (neg/pos test) accumulator categories?

Examples

pp <- read_params("PHAC_testify.csv")
s <- make_state(params=pp)
#> Warning: CHECK: may not be working properly for testify?
expand_stateval_testing(s, params=pp)
#> already testified, skipping
#>    S_u    S_p    S_n    S_t    E_u    E_p    E_n    E_t   Ia_u   Ia_p   Ia_n 
#> 999196      0    799      0      3      0      0      0      1      0      0 
#>   Ia_t   Ip_u   Ip_p   Ip_n   Ip_t   Im_u   Im_p   Im_n   Im_t   Is_u   Is_p 
#>      0      0      0      0      0      1      0      0      0      0      0 
#>   Is_n   Is_t    H_u    H_p    H_n    H_t   H2_u   H2_p   H2_n   H2_t ICUs_u 
#>      0      0      0      0      0      0      0      0      0      0      0 
#> ICUs_p ICUs_n ICUs_t ICUd_u ICUd_p ICUd_n ICUd_t    R_u    R_p    R_n    R_t 
#>      0      0      0      0      0      0      0      0      0      0      0 
#>      D      X      V      N      P 
#>      0      0      0      0      0 
#> attr(,"epi_cat")
#>  [1] "S"    "E"    "Ia"   "Ip"   "Im"   "Is"   "H"    "H2"   "ICUs" "ICUd"
#> [11] "D"    "R"    "X"    "V"   
#> attr(,"class")
#> [1] "state_pansim"
expand_stateval_testing(s, method="untested")
#> already testified, skipping
#>    S_u    S_p    S_n    S_t    E_u    E_p    E_n    E_t   Ia_u   Ia_p   Ia_n 
#> 999196      0    799      0      3      0      0      0      1      0      0 
#>   Ia_t   Ip_u   Ip_p   Ip_n   Ip_t   Im_u   Im_p   Im_n   Im_t   Is_u   Is_p 
#>      0      0      0      0      0      1      0      0      0      0      0 
#>   Is_n   Is_t    H_u    H_p    H_n    H_t   H2_u   H2_p   H2_n   H2_t ICUs_u 
#>      0      0      0      0      0      0      0      0      0      0      0 
#> ICUs_p ICUs_n ICUs_t ICUd_u ICUd_p ICUd_n ICUd_t    R_u    R_p    R_n    R_t 
#>      0      0      0      0      0      0      0      0      0      0      0 
#>      D      X      V      N      P 
#>      0      0      0      0      0 
#> attr(,"epi_cat")
#>  [1] "S"    "E"    "Ia"   "Ip"   "Im"   "Is"   "H"    "H2"   "ICUs" "ICUd"
#> [11] "D"    "R"    "X"    "V"   
#> attr(,"class")
#> [1] "state_pansim"