
Calculate statistical measures for the gamma distribution
stats_g.RdThis function calculates statistical measures for the gamma distribution based on the given data.
Arguments
- data
The data matrix
- alpha
The significance level
- mu
The mean of the gamma distribution (optional)
- k
The shape parameter of the gamma distribution (optional)
- ...
Additional arguments to be passed
lbfgs::lbfgs()
Examples
set.seed(0)
x <- r_g(lots = 1000, n = 10, mu = 1, k = 1.7)
# Estimate for maximum likelihood
stats_g(data = x)
#> $mu_hat
#> [1] 1.002737
#>
#> $k_hat
#> [1] 1.734834
#>
#> $alpha_hat
#> [1] 0.004
#>
#> $ARL
#> [1] 250
#>
#> $MRL
#> [1] 172.94
#>
#> $SDRL
#> [1] 249.4995
#>
#> $li
#> [1] 0.4309558
#>
#> $ls
#> [1] 1.880363
#>
#> $convergence
#> [1] 0
#>
#> $value
#> [1] -24.56983
#>
# Using the true parameters
stats_g(data = x, mu = 1, k = 1.7)
#> $mu_hat
#> [1] 1
#>
#> $k_hat
#> [1] 1.7
#>
#> $alpha_hat
#> [1] 0.004
#>
#> $ARL
#> [1] 250
#>
#> $MRL
#> [1] 172.94
#>
#> $SDRL
#> [1] 249.4995
#>
#> $li
#> [1] 0.4254575
#>
#> $ls
#> [1] 1.885751
#>
#> $convergence
#> NULL
#>
#> $value
#> NULL
#>