pesticideTrendCalcs: Summarize linear trends

Description Usage Arguments Format Details Value Note Author(s) References

View source: R/pesticideTrendCalcs.R

Description

Internal function to summarize the trend results.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
pesticideTrendCalcs(
  tndbeg,
  tndend,
  ctnd,
  pval,
  alpha,
  setnd,
  scl,
  baseConc,
  mclass
)

Arguments

tndbeg

is the beginning (in whole or decimal years) of the trend period. Zero means the begin date will be the beginning of the concentration data, cdat.

tndend

is the end of the trend (treated as December 31 of that year). Zero means the end date will be the end of the concentration data, cdat.

ctnd

is the concentration trend, the coefficient on the time variable.

pval

is the p-value for the linear trend component.

alpha

is the significance level or alpha value for statistical significance and confidence intervals.

setnd

is the standard error for the linear trend component.

scl

is the scale factor from the survreg.object.

baseConc

is the base concentration, the median concentration (midpoint of the trend line) for the first year of the trend analysis .

mclass

indicates the class of model to use. A class 1 model is the the traditional SEAWAVE-Q model that has a linear time trend. A class 2 model is a newer option for longer trend periods that uses a set of restricted cubic splines on the time variable to provide a more flexible model.

Format

The data frame returned has one row for each chemical analyzed and the number of columns are defined as follows:

pname character parameter analyzed
mclass numeric a value of 1 or 2
alpha numeric a significance level
ctndPpor numeric the concentration trend in percent over the period of record
cuciPpor numeric the concentration upper confidence interval for the trend in
percent over the period of record
clciPpor numeric the concentration lower confidence interval for the trend in
percent over the period of record
baseConc numeric the base concentration, median concentration or midpoint of
trend line, for first year of trend period
ctndOrigPORPercentBase numeric the concentration trend in original units over
the period of record
(calculation based on percent per year and base concentration)
cuciOrigPORPercentBase numeric the concentration trend upper confidence interval
for the trend in original units over the period of record
(calculation based on percent per year and base concentration)
clciOrigPORPercentBase numeric the concentration trend lower confidence interval
for the trend in original units over the period of record
(calculation based on percent per year and base concentration)
ctndlklhd numeric is the concentration trend likelihood

Details

pesticideTrendCalcs is called from within fitswavecav

Value

The data frame returned has one row for each chemical analyzed and summaries of the trend.

Note

Based on trend calculations used to display and summarize pesticide trends here https://nawqatrends.wim.usgs.gov/swtrends/. A likelihood value that is the functional equivalent of the two-sided p-value associated with the significance level of the trend was determined as follows: Likelihood = (1 - (p-value / 2)), where p-value is the p-value for the trend coefficient (Oelsner and others, 2017).

Author(s)

Karen R. Ryberg

References

Oelsner, G.P., Sprague, L.A., Murphy, J.C., Zuellig, R.E., Johnson, H.M., Ryberg, K.R., Falcone, J.A., Stets, E.G., Vecchia, A.V., Riskin, M.L., De Cicco, L.A., Mills, T.J., and Farmer, W.H., 2017, Water-quality trends in the Nation's rivers and streams, 1972–2012—Data preparation, statistical methods, and trend results (ver. 2.0, October 2017): U.S. Geological Survey Scientific Investigations Report 2017–5006, 136 p., https://doi.org/10.3133/sir20175006.


seawaveQ documentation built on Dec. 15, 2020, 5:12 p.m.