Skip to contents

This one function does three things. 1) a jack-knife cross-validation of a WRTDS model in which it augments the Sample data frame in the eList, 2) fits the WRTDS model creating the surfaces matrix and places it in the eList (the surfaces matrix expresses the estimated concentration as a function of discharge and time), and 3) estimates the daily values of concentration and flux, and flow normalized concentration and flux and places these in the Daily data frame in the eList. It returns a named list with the following dataframes: Daily, INFO, Sample, and the matrix: surfaces.

Usage

modelEstimation(eList, windowY = 7, windowQ = 2, windowS = 0.5,
  minNumObs = 100, minNumUncen = 50, edgeAdjust = TRUE, verbose = TRUE,
  run.parallel = FALSE)

Arguments

eList

named list with at least the INFO, Daily, and Sample dataframes

windowY

numeric specifying the half-window width in the time dimension, in units of years, default is 7

windowQ

numeric specifying the half-window width in the discharge dimension, units are natural log units, default is 2

windowS

numeric specifying the half-window with in the seasonal dimension, in units of years, default is 0.5

minNumObs

numeric specifying the minimum number of observations required to run the weighted regression, default is 100

minNumUncen

numeric specifying the minimum number of uncensored observations to run the weighted regression, default is 50

edgeAdjust

logical specifying whether to use the modified method for calculating the windows at the edge of the record. The edgeAdjust method tends to reduce curvature near the start and end of record. Default is TRUE.

verbose

logical specifying whether or not to display progress message

run.parallel

logical to run WRTDS in parallel or not

Value

eList named list with INFO, Daily, and Sample dataframes, along with the surfaces matrix.

Examples

eList <- Choptank_eList
# \donttest{
eList <- modelEstimation(eList)
#> 
#>  first step running estCrossVal may take about 1 minute
#>  estCrossVal % complete:
#> 0 	1 	2 	3 	4 	5 	6 	7 	8 	9 	10 	
#> 11 	12 	13 	14 	15 	16 	17 	18 	19 	20 	
#> 21 	22 	23 	24 	25 	26 	27 	28 	29 	30 	
#> 31 	32 	33 	34 	35 	36 	37 	38 	39 	40 	
#> 41 	42 	43 	44 	45 	46 	47 	48 	49 	50 	
#> 51 	52 	53 	54 	55 	56 	57 	58 	59 	60 	
#> 61 	62 	63 	64 	65 	66 	67 	68 	69 	70 	
#> 71 	72 	73 	74 	75 	76 	77 	78 	79 	80 	
#> 81 	82 	83 	84 	85 	86 	87 	88 	89 	90 	
#> 91 	92 	93 	94 	95 	96 	97 	98 	99 	
#> Next step running  estSurfaces with survival regression:
#> Survival regression (% complete):
#> 0 	1 	2 	3 	4 	5 	6 	7 	8 	9 	10 	
#> 11 	12 	13 	14 	15 	16 	17 	18 	19 	20 	
#> 21 	22 	23 	24 	25 	26 	27 	28 	29 	30 	
#> 31 	32 	33 	34 	35 	36 	37 	38 	39 	40 	
#> 41 	42 	43 	44 	45 	46 	47 	48 	49 	50 	
#> 51 	52 	53 	54 	55 	56 	57 	58 	59 	60 	
#> 61 	62 	63 	64 	65 	66 	67 	68 	69 	70 	
#> 71 	72 	73 	74 	75 	76 	77 	78 	79 	80 	
#> 81 	82 	83 	84 	85 	86 	87 	88 	89 	90 	
#> 91 	92 	93 	94 	95 	96 	97 	98 	99 	
#> Survival regression: Done
# }