x <- seq(1.0, 5, 0.25)
dhc.gen.rayleigh(x, 2.0, 0.5, 0.1)
phc.gen.rayleigh(x, 2.0, 0.5, 0.1)
qhc.gen.rayleigh(0.5, 2.0, 0.5, 0.1)
rhc.gen.rayleigh(10, 2.0, 0.5, 0.1)
hhc.gen.rayleigh(x, 2.0, 0.5, 0.1)
# Data
x <- stress66
# ML estimates
params = list(alpha=1.4585, lambda=0.5300, theta=0.1655)
#P–P (probability–probability) plot
pp.plot(x, params = params, pfun = phc.gen.rayleigh, fit.line=TRUE)
#Q-Q (quantile–quantile) plot
qq.plot(x, params = params, qfun = qhc.gen.rayleigh, fit.line=TRUE)
# Goodness-of-Fit(GoF) and Model Diagnostics
out <- gofic(x, params = params,
dfun = dhc.gen.rayleigh, pfun=phc.gen.rayleigh, plot=FALSE)
print.gofic(out)
Run the code above in your browser using DataLab