Re: [R] Regression of complex-valued functions

2014-02-12 Thread Rolf Turner
On 13/02/14 12:03, Andrea Graziani wrote: Using the same starting values, the two approaches bring to slightly different solutions: ### 1. Real part and Imaginary part fit$estimate [1] -3.8519181 -2.7342861 -1.4823740 1.7173982 4.4529298 1.4383334 0.1564904 0.4856774 2.2789567 3.

Re: [R] Regression of complex-valued functions

2014-02-12 Thread Andrea Graziani
> M +45 2547 6050 > fr...@vestas.com > http://www.vestas.com > > Company reg. name: Vestas Wind Systems A/S > This e-mail is subject to our e-mail disclaimer statement. > Please refer to www.vestas.com/legal/notice > If you have received this e-mail in error please contac

Re: [R] Regression of complex-valued functions

2014-02-12 Thread Andrea Graziani
Dear Rolf, Thank you for your suggestion. Based on your remarks I solved my problem using nlm(). Actually there are two quite straightforward ways to split the complex-valued problem into two “linked” real-valued problems. ### 1. Real part and Imaginary part # Experimental data E1_data <- Re(E

Re: [R] Regression of complex-valued functions

2014-02-11 Thread Duncan Murdoch
On 11/02/2014 2:10 PM, David Winsemius wrote: On Feb 9, 2014, at 2:45 PM, Andrea Graziani wrote: > Hi everyone, > > I previously posted this question but my message was not well written and did not contain any code so I will try to do a better job this time. > > The goal is to perform a non-lin

Re: [R] Regression of complex-valued functions

2014-02-11 Thread David Winsemius
On Feb 9, 2014, at 2:45 PM, Andrea Graziani wrote: > Hi everyone, > > I previously posted this question but my message was not well written and did > not contain any code so I will try to do a better job this time. > > The goal is to perform a non-linear regression on complex-valued data. > I

Re: [R] Regression of complex-valued functions

2014-02-11 Thread Rolf Turner
I have not the mental energy to go through your somewhat complicated example, but I suspect that your problem is simply the following: The function nls() is trying to minimize a sum of squares, and that does not make sense in the context of complex observations. That is, nls() is trying to

[R] Regression of complex-valued functions

2014-02-09 Thread Andrea Graziani
Hi everyone, I previously posted this question but my message was not well written and did not contain any code so I will try to do a better job this time. The goal is to perform a non-linear regression on complex-valued data. I will first give a short description of the data and then describe t

[R] Regression of complex-valued functions

2014-01-25 Thread Andrea Graziani
Hi, I tried to use nls() to fit a complex-valued (non linear) function that looks like this: y = A + B / (1 + C * (i*x*D)^E) where x is the real-valued independent variable, A,B,C,D,E are real-valued parameters and i is the imaginary unit. I had the followin error (my translation into englis