wtfun | R Documentation |
Get weights used during weighted regression for a single observation in the dissolved oxygen time series
wtfun(
ref_in,
dat_in,
wt_vars = c("dec_time", "hour", "Tide"),
wins = list(4, 12, NULL),
all = FALSE,
slice = TRUE,
subs_only = FALSE
)
ref_in |
one row of the data frame of |
dat_in |
data frame for estimating weights |
wt_vars |
chr string indicating names of weighting variables |
wins |
numeric vecotr for windows for the three wt variables, values represent halves. A |
all |
logical to return all weights, rather than the product of all three |
slice |
logical for subsetting |
subs_only |
logical for returning only wt vectors that are non-zero |
The default behavior is to subset the data frame for faster wt selection by limiting the input the maximum window size. Subsetted weights are recombined to equal a vector of length equal to the original data.
wtreg
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.