wtfun: Get weights used during weighted regression

Description Usage Arguments Details See Also

View source: R/wtfun.R

Description

Get weights used during weighted regression for a single observation in the dissolved oxygen time series

Usage

1
2
3
wtfun(ref_in, dat_in, wt_vars = c("dec_time", "hour", "Tide"),
  wins = list(4, 12, NULL), all = FALSE, slice = TRUE,
  subs_only = FALSE)

Arguments

ref_in

one row of the data frame of dat_in that is teh center of the window

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 NULL value for Tide specifies the half-window width is set automatically to one half the tidal range.

all

logical to return all weights, rather than the product of all three

slice

logical for subsetting dat_in for faster wt selection

subs_only

logical for returning only wt vectors that are non-zero

Details

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.

See Also

wtreg


fawda123/WtRegDO documentation built on June 8, 2017, 2:18 p.m.