library(fiberLD)
## using microscopy data (uncut fiber lengths in the increment core)
data(microscopy)
dat <- microscopy[1:200]
m1 <- fled(data=dat,data.type="microscopy",model="ggamma",r=2.5)
summary(m1)
plot(m1)
## and with log normal model...
m2 <- fled(data=dat,data.type="microscopy",model="lognorm",r=2.5)
summary(m2)
plot(m2)
if (FALSE) {
## using data measured by an optical fiber analyser
data(ofa)
d1 <- fled(data=ofa,model="lognorm",r=2.5)
summary(d1)
plot(d1)
x11()
plot(d1,select=2,density.scale="uncut.core")
## change the model to generalized gamma
## and set lower and upper bounds on the parameters for
## the "L-BFGS-B" method ...
d2 <- fled(data=ofa,model="ggamma",r=2.5,lower=c(.12,1e-3,.05,rep(.3,4)),
upper=c(.5,2,rep(7,5)),cluster=1)
d2
summary(d2)
plot(d2,select=1)
## change "ML" default method to a stochastic version of the EM algorithm...
d3 <- fled(data=ofa,model="lognorm",r=2.5,method="SEM",cluster=0)
d3
}
Run the code above in your browser using DataLab