SimulateHReg: Simulate Harmonic Regression

Description Usage Arguments Details Value See Also Examples

View source: R/SimulateHReg.R

Description

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

Usage

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

Arguments

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

Details

This will simulate harmonic hegression

Value

vector of length n, simulated harmonic series

See Also

FitHReg

Examples

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

pRSR documentation built on May 29, 2017, 3:01 p.m.

Search within the pRSR package
Search all R packages, documentation and source code