wlr: Wavelet linear regression (WLR)

Description Usage Arguments Examples

View source: R/wlr.R

Description

Function for wavelet linear regression.

Usage

1
2
3
4
5
6
7
wlr(y, x, wn, ns = 6)
## S3 method for class 'wlr'
print(x, ...)
## S3 method for class 'wlr'
plot(x, ...)
## S3 method for class 'wlr'
predict(object, newdata, ...)

Arguments

y

A vector of response variable

x

A matrix of independent variables. Row: samples; Column: spectra

wn

A vector of wavelength of x

ns

Number of scale of multiresolution analysis. Default: ns = 6.

object

A list of results

newdata

A matrix of new independent variables for prediction

...

Ignore

Examples

1
2
3
4
5
6
data("soilcarbon")
wn <- seq(350, 2500, 10)
# test
wlr1 <- wlr(y = y, x = x[,1], wn = wn, ns = 6)
# all data
## Not run: wlr1 <- wlr(y = y, x = x, wn = wn, ns = 6) # about 10s

yongzesong/WS documentation built on Dec. 23, 2021, 8:17 p.m.