Skip to contents

Calculate statistical measures for a Beta Prime control chart

Usage

stats_bp(data, alpha = 0.0027, mu = NULL, phi = NULL, ...)

Arguments

data

A matrix of observed data

alpha

The significance level for the control limits

mu

The mean parameter of the Beta Prime distribution (optional)

phi

The shape parameter of the Beta Prime distribution (optional)

...

Additional arguments to be passed to limits_bp

Value

A list containing the estimated parameters, control limits, and statistical measures

Examples

set.seed(0)
x <- r_bp(lots = 1000, n = 10, mu = 1, phi = 1.7)

# Estimate for maximum likelihood
stats_bp(data = x, alpha = 0.0027)
#> $mu_hat
#> [1] 1.010626
#> 
#> $phi_hat
#> [1] 1.720167
#> 
#> $alpha_hat
#> [1] 0.003
#> 
#> $ARL
#> [1] 333.3333
#> 
#> $MRL
#> [1] 230.7023
#> 
#> $SDRL
#> [1] 332.833
#> 
#> $li
#> [1] 0.4083773
#> 
#> $ls
#> [1] 2.798659
#> 
#> $convergence
#> [1] 0
#> 
#> $value
#> [1] 222.763
#> 

# Useing the true parameters
stats_bp(data = x, alpha = 0.0027, mu = 1, phi = 1.7)
#> $mu_hat
#> [1] 1
#> 
#> $phi_hat
#> [1] 1.7
#> 
#> $alpha_hat
#> [1] 0.003
#> 
#> $ARL
#> [1] 333.3333
#> 
#> $MRL
#> [1] 230.7023
#> 
#> $SDRL
#> [1] 332.833
#> 
#> $li
#> [1] 0.401327
#> 
#> $ls
#> [1] 2.791344
#> 
#> $convergence
#> NULL
#> 
#> $value
#> NULL
#>