Skip to contents

Plot risk distribution per serving

Usage

plotRisk.qraLm(x, ...)

Arguments

x

qraLm object see Lot2LotGen()

...

optional plot parameters passed to the plot function

Author

Vasco Cadavez

Examples


prod <- Lot2LotGen(
                   nLots = 1000,
                   sizeLot = 1000,
                   unitSize = 500,
                   betaAlpha = 0.5112,
                   betaBeta = 9.959,
                   C0MeanLog = 1.023,
                   C0SdLog = 0.3267,
                   propVarInter = 0.7
                   )
DRmodel <- "JEMRA"
population <- 2
risk <- DRForModel(prod,
                   model = DRmodel,
                   population = population)
str(risk)
#> List of 15
#>  $ Lot2LotGenParameters:List of 9
#>   ..$ nLots       : num 1000
#>   ..$ sizeLot     : num 1000
#>   ..$ unitSize    : num 500
#>   ..$ betaAlpha   : num 0.511
#>   ..$ betaBeta    : num 9.96
#>   ..$ C0MeanLog   : num 1.02
#>   ..$ C0SdLog     : num 0.327
#>   ..$ propVarInter: num 0.7
#>   ..$ Poisson     : logi FALSE
#>  $ lotMeans            : num [1:1000] 0.0586 1.4315 0.092 0.0134 1.27 ...
#>  $ unitsCounts         : num [1:1000000] 0 0 0 0 0 0 0 0 0 0 ...
#>  $ N                   : num [1:1000, 1:1000] 0 0 0 0 0 0 0 0 0 0 ...
#>  $ ProbUnitPos         : num [1:1000] 1 1 0.999 0.466 1 ...
#>  $ P                   : num 0.907
#>  $ betaGen             : num [1:1000] 0.013036 0.160003 0.00757 0.000628 0.063312 ...
#>  $ nLots               : num 1000
#>  $ sizeLot             : num 1000
#>  $ unitSize            : num 500
#>  $ Risk                : num [1:1000, 1:1000] 0 0 0 0 0 0 0 0 0 0 ...
#>  $ lotMeanRisk         : num [1:1000] 3.10e-11 7.59e-10 4.88e-11 3.32e-12 6.73e-10 ...
#>  $ servingRisk         : num [1:1000, 1:1000] 0 0 0 0 0 0 0 0 0 0 ...
#>  $ Model               : chr "JEMRA"
#>  $ Population          : num 2
#>  - attr(*, "class")= chr "qraLm"
plotRisk.qraLm(risk)