smap_thetavec: Do the S-map calculations for a vector of 'theta' values

View source: R/smap_thetavec.R

smap_thetavecR Documentation

Do the S-map calculations for a vector of 'theta' values

Description

Given a vector of theta values and data, do the S-map calculation for each theta, using the fast 'smap_efficient()'. If values are not already first-differenced then set 'first_difference = TRUE' so the differencing is done within 'smap_efficient()'.

Usage

smap_thetavec(N, lags, theta_vec = seq(0, 1, by = 0.1), ...)

Arguments

N

A data frame with named columns for the response variable and covariate time series.

lags

A list of named integer vectors specifying the lags to use for each time series in N.

theta_vec

Vector of theta values to use.

...

Further options to pass to 'smap_efficient()'. In particular 'first_difference' may need to be TRUE, the default is FALSE.

Value

Vector of values of 'rho' corresponding to each value of 'theta_vec'.

Author(s)

Andrew Edwards

Examples


 N <- data.frame(x = simple_ts)
 lags <- list(x = 0:1)
 res <- smap_thetavec(N, lags, theta_vec = seq(0, 2, by=0.1), first_difference = TRUE)
 plot(res)

# And see pbsSmap vignette.

luke-a-rogers/pbsedm documentation built on June 3, 2024, 5:20 a.m.