cosh
-functionsPerforms a correlated fit of a sum of several cosh
-functions
\(\sum_i a_i \cosh(m_i t)\) to data generated with
bootstrap.effectivemass
. Requires the same input and produces
analogous output as fit.effectivemass. The fit itself is performed
by bootstrap.nlsfit.
fit.cosh(effMass, cf, t1, t2, useCov = FALSE, m.init, par, n.cosh = 2,
adjust.n.cosh = FALSE, every, ...)
An object of class effectivemass
generated by a call
to bootstrap.effectivemass
. Either effMass
or cf
has
to be provided, but not both!
An object of class cf_boot
generated by a call to
bootstrap.cf
. Either cf
or effMass
has to be provided,
but not both!
The fit range. If several correlators are fitted, this is
automatically replicated accordingly. The fit range is adjusted such that
NA
s are removed from the fit. They must fulfill \(t_1<t_2\).
For symmetric correlators, they must both run from 0 to T/2-1
,
otherwise from 0 to T-1
.
see t1
Use the correlated chisquare. This works only for not too noisy data.
Initial guess of the effective mass, i.e. the smallest m_i.
Array of length 2*n.cosh
with initial guesses for the
effective masses in the first n.cosh
entries and initial guesses for
the amplitudes in the last n.cosh
entries.
Number of cosh
-functions summed over.
Only relevant, if n.cosh=2
. If set to
TRUE
, n.cosh
can be adjusted to n.cosh=1
automatically
in case the excited state cannot be resolved.
Fit only a part of the data points. Indices that are not
multiples of every
are skipped. If no value is provided, all points
are taken into account.
Additional parameters passed to the fit function. But the fit function is fixed and does not accept any arguments, so it will just crash. Therefore, don't use this!
An object with class coshfit
is returned. It contains all the
data of the input object effMass
or the cf
object as a member.
The following member objects are added:
t0
: the object returned by the optim
on the original data. The
format is as in par
.
t
: the bootstrap values of the results.
se
: errors calculated via bootstrap on the results.
ii
: the index array of data used in the fit.
invCovMatrix
: the inverse covariance matrix.
dof
: the degrees of freedom of the fit.
chisqr
: Chi squared value of the fit.
Qval
: p-value of the fit.
bootstrap.effectivemass
,
bootstrap.gevp
, invertCovMatrix
,
bootstrap.nlsfit
, fit.effectivemass
# NOT RUN {
data(samplecf)
samplecf <- bootstrap.cf(cf=samplecf, boot.R=99, boot.l=2, seed=1442556)
effmass <- fit.cosh(bootstrap.effectivemass(cf=samplecf), t1=15, t2=23)
summary(effmass)
plot(effmass, ylim=c(0.14,0.15))
# }
Run the code above in your browser using DataLab