| Author |
Comment/Response |
davidn
|
12/13/11 2:57pm
Hi!
I'm trying to fit a curve where some of the parameters can only be integers and I cannot find a way to set this:
FindFit::vloc: The variable n\[Element]Integers cannot be localized so that it can be assigned to numerical values. >>
I'm attaching the notebook if that helps.
This is the function:
f[M_?NumberQ, r_?NumberQ, n_?NumberQ, k_?NumberQ,
s_?NumberQ] := (Exp[
NIntegrate[
Log[CDF[BinomialDistribution[M, 0.001*k*(1 - Exp[-t/r])],
n]], {t, 0, s - 0.001}, AccuracyGoal -> 5]])*(1 -
CDF[BinomialDistribution[M, 0.001*k*(1 - Exp[-s/r])], n])
and this is the fit command im using:
FindFit[data, f[M, r, n, k, s], {M, r, n \[Element] Integers, k}, s]
Thank you!
Attachment: fit_attach.nb, URL: , |
|