Return diagnostics after on a mixture distribution object fittted with 'mx_metafit'

diagnostics(obj, ...)

# S4 method for mxMle
diagnostics(obj, breaks = NULL, counts = NULL, ...)

Arguments

obj

object of class mxMle

...

reserved for future extensions

breaks

class boundaries of the data

counts

frequency of observations

Value

list of diagnostic measures

Examples

breaks <- 0:28 counts <- c(36, 0, 2, 3, 4, 8, 9, 14, 10, 9, 3, 1, 1, 2, 4, 8, 20, 45, 40, 54, 41, 22, 8, 3, 3, 0, 0,0) observations <- unbin(breaks[-1], counts) # upper class boundaries (comp <- mx_guess_components(observations, bw=2/3, mincut=0.9))
#> mean sd L #> 1 1.040054 0.7032986 0.1055751 #> 2 7.805322 2.0509038 0.1775396 #> 3 19.505968 2.1153693 0.7168853
obj <- mxObj(comp, left="e") ret <- mx_metafit(breaks, counts, obj) summary(ret) # general summary
#> Maximum likelihood estimation #> #> Call: #> mle2(minuslogl = llunimix, start = parms) #> #> Coefficients: #> Estimate Std. Error z value Pr(z) #> L1 0.102637 0.016246 6.3179 2.652e-10 *** #> L2 0.183466 0.020879 8.7872 < 2.2e-16 *** #> rate1 7.891433 8.638539 0.9135 0.361 #> mean2 7.304443 0.283240 25.7889 < 2.2e-16 *** #> sd2 2.140047 0.226415 9.4519 < 2.2e-16 *** #> mean3 19.029089 0.126390 150.5588 < 2.2e-16 *** #> sd3 1.948262 0.093759 20.7795 < 2.2e-16 *** #> --- #> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 #> #> -2 log L: 1873.47
cov2cor(vcov(ret)) # correlation matrix of parameters
#> L1 L2 rate1 mean2 sd2 #> L1 1.000000e+00 -1.614179e-01 1.899205e-05 4.404988e-03 -0.0129406201 #> L2 -1.614179e-01 1.000000e+00 -2.322614e-05 3.204188e-02 0.0689235221 #> rate1 1.899205e-05 -2.322614e-05 1.000000e+00 3.896354e-05 -0.0001705144 #> mean2 4.404988e-03 3.204188e-02 3.896354e-05 1.000000e+00 0.1155702129 #> sd2 -1.294062e-02 6.892352e-02 -1.705144e-04 1.155702e-01 1.0000000000 #> mean3 -7.909409e-04 2.135825e-02 -1.098725e-05 4.706817e-02 0.0768120135 #> sd3 1.378197e-03 -3.868433e-02 1.916903e-05 -8.413941e-02 -0.1346087859 #> mean3 sd3 #> L1 -7.909409e-04 1.378197e-03 #> L2 2.135825e-02 -3.868433e-02 #> rate1 -1.098725e-05 1.916903e-05 #> mean2 4.706817e-02 -8.413941e-02 #> sd2 7.681201e-02 -1.346088e-01 #> mean3 1.000000e+00 -5.204826e-02 #> sd3 -5.204826e-02 1.000000e+00
diagnostics(ret) # additional diagnostics
#> #> Convergence = 0 : Successful completion of optim #> #> Agreement of (cumulative) distribution to data: #> #> cor(observed, predicted)): 0.9998638 #> rsquared (explained variance): 0.9997274 #> Nash Sutcliffe Efficiency: 0.9997274 #> Log Likelihood: -936.735 #> AIC: 1887.47 #> Total number of counts: 350 #> Number of non-empty classes: 24 #>