doing sine regression to recover the paramters from a given signal
If your samples are equidistant you can use a model function like
$$\hat{x}(n)=a\sin(bn+c)+d$$ where $n$ is your sample index. You can compute the parameters $a,b,c,d$ by setting up an overdetermined nonlinear system of equations.

Let $x(n)$ be your signal. Then you'll have

$$a\sin(b\cdot 0 + c) + d = x(0)\\
a\sin(b\cdot 1 + c) + d = x(1)\\
a\sin(b\cdot 2 + c) + d = x(2)\\\vdots
$$

(Of course, the equalities are only approximate equalities.) You can use a nonlinear method such as the Newton method to solve this nonlinear overdetermined system. The only problem is that you need a sufficiently good initial solution. Try to find a simple initial guess by inspection (if your data looks at all like a sinusoid ...). For $a$ and $d$ you could simply use

$$a_0 = \max(|x(n)|),\quad d_0 = \frac{1}{N}\sum_{n=0}^{N-1}x(n)$$

as initial guess ($N$ is the number of data points).