getoptimalalpha: Test Equality of Curves with Homoscedastic or Heteroscedastic...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/getoptimalalpha.R

Description

To calculate the optiomal smoothing alpha if it si not specified.

Usage

1

Arguments

formula

Formula to do the regression.

data

A data frame of n rows by 2 columns. The column names should agree with the variable names specified in the formula.

plotit

Whether plot will be geneated to show how the different choices of alpha will affect the generalized cross validation values.

Details

When this routine is invoked, it will fit a sereies regressions specified by the formula on data set. For each one, the generalized cross validation will be calculated and the "best" (minimal) GCV will be found with the corresponding alpha returned.

Value

A numeric value of alpha value will be returned.

Author(s)

Zhongfa Zhang, Jiayang Sun

References

Zhongfa Zhang, et al: Test Equality of Curves with Homoscedastic or Heteroscedastic Errors. To appear

See Also

curvefit, curvetest.

Examples

1
2
3
4
  
    x1=seq(0,1, length=n1<-50); f1<-function(x){x*(1-x)+sin(2*pi*x)}; 
    y1=f1(x1)+rnorm(n1, 0, 0.2) 
    getoptimalalpha(formula=y~x, data.frame(x=x1, y=y1), plotit = TRUE) 

curvetest documentation built on May 19, 2017, 7:04 p.m.

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

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

Please suggest features or report bugs in the GitHub issue tracker.

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