

Hello!

I have a doubt in relation with the use of the cosinor model with R when I have not only multiple components, but also linear, quadratic and cubic trends.

I explain the details:

In simple cosinor:


Y = M + A * cos(2
* π* t / T + φ) + error

T knowed: y = M + β* X1 + ϒ* X2 + error,
 
Where X1 = cos (2 * π* t / T) and X2 = sin(2
* π* t / T)
 
In this
case, I use lm(y ~ X1 + X2) .
 
For the
multiple components case:
 
y = M + ∑Aj * cos(2 * π * t /Tj + φj) + error
 
In this
case I use:  lm(y ~ X1tot + X2tot)
 
However, in
the generalized model case (linear, quadratic and cubic trends), I don’t know
how to analyze with R.
 
I include
the situacion formula:
 
y = M + α1 * t + α2 * t2 + α3 * t3+ ∑Aj *
cos(2 *π* t /Tj + φ2) + error
 
What
function in R can I use, as I used lm for the simple cosinor model and the
multiple components model?.
 
How can I
obtain global information and separated information?. I refer to obtain
information for each contribution (linear tren, quadratic trend, … and so on).
 
Thank you
very much for your help.
	[[alternative HTML version deleted]]

