get_time_wts: Calculate temporally-biased re-sampling weights without phi...

Description Usage Arguments Value Author(s)

View source: R/sampling_weight.R

Description

Calculate weights for re-sampling with a temporal bias. For each station, obsrvations that have been preceded by extreme values the most recently, have higher weights (meaning that observations where extreme values were recently measured are more likely to be selected). Most recent extreme observation in the past at station L: w -> 1; no rare observations in the past at station L: w -> 0.

Usage

1
get_time_wts(times, phi, rel.thr)

Arguments

times

a vector of time-stamps

phi

a vector of the relevance values of df's target variable

rel.thr

a relevance threshold above which an observation is considered relevant

Value

A vector of temporally-biased re-sampling weights, scaled to fit within range [0,1].

Author(s)

Mariana Oliveira


mrfoliveira/STResampling-JDSA2020 documentation built on June 28, 2021, 7:01 p.m.