library(simpar)
library(mrgsolve)
#>
#> Attaching package: 'mrgsolve'
#> The following object is masked from 'package:stats':
#>
#> filter
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
This output is a list of lists, with one draw from the
THETA, SIGMA, OMEGA distributions in each slot of
the list.
We also show here new, optional behavior where simpar()
will fix off-diagonal elements in simulated output when
the input $OMEGA matrix has zeros on the off-diagonals.
Summary
Example
Create some
simpar()
inputsCheck
omega
Traditional format
By default,
simpar()
still gives you the same output it always has … as a data.frameUpdated format for mrgsolve
This output is a list of lists, with one draw from the
THETA
,SIGMA
,OMEGA
distributions in each slot of the list.We also show here new, optional behavior where
simpar()
will fix off-diagonal elements in simulated output when the input$OMEGA
matrix has zeros on the off-diagonals.The idea is to be able to send this right into mrgsolve
Created on 2023-03-10 with reprex v2.0.2