time_pls: time_pls

Description Usage Arguments Examples

View source: R/time_pls.R

Description

Performs partial lease squares regression on time series data for a given number of lags.

Usage

1
time_pls(y, X, dates, lag = 30, ncomps = 3)

Arguments

y

Vector of variable to predict using pls

X

Matrix of covariates for pls

lag

Number of lags to be used for creating pls components

ncomps

Number of components for pls regression

Examples

1
2
3
4
5
6
7
8
## Not run: 
d <- climate_data
dates <- d$date
y <- d$cfs
X <- cbind(d$p,d$tmin,d$tmax)
fit <- time_pls(y,X,dates,lag=30,ncomps=3)

## End(Not run)

scworland-usgs/timepls documentation built on May 20, 2019, 11:37 a.m.