similar to: fitting sine wave

Displaying 20 results from an estimated 500 matches similar to: "fitting sine wave"

2023 Nov 06
2
non-linear regression and root finding
Dear friends - I have a function for the charge in a fluid (water) buffered with HEPES and otherwise only containing Na and Cl so that [Na] - [Cl] = SID (strong ion difference) goes from -1 mM to 1 mM. With known SID and total HEPES concentration I can calculate accurately the pH if I know 3 pK values for HEPES by finding the single root with uniroot Now, the problem is that there is some
2023 Nov 06
2
non-linear regression and root finding
Thanks a lot! This was amazing. I'm not sure I see how the conditiion pK1 < pK2 < pK3 is enforced? - it comes from the derivation via generalized Henderson-Hasselbalch but perhaps it is not really necessary. Anyway, the use of Vectorize did the trick! Best wishes Troels Den 06-11-2023 kl. 19:19 skrev Ivan Krylov: > ? Mon, 6 Nov 2023 17:53:49 +0100 > Troels Ring <tring at
2023 Nov 06
1
non-linear regression and root finding
? Mon, 6 Nov 2023 17:53:49 +0100 Troels Ring <tring at gvdnet.dk> ?????: > Hence I wonder if I could somehow have non linear regression to find > the 3 pK values. Below is HEPESFUNC which delivers charge in the > fluid for known pKs, HEPTOT and SID. Is it possible to have > root-finding in the formula with nls? Sure. Just reformulate the problem in terms of a function that
2023 Nov 06
1
non-linear regression and root finding
I won't send to list, but just to the two of you, as I don't have anything to add at this time. However, I'm wondering if this approach is worth writing up, at least as a vignette or blog post. It does need a shorter example and some explanation of the "why" and some testing perhaps. If there's interest, I'll be happy to join in. And my own posting suggests how the
2023 Nov 07
1
non-linear regression and root finding
G'day Troels, On Mon, 6 Nov 2023 20:43:10 +0100 Troels Ring <tring at gvdnet.dk> wrote: > Thanks a lot! This was amazing. I'm not sure I see how the conditiion > pK1 < pK2 < pK3 is enforced? One way of enforcing such constraints (well, in finite computer arithemtic only "<=" can be enforced) is to rewrite the parameters as: pK1 = exp(theta1) ##
2023 Nov 07
1
non-linear regression and root finding
Thanks a lot, Berwin. Unfortunately, pK1 may well be negative and as I understand the literature it may be poorly defined as such, and also seems to be at a boundary, since when lower is set to say rep(-4,3) pK1 is returned as -4 while pK2 and pK3 are undisturbed. Perhaps the point is that pK1 is not carrying any information at the pH around 5. Fair enough, I guess. Only, I believe I need
2011 Mar 22
3
Accelerating the calculation of the moving average
Dear List, I have a data frame with approximately 500000 rows that looks like this: ?Date??? time??? value ? 19.07.1956????????? 12:00:00?????????????? 4.84 19.07.1956????????? 13:00:00?????????????? 4.85 19.07.1956????????? 14:00:00?????????????? 4.89 19.07.1956????????? 15:00:00?????????????? 4.94 19.07.1956????????? 16:00:00?????????????? 4.99 19.07.1956????????? 17:00:00?????????????? 5.01
2012 Oct 10
4
own function: computing time
Hi all, I wrote a function that actually does what I want it to do, but it tends to be very slow for large amount of data. On my computer it takes 5.37 seconds for 16000 data points and 21.95 seconds for 32000 data points. As my real data consists of 18000000 data points it would take ages to use the function as it is now. Could someone help me to speed up the calculation? Thank you, Tonja
2010 May 26
3
Peak Over Threshold values
Dear List I hope you can help me: I?ve got a dataframe (df) within which I am looking for Peak Over Threshold values as well as the length of the events. An event starts when walevel equals 5.8 and it should end when walevel equals the lower threshold value (5.35). I tried ?clusters (?)? from ?evd package?, and varied r (see example) but it did not work for all events (again
2006 Mar 11
1
Non-linear Regression : Error in eval(expr, envir, enclos)
Hi.. i have an expression of the form: model1<-nls(y~beta1*(x1+(k1*x2)+(k1*k1*x3)+(k2*x4)+(k2*k1*x5)+(k2*k2*x6)+(k3*x7)+(k3*k4*x8)+(k3*k2*x9)+(k3*k3*x10)+ (k4*x11)+(k4*k1*x12)+(k4*k2*x13)+(k4*k3*x14)+(k4*k4*x15)+(k5*x16)+(k5*k1*x17)+(k5*k2*x18)+(k5*k3*x19)+
2010 Sep 15
2
Contour line coordinates
Hi all, I used contour() to add contour lines to a plot. Now I?m wondering if there is a way to get an output of the calculated x- and y- coordinates of the contour lines? Tonja
2012 Nov 20
1
Fit Gumbel Distribution using Method of Moments
Hi all! I'm sure this is a stupid question but I can't find an answer. How can I fit the Gumbel distribution to my data using The Method of Moments in R? Thank you for helping me, Tonja
2017 Nov 15
2
ks.test() with 2 samples vs. 1 sample an distr. function
Dear all, I have a question concerning the ks.test() function. I tryed to calculate the example given on the German wikipedia page. xi <- c(9.41,9.92,11.55,11.6,11.73,12,12.06,13.3) I get the right results when I calculate: ks.test(xi,pnorm,11,1) Now the question: shouldn't I obtain the same or a very similar result if I commpare the sample and a calculated sample from the distribution?
2010 Aug 16
1
lmomRFA-package: regsimq()
Hi List! I?m using regsimq() from the ?lmomRFA?-package to calculate error bounds for diverse distributions. For example: regsimq(gumfit$qfunc, nrec = lmom.data$n, f = lcdfgum, boundprob = c(0.025, 0.975)) Several times I got this error massage: Fehler in quantile.default(ou, probs = boundprob, type = 6) : missing values and NaN's not allowed if 'na.rm' is FALSE So my question
2010 Jul 21
1
"lmomRFA" package: error bounds/confidence intervals
Dear List I?m using the ?lmomRFA? package to fit different distributions to my data sample. To calculate the error bounds I used: regsimq(?) and sitequantbounds(?) So my questions are: Are error bounds and confidence intervals the same thing? And: Does regsimq(? boundprob = c(0.05, 0.95)) calculate the 90 or the 95% confidence interval? If error bounds and confidence intervals are
2011 Jan 17
1
intercept point coordinates
Hi List, Can someone help me to calculate the coordinates of the red and green points? In this example I found their approximate location by trying, but as I have to analyse many similar curves, I?d rather calculate the exact location. data<- c(0.008248005, 0.061242387, 0.099095516, 0.189943027, 0.227796157, 0.258078661, 0.280790538, 0.303502416, 0.386779301, 0.454914934, 0.545762445,
2012 May 15
2
Renaming names in R matrix
I have the following matrix: > dat [,1] [,2] [,3] [,4] foo 0.7574657 0.2104075 0.02922241 0.002705617 foo 0.0000000 0.0000000 0.00000000 0.000000000 foo 0.0000000 0.0000000 0.00000000 0.000000000 foo 0.0000000 0.0000000 0.00000000 0.000000000 foo 0.0000000 0.0000000 0.00000000 0.000000000 foo 0.0000000 0.0000000 0.00000000 0.000000000 and given this:
2001 Mar 13
3
Bleem in Wine?
On 13-Mar-2001 The Spectre wrote: > I have not found a good replacement for Bleem under Linux. > > Any suggestions? To speak truly, I'd rather play in a good old PSX than in an emulator. Bleem! sucks... -- Carlos Laviola - ICQ 55799523 pub 1024D/3516D372 2000-06-05 Carlos Laviola <claviola@ajato.com.br> Key fingerprint = 3BE1 6591 C78C 2AA4 31DD AEEF 6406 0227
2017 Nov 15
0
ks.test() with 2 samples vs. 1 sample an distr. function
In the first example you are performing a one-sample test against a continuous cumulative distribution (in this case a normal distribution). In the second case you are performing a two-sample test. You drew your values for x non-randomly by specifying fixed intervals along a normal distribution, but ks.test() just sees that you have provided two samples, not one sample and values along a
2008 Dec 31
1
Checking for strtoumax and strtoimax
Tru64 5.1b PK6 : dovecot 1.1.7 : cc Configuration checks for strtoumax and strtoimax are positive but both are unresolved during compilation. strtoq and strtouq checks are negative. I can modify compat.c to use "unsigned long ret = 0;" in place of strtoumax (does this break anything?) and/but I would like to know how to handle strtoimax. Thanks in advance.