Simulates a harmonic regression. Possible error distributions are normal, t(5), t(5,6), AR1.

1 | ```
SimulateHReg(n, f, A, B, simPlot = FALSE, Dist = "n", phi = 0.3)
``` |

`n` |
length of series |

`f` |
frequency |

`A` |
cosine amplitude |

`B` |
sine amplitude |

`simPlot` |
plot simulated series |

`Dist` |
one of "n" for normal, "t" for t(5), "s" skewed t(5,6), "a" autocorrelated AR1 with parameter phi |

`phi` |
only used if AR1 error distribution is selected |

This will simulate harmonic hegression

vector of length n, simulated harmonic series

`FitHReg`

1 2 | ```
z<-SimulateHReg(10, f=2.5/10, 1, 2)
FitHReg(z)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.