knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
The goal of harper is to implement p-value computations using an approximation to the cumulative distribution function for a variety of tests for periodicity. It also fits four parameter harmonic regression using LS, L1 and robust regression and the semiparametric harmonic regression using the single index model with monotonic constraint. An accompanying vignette illustrates the application of these tests and models .
To install this package, run
if (!require("devtools")) install.packages("devtools") devtools::install_github("CliffordLai/harper")
This is a basic example which shows you how to estimate the frequency of series.
library(harper) # Simulate the four parameter harmonic regression model with standard Gaussian error terms set.seed(193) lambdaR <- seq(0.1,0.45,length.out=50) z <- shreg(15, f=2.5/15, hpar=list(snr=2,zeta=2*pi*0.3), model="Gaussian") ptestReg(z,method = "LS")$freq #Least-squares estimation
The vignettes include three applications. List vignettes in an HTML browser by,
browseVignettes(package = "harper")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.