[R] fit for truncated normal distribution
|Juergen Hedderich
j@hedder|ch @end|ng |rom t-on||ne@de
Sun Mar 15 11:31:01 CET 2020
Many thanks for all the helpful hints.
There is probably a bug in dtruncnorm() from library(truncnorm).
The workround with function dtnorm() from library(exactDistr) works fine!
/> //library(fitdistrplus); library(extraDistr) //Lade nötiges Paket:
MASS //Lade nötiges Paket: survival //Lade nötiges Paket: npsurv //Lade
nötiges Paket: lsei //> ////> ////> //filter <- c(4.98, 8.60, 6.37,
4.37, 8.03, 7.43, 6.83, 5.64, 5.43, 6.88, //+ //4.57, 7.50, 5.69, 7.88,
8.98, 6.79, 8.61, 6.70, 5.14, 7.29) //> ////> //fit <- fitdist(filter,
dtnorm, fix.arg=list(a=-Inf, b=9), //+ //start=list(mean=mean(filter),
sd=sd(filter)), //+ //optim.method="L-BFGS-B", //+ //lower=c(-0.1,
-0.1), upper=c(Inf, Inf)) //> //summary(fit) //Fitting of the
distribution ' tnorm ' by maximum likelihood Parameters : estimate Std.
Error mean 7.036644 0.5592341 sd 1.622802 0.4099704/ Best regards J.
Hedderich
[[alternative HTML version deleted]]
More information about the R-help
mailing list