err.breakage
. By default, a plot of the data and the fitted
model is drawn.
fit.breakage(data, start = list(theta = 3 * pi/180, r = 0.05), rho = 51, l = 1000, do.plot = TRUE, ...)
data$x
holding the breakage distances
in microns, and data$y
the corresponding resistance in megohms. For compatibility with
breakage.plot
and break.clust
, these columns may instead by named
Z
and Mohm
respectively.
theta
and r
.
The error function typically has a well-behaved minimum and the default start values should converge
in most cases.
optim
; or NA if optimisation failed.optim
; or NA if optimisation failed.optim
; or NA if optimisation failed.optim
. If the optimisation failed, this may provide some useful information as to why.L-BFGS-B
method of optim
, constraining the possible
values of r
and theta
to physically plausible ranges.
fit.breakage
# fake up some breakage data
brks <- sort(abs(0.5 + rnorm(n=15, sd=0.5) * 1:15))
res <- resist.breakage(brks, theta=3*pi/180, r=0.04, rho=64) + rnorm(15)
# fit it
fit.breakage(list(x=brks, y=res))
Run the code above in your browser using DataLab