I need to applied the T- student testing to the parameters $\beta_0, \beta_1, \beta_2,\beta_3,\beta_4$ which model is:

$$ y = \beta_0 + \beta_1 t + \beta_2 Cos(\beta_3 t+\beta_4)$$

to do that, I need the design matrix X, and then $(X'X)^{-1}$ to get $c_{jj}$ diagonal elements to find $Se(B_i)$

I have tried to take the matrix like:

\begin{equation} \beta_0 \quad \beta_1 \quad \; \beta_2 \quad \quad \beta_3 \quad \beta_4 \end{equation}

\begin{equation} \begin{bmatrix} 1 & t_1 & Cos(t_1)& t_1 & 1\\ 1 & t_2 & Cos(t_2)& t_2 & 1\\ \vdots & \vdots & \vdots& \vdots& \vdots\\ 1 & t_n & Cos(t_3)& t_n & 1 \end{bmatrix} \end{equation}

or even;

\begin{equation} \beta_0 \quad \beta_1 \qquad \quad \beta_2 \qquad \quad \beta_3 \quad \beta_4 \end{equation}

\begin{equation} \begin{bmatrix} 1 & t_1 & Cos(\beta_3 t_1 + \beta_4)& t_1 & 1\\ 1 & t_2 & Cos(\beta_3 t_2 + \beta_4)& t_2 & 1\\ \vdots & \vdots & \vdots& \vdots& \vdots\\ 1 & t_n & Cos(\beta_3 t_3 + \beta_4)& t_n & 1 \end{bmatrix} \end{equation}

but with that form of the matrix is not possible to calculate $$(X'X)^{-1}$$

  • $\begingroup$ I doubt that the way you take in your question would solve the problem. I could propose another method simpler and more robust. But I need to check if it is compatible with your model equation according to your kind of data. To check I need at least one example of data (numerical data possibly reduced to be not too big). $\endgroup$
    – JJacquelin
    Mar 12, 2023 at 13:55

1 Answer 1


Below a non iterative method which doesn't need initial guess of the parameters to fit the model function :

enter image description here

This method used preliminary numerical integrations from the data. The accuracy of the result depends on the accuracy of the numerical integrations. This depends on the kind of data (the distribution of the points). That is why an example of data from the OP would be useful to see if the data is (or not) a favouvable case for the application of this method.

Without data from the OP a numerical example of application is shown below :

enter image description here

About the theory of the above method : https://fr.scribd.com/doc/14674814/Regressions-et-equations-integrales . Section : "Mixed Linear and Sinusoidal regression" with the numerical example pp.47-53 .


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .