I want to run a gof test for four distributions using following code;
f1 <- log(c(1.000311, 1.000375, 1.000300, 1.000418, 1.000324, 1.000428))
fit.weibull <- fitdist(log(f1), "weibull", lower = c(0, 0))
fit.lnorm <- fitdist(log(f1), "lnorm")
fit.gamma <- fitdist(log(f1), "gamma", lower = c(0, 0))
fit.exp <- fitdist(log(f1), "exp")
gofstat(list(fit.lnorm, fit.weibull, fit.gamma, fit.exp))
Error pops up when I run the code;
Error in ans[!test & ok] <- rep(no, length.out = length(ans))[!test & :
replacement has length zero
Dont really understand why, the error isnt really intuitive to try and fix for, but the code works for other data, so i assume it is an error with the data used ?
Aucun commentaire:
Enregistrer un commentaire